diff --git a/games/gracer/Makefile b/games/gracer/Makefile index 74870773c53f..3f1aab30ff3a 100644 --- a/games/gracer/Makefile +++ b/games/gracer/Makefile @@ -1,36 +1,34 @@ PORTNAME= gracer PORTVERSION= 0.1.5 -PORTREVISION= 23 +PORTREVISION= 24 CATEGORIES= games MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= 3D motor sport simulator WWW= http://gracer.sourceforge.net/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_FreeBSD_13= ld: error: duplicate symbol: GrBreak -BROKEN_FreeBSD_14= ld: error: duplicate symbol: GrBreak - BUILD_DEPENDS= ${LOCALBASE}/lib/libplibsl.a:x11-toolkits/plib LIB_DEPENDS= libgif.so:graphics/giflib \ libpng.so:graphics/png -USES= gl gmake jpeg localbase perl5 tcl -USE_GL= glut +USES= gl gmake jpeg localbase perl5 tcl xorg +USE_GL= gl glu glut USE_PERL5= build +USE_XORG= ice sm x11 xext xi xmu xt GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-plib=${LOCALBASE} CPPFLAGS+= -I${TCL_INCLUDEDIR} post-patch: @${REINPLACE_CMD} -i '' -e 's|||' \ ${WRKSRC}/common/gr_memory.h @${REINPLACE_CMD} \ -e 's|lib/tclConfig.sh|lib/tcl${TCL_VER}/tclConfig.sh|' \ -e '/SOUND_LIBS=/s/"$$/ -lplibul"/' \ ${WRKSRC}/configure .include diff --git a/games/gracer/files/patch-ac2scene.c b/games/gracer/files/patch-ac2scene_ac2scene.c similarity index 51% rename from games/gracer/files/patch-ac2scene.c rename to games/gracer/files/patch-ac2scene_ac2scene.c index 66e5d009cbbd..627e63430c7c 100644 --- a/games/gracer/files/patch-ac2scene.c +++ b/games/gracer/files/patch-ac2scene_ac2scene.c @@ -1,37 +1,37 @@ ---- ac2scene/ac2scene.c.orig Fri Apr 1 18:36:19 2005 -+++ ac2scene/ac2scene.c Fri Apr 1 18:36:48 2005 -@@ -160,8 +160,6 @@ +--- ac2scene/ac2scene.c.orig 2000-03-01 04:26:42 UTC ++++ ac2scene/ac2scene.c +@@ -160,8 +160,6 @@ check_triangle_strip (GrSceneOptHint *hint, GrSurface return 1; } break; - - default: } return 0; -@@ -232,8 +230,6 @@ +@@ -232,8 +230,6 @@ check_triangle_fan (GrSceneOptHint *hint, GrSurface *s return 1; } break; - - default: } return 0; -@@ -315,7 +311,6 @@ +@@ -315,7 +311,6 @@ check_quad_strip (GrSceneOptHint *hint, GrSurface *sur return 1; } break; - default: } return 0; -@@ -397,8 +392,6 @@ +@@ -397,8 +392,6 @@ optimize_object (GrObject *obj, hints[i]->state = GR_SCENE_OPT_QUAD_STRIP_START; hints[i]->surf->elements = gr_new (GrSElement, num_quads * 2 + 2); break; - - default: } } diff --git a/games/gracer/files/patch-common_gr__memory.h b/games/gracer/files/patch-common_gr__memory.h new file mode 100644 index 000000000000..41d8b96cfc71 --- /dev/null +++ b/games/gracer/files/patch-common_gr__memory.h @@ -0,0 +1,20 @@ +--- common/gr_memory.h.orig 2000-03-01 04:27:04 UTC ++++ common/gr_memory.h +@@ -29,7 +29,7 @@ extern "C" { + } + #endif + +-#include ++#include + + #define gr_new(type,num) (type *) malloc (sizeof(type) * (num)) + #define gr_new0(type,num) (type *) __malloc0 (sizeof(type) * (num)) +@@ -64,7 +64,7 @@ void gr_slist_free (GrSList *list); + void gr_dlist_free (GrDList *list); + + #define gr_FOREACH(l,p) \ +- for (; (l) != NULL && ((void *)(p) = (l)->data, 1); (l) = (l)->next) ++ for (; (l) != NULL && ((p) = (l)->data, 1); (l) = (l)->next) + + void gr_ref_incr (GrRef *ref); + void gr_ref_decr (GrRef *ref); diff --git a/games/gracer/files/patch-gr_texture.c b/games/gracer/files/patch-common_gr__texture.c similarity index 75% rename from games/gracer/files/patch-gr_texture.c rename to games/gracer/files/patch-common_gr__texture.c index 9ea5e054f72e..059abc94b08d 100644 --- a/games/gracer/files/patch-gr_texture.c +++ b/games/gracer/files/patch-common_gr__texture.c @@ -1,32 +1,32 @@ --- common/gr_texture.c.orig 2000-03-01 04:27:18 UTC +++ common/gr_texture.c -@@ -274,7 +274,11 @@ read_gif_file (GrTexture *texture, char +@@ -274,7 +274,11 @@ read_gif_file (GrTexture *texture, char *filename) int index; int width, height; +#if GIFLIB_MAJOR >= 5 + file = DGifOpenFileName (filename, NULL); +#else file = DGifOpenFileName (filename); +#endif if (!file) return -1; -@@ -419,7 +423,7 @@ read_png_file (GrTexture *texture, char +@@ -419,7 +423,7 @@ read_png_file (GrTexture *texture, char *filename) if (fread (header, 1, PNG_BYTES_TO_CHECK, file) != PNG_BYTES_TO_CHECK) { goto ERROR; } - if (!png_check_sig (header, PNG_BYTES_TO_CHECK)) { + if (png_sig_cmp (header, 0, PNG_BYTES_TO_CHECK)) { goto ERROR; } -@@ -431,7 +435,7 @@ read_png_file (GrTexture *texture, char +@@ -431,7 +435,7 @@ read_png_file (GrTexture *texture, char *filename) if (!info_ptr) { goto ERROR; } - if (setjmp (png_ptr->jmpbuf)) { + if (setjmp (png_jmpbuf(png_ptr))) { goto ERROR; } png_init_io (png_ptr, file); diff --git a/games/gracer/files/patch-gr_memory.h b/games/gracer/files/patch-gr_memory.h deleted file mode 100644 index 218a2b368ddc..000000000000 --- a/games/gracer/files/patch-gr_memory.h +++ /dev/null @@ -1,11 +0,0 @@ ---- common/gr_memory.h.orig Wed May 4 18:49:43 2005 -+++ common/gr_memory.h Wed May 4 18:49:45 2005 -@@ -64,7 +64,7 @@ - void gr_dlist_free (GrDList *list); - - #define gr_FOREACH(l,p) \ -- for (; (l) != NULL && ((void *)(p) = (l)->data, 1); (l) = (l)->next) -+ for (; (l) != NULL && ((p) = (l)->data, 1); (l) = (l)->next) - - void gr_ref_incr (GrRef *ref); - void gr_ref_decr (GrRef *ref); diff --git a/games/gracer/files/patch-gr_world.c b/games/gracer/files/patch-gr_world.c deleted file mode 100644 index 0c0401bb33b2..000000000000 --- a/games/gracer/files/patch-gr_world.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/gr_world.c.orig Wed May 4 18:49:13 2005 -+++ src/gr_world.c Wed May 4 18:49:24 2005 -@@ -167,8 +167,6 @@ - case GR_CLINE_B_TO_A: - vehicle->lap_count --; - break; -- -- default: - } - - tlist = entry->triggers; diff --git a/games/gracer/files/patch-ab b/games/gracer/files/patch-src_glhash.h similarity index 71% rename from games/gracer/files/patch-ab rename to games/gracer/files/patch-src_glhash.h index c3b805f5796d..624a4844ee30 100644 --- a/games/gracer/files/patch-ab +++ b/games/gracer/files/patch-src_glhash.h @@ -1,10 +1,11 @@ -Index: src/glhash.h -@@ -709,6 +709,8 @@ +--- src/glhash.h.orig 2000-03-01 04:09:04 UTC ++++ src/glhash.h +@@ -709,6 +709,8 @@ glWordList glwordlist[] = { {"all_attrib_bits", GL_ALL_ATTRIB_BITS}, {"client_pixel_store_bit", GL_CLIENT_PIXEL_STORE_BIT}, {"client_vertex_array_bit", GL_CLIENT_VERTEX_ARRAY_BIT}, +#ifdef GL_CLIENT_ALL_ATTRIB_BITS {"client_all_attrib_bits", GL_CLIENT_ALL_ATTRIB_BITS}, +#endif {NULL, GL_NONE}, }; diff --git a/games/gracer/files/patch-glutwidgets.c b/games/gracer/files/patch-src_glutwidgets.c similarity index 62% rename from games/gracer/files/patch-glutwidgets.c rename to games/gracer/files/patch-src_glutwidgets.c index b1fc3ec264b4..37f6e23654c9 100644 --- a/games/gracer/files/patch-glutwidgets.c +++ b/games/gracer/files/patch-src_glutwidgets.c @@ -1,54 +1,54 @@ ---- src/glutwidgets.c.orig Wed May 4 18:47:07 2005 -+++ src/glutwidgets.c Wed May 4 18:48:56 2005 -@@ -254,7 +254,6 @@ +--- src/glutwidgets.c.orig 2000-03-01 04:28:21 UTC ++++ src/glutwidgets.c +@@ -254,7 +254,6 @@ glut_reshape_func (int width, int height) widget->x -= (width - screen_width) / 2; widget->width += (width - screen_width); break; - default: } switch (widget->anchor & GR_VERTICAL_MASK) { case GR_BOTTOM: -@@ -267,7 +266,6 @@ +@@ -267,7 +266,6 @@ glut_reshape_func (int width, int height) widget->y -= (height - screen_height) / 2; widget->height += (width - screen_height); break; - default: } glut_widget_calc_bbox (widget); } -@@ -325,8 +323,6 @@ +@@ -325,8 +323,6 @@ glut_keyboard_func (unsigned char key, int x, int y) glut_widget_set_focus (glut_next_focus_widget (NULL)); } break; - - default: } } -@@ -502,8 +498,6 @@ +@@ -502,8 +498,6 @@ glut_special_func (int key, int x, int y) glut_widget_set_focus (widget); } break; - - default: } } -@@ -1297,8 +1291,6 @@ +@@ -1297,8 +1291,6 @@ default_button_keyboard (GlutObject obj, unsigned char } glut_post_redisplay (); break; - - default: } } -@@ -1569,8 +1561,6 @@ +@@ -1569,8 +1561,6 @@ default_label_display (GlutObject obj) case GR_RIGHT: width = glut_label_width (obj) / 2; break; - - default: } glColor4fv (widget->fg_color[GR_STATE_NORMAL]); diff --git a/games/gracer/files/patch-src_gr__world.c b/games/gracer/files/patch-src_gr__world.c new file mode 100644 index 000000000000..893f573fca9d --- /dev/null +++ b/games/gracer/files/patch-src_gr__world.c @@ -0,0 +1,11 @@ +--- src/gr_world.c.orig 2000-03-01 04:28:24 UTC ++++ src/gr_world.c +@@ -167,8 +167,6 @@ gr_world_check_trigger (GrWorld *world, int side) + case GR_CLINE_B_TO_A: + vehicle->lap_count --; + break; +- +- default: + } + + tlist = entry->triggers; diff --git a/games/gracer/files/patch-src_vehicle.c b/games/gracer/files/patch-src_vehicle.c new file mode 100644 index 000000000000..988aa44a077b --- /dev/null +++ b/games/gracer/files/patch-src_vehicle.c @@ -0,0 +1,11 @@ +--- src/vehicle.c.orig 2023-04-13 00:36:40 UTC ++++ src/vehicle.c +@@ -58,6 +58,8 @@ + + #define SIGN(d) ((d)>=0.0? 1.0:-1.0) + ++extern struct _GrBreakData GrBreak; ++ + static void + next_word (char *str, int *index) + { diff --git a/games/gracer/files/patch-src_vehicle.h b/games/gracer/files/patch-src_vehicle.h new file mode 100644 index 000000000000..b220dc4f21a0 --- /dev/null +++ b/games/gracer/files/patch-src_vehicle.h @@ -0,0 +1,11 @@ +--- src/vehicle.h.orig 2023-04-13 00:36:07 UTC ++++ src/vehicle.h +@@ -65,7 +65,7 @@ typedef struct _GrEngineData GrEngineData; + typedef struct _GrLapHistory GrLapHistory; + typedef struct _GrVehicleData GrVehicleData; + +-struct _GrBreakData { ++extern struct _GrBreakData { + GrRef ref; + + /* constants */