with the following patch, you can use the opengl renderer. now it also
works on amd64 (and probably most other places) if you don't use the soft
renderer.
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/quake2/Makefile,v
retrieving revision 1.7
diff -u -u -r1.7 Makefile
--- Makefile 15 Sep 2007 18:01:02 -0000 1.7
+++ Makefile 24 Oct 2007 05:02:19 -0000
@@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.7 2007/09/15 18:01:02 simon Exp $
-ONLY_FOR_ARCHS= i386
+#ONLY_FOR_ARCHS= i386
SHARED_ONLY= Yes
COMMENT= first person shooter
@@ -30,6 +30,7 @@
USE_LIBTOOL= Yes
LIBTOOL_FLAGS= --tag=disable-static
CONFIGURE_STYLE= gnu
+CONFIGURE_ARGS+= --with-opengl=/usr/X11R6
NO_REGRESS= Yes
CFLAGS+= -pthread -g
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/quake2/pkg/PLIST,v
retrieving revision 1.2
diff -u -u -r1.2 PLIST
--- pkg/PLIST 7 Apr 2007 12:13:41 -0000 1.2
+++ pkg/PLIST 24 Oct 2007 05:02:19 -0000
@@ -7,6 +7,10 @@
lib/quake2/ctf/
lib/quake2/ctf/game.la
lib/quake2/ctf/game.so
+lib/quake2/ref_glx.la
+lib/quake2/ref_glx.so
+lib/quake2/ref_sdlgl.la
+lib/quake2/ref_sdlgl.so
lib/quake2/ref_softsdl.la
lib/quake2/ref_softsdl.so
lib/quake2/ref_softx.la
--- /dev/null Tue Oct 23 22:02:47 2007
+++ patches/patch-configure Tue Oct 23 21:49:37 2007
@@ -0,0 +1,11 @@
+--- configure.orig Tue Oct 23 21:36:09 2007
++++ configure Tue Oct 23 21:35:28 2007
+@@ -21176,7 +21176,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lGL $OPENGL_LIBS
++LIBS="-lGL -lm $OPENGL_LIBS
+ $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
--- /dev/null Tue Oct 23 22:02:59 2007
+++ patches/patch-src_glw_h Tue Oct 23 21:43:28 2007
@@ -0,0 +1,11 @@
+--- src/glw.h.orig Tue Oct 23 21:38:51 2007
++++ src/glw.h Tue Oct 23 21:39:04 2007
+@@ -30,7 +30,7 @@
+ #ifndef __GLW_H__
+ #define __GLW_H__
+
+-#if defined (__linux__) || defined (__bsd__) || defined (__sgi) || defined
(__FreeBSD__) || defined (__NetBSD__) || defined (__sun__)
++#if defined (__linux__) || defined (__bsd__) || defined (__sgi) || defined
(__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined
(__sun__)
+
+ typedef struct
+ {
--- /dev/null Tue Oct 23 22:03:06 2007
+++ patches/patch-src_qgl_c Tue Oct 23 21:42:49 2007
@@ -0,0 +1,38 @@
+--- src/qgl.c.orig Tue Oct 23 21:41:18 2007
++++ src/qgl.c Tue Oct 23 21:41:47 2007
+@@ -70,7 +70,7 @@
+ #endif
+
+ /* merged in from qgl_bsd.c -- jaq */
+-#if defined(__bsd__) || defined(__FreeBSD__) || defined(__NetBSD__) ||
defined(__sun__)
++#if defined(__bsd__) || defined(__FreeBSD__) || defined(__NetBSD__) ||
defined(__sun__) || defined (__OpenBSD__)
+ /*
+ //FX Mesa Functions
+ fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t,
GrScreenRefresh_t, const GLint attribList[]);
+@@ -3020,7 +3020,7 @@
+ qglVertexPointer = NULL;
+ qglViewport = NULL;
+ /* merged in from qgl_bsd.c -- jaq */
+-#if defined(__bsd__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(__bsd__) || defined(__FreeBSD__) || defined(__NetBSD__) ||
defined (__OpenBSD__)
+ /*
+ qfxMesaCreateContext = NULL;
+ qfxMesaCreateBestContext = NULL;
+@@ -3041,7 +3041,7 @@
+ }
+
+ /* merged in from qgl_bsd.c -- jaq */
+-#if defined(__linux__) || defined (__FreeBSD__) || defined(__NetBSD__) ||
defined (__sun__)
++#if defined(__linux__) || defined (__FreeBSD__) || defined(__NetBSD__) ||
defined (__sun__) || defined (__OpenBSD__)
+ #define GPA( a ) dlsym( glw_state.OpenGLLib, a )
+
+ void *qwglGetProcAddress(char *symbol)
+@@ -3444,7 +3444,7 @@
+ qglVertexPointer = dllVertexPointer = GPA(
"glVertexPointer" );
+ qglViewport = dllViewport = GPA(
"glViewport" );
+ /* merged in from qgl_bsd.c -- jaq */
+-#if defined(__bsd__) || defined(__FreeBSD__) || defined(__NetBSD__) ||
defined(__sun__)
++#if defined(__bsd__) || defined(__FreeBSD__) || defined(__NetBSD__) ||
defined(__sun__) || defined (__OpenBSD__)
+ /*
+ qfxMesaCreateContext = GPA("fxMesaCreateContext");
+ qfxMesaCreateBestContext = GPA("fxMesaCreateBestContext");