Don't force builtin GL libraries, this breaks with modular Xorg.

Add DragonFly support.
This commit is contained in:
joerg 2007-02-19 19:16:09 +00:00
parent 235d22d7dd
commit 73c50fd1d5
5 changed files with 75 additions and 5 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.23 2006/06/12 16:28:10 wiz Exp $
# $NetBSD: Makefile,v 1.24 2007/02/19 19:16:09 joerg Exp $
#
DISTNAME= quake2-0.3
@ -15,9 +15,6 @@ USE_TOOLS+= gmake
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
USE_BUILTIN.glu= yes
USE_BUILTIN.MesaLib= yes
BUILDLINK_TRANSFORM+= rm:-Werror
CONFIGURE_ARGS+= --program-transform-name='s/^quake2$$/quake2forge/'
@ -44,6 +41,10 @@ CONFIGURE_ENV+= ac_cv_header_sys_audioio_h=no
.endif
.include "../../devel/SDL/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXxf86dga/buildlink3.mk"
.include "../../x11/libXxf86vm/buildlink3.mk"
.include "../../x11/xextproto/buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,5 +1,8 @@
$NetBSD: distinfo,v 1.5 2005/08/10 01:33:48 xtraeme Exp $
$NetBSD: distinfo,v 1.6 2007/02/19 19:16:09 joerg Exp $
SHA1 (quake2-0.3.tar.gz) = 9daf646b02799de01aa77824f648ef6c5f66b3ec
RMD160 (quake2-0.3.tar.gz) = 81b6abdf83782d1bd227df9e4511aa25c673b5bb
Size (quake2-0.3.tar.gz) = 1757285 bytes
SHA1 (patch-aa) = c4eb2ebc6fa26701b011ecde54efb4b8f2b4bf8a
SHA1 (patch-ab) = 1a7629b5dbcf75ab74d635a3c7e0d183e21feec7
SHA1 (patch-ac) = e59e7556eef754cdba377b6d0274071f30686e08

View file

@ -0,0 +1,40 @@
$NetBSD: patch-aa,v 1.3 2007/02/19 19:16:09 joerg Exp $
--- src/qgl.c.orig 2007-02-19 18:37:03.000000000 +0000
+++ src/qgl.c
@@ -70,7 +70,7 @@ static FILE * log_fp = NULL;
#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(__DragonFly__)
/*
//FX Mesa Functions
fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
@@ -3020,7 +3020,7 @@ void QGL_Shutdown( void )
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(__DragonFly__)
/*
qfxMesaCreateContext = NULL;
qfxMesaCreateBestContext = NULL;
@@ -3041,7 +3041,7 @@ void QGL_Shutdown( void )
}
/* 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(__DragonFly__)
#define GPA( a ) dlsym( glw_state.OpenGLLib, a )
void *qwglGetProcAddress(char *symbol)
@@ -3444,7 +3444,7 @@ qboolean QGL_Init( const char *dllname )
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(__DragonFly__)
/*
qfxMesaCreateContext = GPA("fxMesaCreateContext");
qfxMesaCreateBestContext = GPA("fxMesaCreateBestContext");

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.3 2007/02/19 19:16:09 joerg Exp $
--- src/q_sh.c.orig 2007-02-19 18:37:48.000000000 +0000
+++ src/q_sh.c
@@ -54,7 +54,7 @@ void *Hunk_Begin (int maxsize)
/* FIXME: clean all this up into configure tests for mmap, MAP_ANONYMOUS and malloc */
#if defined(__linux__)
membase = mmap(0, maxhunksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
-#elif defined(__FreeBSD__) || defined(__bsd__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__bsd__) || defined(__NetBSD__) || defined(__DragonFly__)
membase = mmap(0, maxhunksize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
#elif defined(__sun__) || defined(__sgi)
membase = malloc(maxhunksize);

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.1 2007/02/19 19:16:09 joerg Exp $
--- src/glw.h.orig 2007-02-19 18:38:55.000000000 +0000
+++ src/glw.h
@@ -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 (__sun__) || defined(__DragonFly__)
typedef struct
{