aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-07-13 10:12:56 +0800
committeralepulver <alepulver@FreeBSD.org>2007-07-13 10:12:56 +0800
commit0e8728982cb7bd905d703b68a9a39aae8c6aef81 (patch)
tree98978b95ba199ee015a9cb896a3d90d8085d131f
parent594bd954d728da21f6309c7f57225ff0577df61d (diff)
downloadfreebsd-ports-gnome-0e8728982cb7bd905d703b68a9a39aae8c6aef81.tar.gz
freebsd-ports-gnome-0e8728982cb7bd905d703b68a9a39aae8c6aef81.tar.zst
freebsd-ports-gnome-0e8728982cb7bd905d703b68a9a39aae8c6aef81.zip
- Fix linking and remove BROKEN.
Since the modular xorg update it has been broken because the new libGL doesn't allow direct linking to glXGetVideoSyncSGI and glXWaitVideoSyncSGI, so they have to be accessed through glXGetProcAddressARB (at run-time). This doesn't happen with NVidia's libGL though, so it was harder to track.
-rw-r--r--games/ezquake/Makefile2
-rw-r--r--games/ezquake/files/patch-gl_local.h12
-rw-r--r--games/ezquake/files/patch-sys_linux.c12
-rw-r--r--games/ezquake/files/patch-vid_common_gl.c22
-rw-r--r--games/ezquake/files/patch-vid_glx.c25
5 files changed, 65 insertions, 8 deletions
diff --git a/games/ezquake/Makefile b/games/ezquake/Makefile
index 61751964d631..fb2c3e56d292 100644
--- a/games/ezquake/Makefile
+++ b/games/ezquake/Makefile
@@ -25,8 +25,6 @@ LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \
png.5:${PORTSDIR}/graphics/png \
xmms.4:${PORTSDIR}/multimedia/xmms
-BROKEN= does not compile
-
USE_DOS2UNIX= *.[ch] Makefile*
USE_GCC= 3.4+
USE_GMAKE= yes
diff --git a/games/ezquake/files/patch-gl_local.h b/games/ezquake/files/patch-gl_local.h
new file mode 100644
index 000000000000..7259a8ea30e6
--- /dev/null
+++ b/games/ezquake/files/patch-gl_local.h
@@ -0,0 +1,12 @@
+--- ./gl_local.h.orig Thu Jul 12 20:11:59 2007
++++ ./gl_local.h Thu Jul 12 20:27:57 2007
+@@ -299,6 +299,9 @@
+ extern lpMTexFUNC qglMultiTexCoord2f;
+ extern lpSelTexFUNC qglActiveTexture;
+
++extern PFNGLXGETVIDEOSYNCSGIPROC qglXGetVideoSyncSGI;
++extern PFNGLXWAITVIDEOSYNCSGIPROC qglXWaitVideoSyncSGI;
++
+ extern float gldepthmin, gldepthmax;
+ extern byte color_white[4], color_black[4];
+ extern qbool gl_mtexable;
diff --git a/games/ezquake/files/patch-sys_linux.c b/games/ezquake/files/patch-sys_linux.c
index abe36a55b88f..ceef7b379869 100644
--- a/games/ezquake/files/patch-sys_linux.c
+++ b/games/ezquake/files/patch-sys_linux.c
@@ -1,6 +1,6 @@
---- ./sys_linux.c.orig Mon Mar 20 10:51:28 2006
-+++ ./sys_linux.c Tue Aug 29 20:59:12 2006
-@@ -35,7 +35,6 @@
+--- ./sys_linux.c.orig Thu Jul 12 20:11:59 2007
++++ ./sys_linux.c Thu Jul 12 20:12:00 2007
+@@ -36,7 +36,6 @@
#include <ctype.h>
#include <sys/wait.h>
#include <sys/mman.h>
@@ -8,7 +8,7 @@
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <sched.h>
-@@ -256,6 +255,7 @@
+@@ -257,6 +256,7 @@
if (COM_CheckParm("-nostdout"))
sys_nostdout.value = 1;
@@ -16,11 +16,11 @@
/* also check for -rtctimer before Host_Init is called */
if (COM_CheckParm("-rtctimer")) {
int retval;
-@@ -292,6 +292,7 @@
+@@ -293,6 +293,7 @@
Com_Printf("RTC Timer Enabled.\n");
}
+#endif
- #if id386
+ #ifdef id386
Sys_SetFPCW();
diff --git a/games/ezquake/files/patch-vid_common_gl.c b/games/ezquake/files/patch-vid_common_gl.c
new file mode 100644
index 000000000000..325ea0b91dee
--- /dev/null
+++ b/games/ezquake/files/patch-vid_common_gl.c
@@ -0,0 +1,22 @@
+--- ./vid_common_gl.c.orig Thu Jul 12 20:11:59 2007
++++ ./vid_common_gl.c Thu Jul 12 20:29:47 2007
+@@ -51,6 +51,9 @@
+ lpMTexFUNC qglMultiTexCoord2f = NULL;
+ lpSelTexFUNC qglActiveTexture = NULL;
+
++PFNGLXGETVIDEOSYNCSGIPROC qglXGetVideoSyncSGI = NULL;
++PFNGLXWAITVIDEOSYNCSGIPROC qglXWaitVideoSyncSGI = NULL;
++
+ qbool gl_combine = false;
+
+ qbool gl_add_ext = false;
+@@ -175,6 +178,9 @@
+ Cvar_Register (&gl_strings);
+ Cvar_ForceSet (&gl_strings, va("GL_VENDOR: %s\nGL_RENDERER: %s\n"
+ "GL_VERSION: %s\nGL_EXTENSIONS: %s", gl_vendor, gl_renderer, gl_version, gl_extensions));
++
++ qglXGetVideoSyncSGI = GL_GetProcAddress("glXGetVideoSyncSGI");
++ qglXWaitVideoSyncSGI = GL_GetProcAddress("glXWaitVideoSyncSGI");
+
+ #ifndef __APPLE__
+ glClearColor (1,0,0,0);
diff --git a/games/ezquake/files/patch-vid_glx.c b/games/ezquake/files/patch-vid_glx.c
new file mode 100644
index 000000000000..3335b5438568
--- /dev/null
+++ b/games/ezquake/files/patch-vid_glx.c
@@ -0,0 +1,25 @@
+--- ./vid_glx.c.orig Thu Jul 12 20:11:59 2007
++++ ./vid_glx.c Thu Jul 12 20:26:42 2007
+@@ -138,9 +138,6 @@
+
+ const char *glx_extensions=NULL;
+
+-extern int glXGetVideoSyncSGI (unsigned int *);
+-extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
+-
+ cvar_t vid_vsync = {"vid_vsync", "0"};
+
+ void GL_Init_GLX(void);
+@@ -567,10 +564,10 @@
+ double sanity_time = Sys_DoubleTime() + 0.05;
+ unsigned int count, latest;
+
+- glXGetVideoSyncSGI(&count);
++ qglXGetVideoSyncSGI(&count);
+
+ while(Sys_DoubleTime() < sanity_time) {
+- glXGetVideoSyncSGI(&latest);
++ qglXGetVideoSyncSGI(&latest);
+
+ if(latest != count) {
+ break;