aboutsummaryrefslogtreecommitdiffstats
path: root/games/gracer
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2005-05-06 03:24:28 +0800
committeranholt <anholt@FreeBSD.org>2005-05-06 03:24:28 +0800
commitce3d2f818102d2671d51196ed7a4d951b0be95dc (patch)
treeae34a71fe53d384e6717a70f850437b386b85b61 /games/gracer
parent073d24e0c0ea363861704b78639035860de296f2 (diff)
downloadfreebsd-ports-gnome-ce3d2f818102d2671d51196ed7a4d951b0be95dc.tar.gz
freebsd-ports-gnome-ce3d2f818102d2671d51196ed7a4d951b0be95dc.tar.zst
freebsd-ports-gnome-ce3d2f818102d2671d51196ed7a4d951b0be95dc.zip
Trivially unbreak gracer by fixing bad C code. Still has some visual issues.
Also, depend on tcl84 instead of tcl82 (maintainer). PR: ports/80634 Submitted by: anholt Approved by: maintainer
Diffstat (limited to 'games/gracer')
-rw-r--r--games/gracer/Makefile6
-rw-r--r--games/gracer/files/patch-aa6
-rw-r--r--games/gracer/files/patch-ac2scene.c37
-rw-r--r--games/gracer/files/patch-glbind.c29
-rw-r--r--games/gracer/files/patch-glutwidgets.c54
-rw-r--r--games/gracer/files/patch-gr_memory.h11
-rw-r--r--games/gracer/files/patch-gr_world.c11
7 files changed, 146 insertions, 8 deletions
diff --git a/games/gracer/Makefile b/games/gracer/Makefile
index 243620628f82..69134f97acbe 100644
--- a/games/gracer/Makefile
+++ b/games/gracer/Makefile
@@ -19,7 +19,7 @@ BUILD_DEPENDS= ${X11BASE}/lib/libplibsl.a:${PORTSDIR}/x11-toolkits/plib
LIB_DEPENDS= ungif.5:${PORTSDIR}/graphics/libungif \
png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg \
- tcl82.1:${PORTSDIR}/lang/tcl82
+ tcl84.1:${PORTSDIR}/lang/tcl84
USE_MESA= YES
USE_PERL5_BUILD=yes
@@ -36,10 +36,6 @@ MAN6= gracer.6
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
pre-patch:
@${PERL} -pi -e 's,<malloc.h>,<stdlib.h>,' \
${WRKSRC}/common/gr_memory.h
diff --git a/games/gracer/files/patch-aa b/games/gracer/files/patch-aa
index 4de465a15269..234889d316a3 100644
--- a/games/gracer/files/patch-aa
+++ b/games/gracer/files/patch-aa
@@ -5,7 +5,7 @@
for tcl_prefix in $tcl_prefix $exec_prefix /usr/local /usr NONE; do
- if test -r $tcl_prefix/lib/tclConfig.sh; then
-+ if test -r $tcl_prefix/lib/tcl8.2/tclConfig.sh; then
++ if test -r $tcl_prefix/lib/tcl8.4/tclConfig.sh; then
break;
fi
done
@@ -19,7 +19,7 @@
AC_MSG_ERROR(tclConfig.sh doesn't exist)
fi
-AC_MSG_RESULT([use tclConfig.sh in $tcl_prefix/lib])
-+AC_MSG_RESULT([use tclConfig.sh in $tcl_prefix/lib/tcl8.2])
++AC_MSG_RESULT([use tclConfig.sh in $tcl_prefix/lib/tcl8.4])
. $file
if test $TCL_MAJOR_VERSION -lt 8; then
@@ -27,7 +27,7 @@
fi
-TCL_CFLAGS="-I$TCL_SRC_DIR"
-+TCL_CFLAGS="-I$tcl_prefix/include/tcl8.2"
++TCL_CFLAGS="-I$tcl_prefix/include/tcl8.4"
TCL_LDFLAGS="$TCL_LIB_SPEC"
AC_SUBST(TCL_CFLAGS)
AC_SUBST(TCL_LDFLAGS)
diff --git a/games/gracer/files/patch-ac2scene.c b/games/gracer/files/patch-ac2scene.c
new file mode 100644
index 000000000000..66e5d009cbbd
--- /dev/null
+++ b/games/gracer/files/patch-ac2scene.c
@@ -0,0 +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 @@
+ return 1;
+ }
+ break;
+-
+- default:
+ }
+
+ return 0;
+@@ -232,8 +230,6 @@
+ return 1;
+ }
+ break;
+-
+- default:
+ }
+
+ return 0;
+@@ -315,7 +311,6 @@
+ return 1;
+ }
+ break;
+- default:
+ }
+
+ return 0;
+@@ -397,8 +392,6 @@
+ 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-glbind.c b/games/gracer/files/patch-glbind.c
new file mode 100644
index 000000000000..800aefec1ee2
--- /dev/null
+++ b/games/gracer/files/patch-glbind.c
@@ -0,0 +1,29 @@
+--- src/glbind.c.orig Wed May 4 18:45:48 2005
++++ src/glbind.c Wed May 4 18:46:20 2005
+@@ -2147,8 +2147,6 @@
+ TCL_CHECK(Tcl_GetIntFromObj(interp, objv[2], &i), ERROR);
+ GL_CHECK(glLightModeli (pname, i));
+ return 3;
+-
+- default:
+ }
+
+ ERROR:
+@@ -2886,8 +2884,6 @@
+ }
+ GL_CHECK(glTexEnvfv (GL_TEXTURE_ENV, pname, param));
+ return 6;
+-
+- default:
+ }
+
+ ERROR:
+@@ -3078,8 +3074,6 @@
+ param[0] = d;
+ GL_CHECK(glTexParameterf (target, pname, param[0]));
+ return 4;
+-
+- default:
+ }
+
+ ERROR:
diff --git a/games/gracer/files/patch-glutwidgets.c b/games/gracer/files/patch-glutwidgets.c
new file mode 100644
index 000000000000..b1fc3ec264b4
--- /dev/null
+++ b/games/gracer/files/patch-glutwidgets.c
@@ -0,0 +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 @@
+ 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 @@
+ widget->y -= (height - screen_height) / 2;
+ widget->height += (width - screen_height);
+ break;
+- default:
+ }
+ glut_widget_calc_bbox (widget);
+ }
+@@ -325,8 +323,6 @@
+ glut_widget_set_focus (glut_next_focus_widget (NULL));
+ }
+ break;
+-
+- default:
+ }
+ }
+
+@@ -502,8 +498,6 @@
+ glut_widget_set_focus (widget);
+ }
+ break;
+-
+- default:
+ }
+ }
+
+@@ -1297,8 +1291,6 @@
+ }
+ glut_post_redisplay ();
+ break;
+-
+- default:
+ }
+ }
+
+@@ -1569,8 +1561,6 @@
+ 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-gr_memory.h b/games/gracer/files/patch-gr_memory.h
new file mode 100644
index 000000000000..218a2b368ddc
--- /dev/null
+++ b/games/gracer/files/patch-gr_memory.h
@@ -0,0 +1,11 @@
+--- 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
new file mode 100644
index 000000000000..0c0401bb33b2
--- /dev/null
+++ b/games/gracer/files/patch-gr_world.c
@@ -0,0 +1,11 @@
+--- 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;