aboutsummaryrefslogtreecommitdiffstats
path: root/games/q2pro
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-02-05 10:51:49 +0800
committeralepulver <alepulver@FreeBSD.org>2007-02-05 10:51:49 +0800
commit7c26f7daf8b91d64772f8b48f37b20f8c6fa270b (patch)
tree23294980f0aadf2af1947e65555ae822fff5c554 /games/q2pro
parent252713a7633135bc09fa0122349c2ddce9c2a187 (diff)
downloadfreebsd-ports-gnome-7c26f7daf8b91d64772f8b48f37b20f8c6fa270b.tar.gz
freebsd-ports-gnome-7c26f7daf8b91d64772f8b48f37b20f8c6fa270b.tar.zst
freebsd-ports-gnome-7c26f7daf8b91d64772f8b48f37b20f8c6fa270b.zip
- Update to SVN revision 142.
- Add '-fPIC' compiler flag to a source file that is shared between both executables and libraries [1]. Reported by: pointyhat [1]
Diffstat (limited to 'games/q2pro')
-rw-r--r--games/q2pro/Makefile2
-rw-r--r--games/q2pro/distinfo6
-rw-r--r--games/q2pro/files/patch-build__client.mk15
-rw-r--r--games/q2pro/files/patch-build__post.mk14
-rw-r--r--games/q2pro/files/patch-build__pre.mk62
-rw-r--r--games/q2pro/files/patch-build__ref_newgl.mk14
-rw-r--r--games/q2pro/files/patch-build__server.mk13
-rw-r--r--games/q2pro/files/patch-include__net.h11
-rw-r--r--games/q2pro/files/patch-include__q_shared.h23
-rw-r--r--games/q2pro/files/patch-include__qgl_api.h11
-rw-r--r--games/q2pro/files/patch-include__qgl_local.h11
-rw-r--r--games/q2pro/files/patch-ref_shared__qgl.c11
-rw-r--r--games/q2pro/files/patch-source__cl_main.c11
-rw-r--r--games/q2pro/files/patch-source__files.c155
-rw-r--r--games/q2pro/files/patch-source__in_linux.c11
-rw-r--r--games/q2pro/files/patch-source__snd_dma.c20
-rw-r--r--games/q2pro/files/patch-source__snd_linux.c11
-rw-r--r--games/q2pro/files/patch-source__sys_unix.c77
18 files changed, 156 insertions, 322 deletions
diff --git a/games/q2pro/Makefile b/games/q2pro/Makefile
index aae05a0432b8..a6f22a844e7a 100644
--- a/games/q2pro/Makefile
+++ b/games/q2pro/Makefile
@@ -31,7 +31,7 @@ OPTIONS= CLIENT "Build client" on \
MAKE_ENV= LIBDIR="${LIBDIR}"
PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
-SVN_REV= 131
+SVN_REV= 142
LIBDIR= ${PREFIX}/lib/${PORTNAME}
.include "${.CURDIR}/../quake2-data/Makefile.include"
diff --git a/games/q2pro/distinfo b/games/q2pro/distinfo
index 8dd37d890b25..88e8987cb90a 100644
--- a/games/q2pro/distinfo
+++ b/games/q2pro/distinfo
@@ -1,3 +1,3 @@
-MD5 (q2pro-131.tar.bz2) = 8defcd63e025f4cbade4a93c63d98448
-SHA256 (q2pro-131.tar.bz2) = 8aa747f533c05ac9286db84c71b8219d88486890095d20581450a30dba8a1bea
-SIZE (q2pro-131.tar.bz2) = 1536784
+MD5 (q2pro-142.tar.bz2) = 435dba5fba4544198bb8201c7b5f0e22
+SHA256 (q2pro-142.tar.bz2) = 8549752b1926a8da840049aa0aac218392821c6819b78eec893155281c1513b3
+SIZE (q2pro-142.tar.bz2) = 1391352
diff --git a/games/q2pro/files/patch-build__client.mk b/games/q2pro/files/patch-build__client.mk
index fe098a95a368..5a0e5905fdeb 100644
--- a/games/q2pro/files/patch-build__client.mk
+++ b/games/q2pro/files/patch-build__client.mk
@@ -1,17 +1,18 @@
---- build/client.mk.orig Sat Jan 20 12:40:15 2007
-+++ build/client.mk Sat Jan 20 12:40:20 2007
-@@ -41,8 +41,13 @@
- # linux
- #
+--- ./build/client.mk.orig Sun Feb 4 15:31:20 2007
++++ ./build/client.mk Sun Feb 4 16:13:09 2007
+@@ -27,9 +27,14 @@
+ RESFILES_WIN32 += q2.rc
+
SRCFILES_LINUX = sys_unix.c snd_linux.c cd_linux.c vid_sdl.c in_linux.c
+ifdef USE_X86_ASM
ASMFILES_LINUX = snd_mixa.s
--LDFLAGS_LINUX += -lz -ldl -lSDL
+else
+SRCFILES_LINUX += snd_mix.c
+CFLAGS_LINUX += -DC_ONLY
+endif
-+LDFLAGS_LINUX += -lz `sdl-config --libs`
+ CFLAGS_LINUX += $(CFLAGS_SDL)
+-LDFLAGS_LINUX += -ldl -lX11 $(LDFLAGS_SDL)
++LDFLAGS_LINUX += -lX11 $(LDFLAGS_SDL)
include ../../post.mk
diff --git a/games/q2pro/files/patch-build__post.mk b/games/q2pro/files/patch-build__post.mk
new file mode 100644
index 000000000000..d0601d7713ec
--- /dev/null
+++ b/games/q2pro/files/patch-build__post.mk
@@ -0,0 +1,14 @@
+--- build/post.mk.orig Sun Feb 4 19:51:48 2007
++++ build/post.mk Sun Feb 4 19:52:55 2007
+@@ -33,7 +33,10 @@
+
+ %.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+-
++
++q_shared.o: q_shared.c
++ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
++
+ %.o: %.s
+ $(CC) $(CFLAGS) -x assembler-with-cpp -c -o $@ $<
+
diff --git a/games/q2pro/files/patch-build__pre.mk b/games/q2pro/files/patch-build__pre.mk
index fecf8a95745e..3ea555471f6c 100644
--- a/games/q2pro/files/patch-build__pre.mk
+++ b/games/q2pro/files/patch-build__pre.mk
@@ -1,49 +1,17 @@
---- ./build/pre.mk.orig Mon Dec 25 17:07:02 2006
-+++ ./build/pre.mk Mon Dec 25 17:07:02 2006
-@@ -5,29 +5,28 @@
- include ../../detect.mk
+--- build/pre.mk.orig Sun Feb 4 16:13:21 2007
++++ build/pre.mk Sun Feb 4 16:27:54 2007
+@@ -48,10 +48,10 @@
+ ASMFILES_WIN32=#blank
+ VPATH_WIN32=$(RCDIR)
- ifdef build-prefix
--CC = $(build-prefix)-gcc
-+CC ?= $(build-prefix)-gcc
- WINDRES = $(build-prefix)-windres
- else
--CC = gcc
-+CC ?= gcc
- WINDRES = windres
- endif
+-DATADIR?=/usr/share/games/quake2
+-LIBDIR?=/usr/lib/games/quake2
+-CFLAGS_LINUX=-DDATADIR='"$(DATADIR)"' -DLIBDIR='"$(LIBDIR)"'
+-LDFLAGS_LINUX=#blank
++DATADIR?=$(Q2DIR)
++LIBDIR?=$(PREFIX)/lib/q2pro
++CFLAGS_LINUX=-I$(LOCALBASE)/include -I$(X11BASE)/include -DDATADIR='"$(DATADIR)"' -DLIBDIR='"$(LIBDIR)"'
++LDFLAGS_LINUX=-L$(LOCALBASE)/lib -L$(X11BASE)/lib
+ SRCFILES_LINUX=#blank
+ ASMFILES_LINUX=#blank
- INSTALLDIR = $(CURDIR)/../../..
- OUTPUTDIR = $(CURDIR)/..
- INCLUDEDIR = $(INSTALLDIR)/include
--LIBDIR = #blank
-
- VPATH = $(INSTALLDIR)/asm \
- $(INSTALLDIR)/shared \
- $(INSTALLDIR)/source
-
- ifdef debug
--CFLAGS = -g
--LDFLAGS = -g
-+CFLAGS += -g
-+LDFLAGS += -g
- else
--#CFLAGS = -march=i686 -msse2 -mfpmath=sse -O2 -fno-strict-aliasing -DNDEBUG
--CFLAGS = -march=i386 -ffloat-store -O2 -fno-strict-aliasing -DNDEBUG
--LDFLAGS = -s
-+#CFLAGS += -march=i686 -msse2 -mfpmath=sse -O2 -fno-strict-aliasing -DNDEBUG
-+CFLAGS += -ffloat-store -O2 -fno-strict-aliasing -DNDEBUG
-+LDFLAGS += -s
- endif
-
- CFLAGS += -I$(INCLUDEDIR) \
-@@ -61,7 +60,7 @@
- SRCFILES_WINCE = #blank
- ASMFILES_WINCE = #blank
-
--CFLAGS_LINUX = #blank
--LDFLAGS_LINUX = #blank
-+CFLAGS_LINUX = -I$(LOCALBASE)/include -I$(X11BASE)/include -DDATADIR='"$(Q2DIR)"' -DLIBDIR='"$(LIBDIR)"'
-+LDFLAGS_LINUX = -L$(LOCALBASE)/lib -L$(X11BASE)/lib
- SRCFILES_LINUX = #blank
- ASMFILES_LINUX = #blank
diff --git a/games/q2pro/files/patch-build__ref_newgl.mk b/games/q2pro/files/patch-build__ref_newgl.mk
deleted file mode 100644
index 6d0c290960ec..000000000000
--- a/games/q2pro/files/patch-build__ref_newgl.mk
+++ /dev/null
@@ -1,14 +0,0 @@
---- build/ref_newgl.mk.orig Mon Jan 15 12:13:34 2007
-+++ build/ref_newgl.mk Mon Jan 15 12:20:31 2007
-@@ -9,9 +9,9 @@
- VPATH += $(INSTALLDIR)/ref_newgl \
- $(INSTALLDIR)/ref_shared
-
--LDFLAGS += -lm -ljpeg -shared -fPIC
-+LDFLAGS += -lm -ljpeg -shared
- CFLAGS += -DOPENGL_RENDERER -DTRUECOLOR_RENDERER -DUSE_LIBJPEG
--CFLAGS_LINUX += -DUSE_LIBPNG
-+CFLAGS_LINUX += -DUSE_LIBPNG -fPIC
- LDFLAGS_LINUX += -lpng
-
- ifeq (win32,$(TARGETOS))
diff --git a/games/q2pro/files/patch-build__server.mk b/games/q2pro/files/patch-build__server.mk
index 5699e2037a3c..5b4e60882a14 100644
--- a/games/q2pro/files/patch-build__server.mk
+++ b/games/q2pro/files/patch-build__server.mk
@@ -1,11 +1,10 @@
---- ./build/server.mk.orig Mon Dec 25 17:07:02 2006
-+++ ./build/server.mk Mon Dec 25 17:07:02 2006
-@@ -22,7 +22,7 @@
- LDFLAGS_WIN32 += -mconsole -lws2_32 -lwinmm -ladvapi32
+--- build/server.mk.orig Sun Feb 4 16:29:23 2007
++++ build/server.mk Sun Feb 4 16:30:00 2007
+@@ -22,7 +22,6 @@
+ RESFLAGS_WIN32+=-DDEDICATED_ONLY
- SRCFILES_LINUX += sys_unix.c
--LDFLAGS_LINUX += -ldl
-+LDFLAGS_LINUX += #
+ SRCFILES_LINUX+=sys_unix.c
+-LDFLAGS_LINUX+=-ldl
include ../../post.mk
diff --git a/games/q2pro/files/patch-include__net.h b/games/q2pro/files/patch-include__net.h
deleted file mode 100644
index 7bdd52846bc1..000000000000
--- a/games/q2pro/files/patch-include__net.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./include/net.h.orig Mon Dec 25 17:07:02 2006
-+++ ./include/net.h Mon Dec 25 17:07:02 2006
-@@ -24,7 +24,7 @@
- #include <windows.h>
- #endif
- #include <winsock2.h>
--#elif defined( __linux__ )
-+#elif defined( __unix__ )
- #include <unistd.h>
- #include <sys/socket.h>
- #include <sys/time.h>
diff --git a/games/q2pro/files/patch-include__q_shared.h b/games/q2pro/files/patch-include__q_shared.h
deleted file mode 100644
index 6a5f1b1a2860..000000000000
--- a/games/q2pro/files/patch-include__q_shared.h
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./include/q_shared.h.orig Mon Dec 25 17:07:02 2006
-+++ ./include/q_shared.h Mon Dec 25 17:07:02 2006
-@@ -87,7 +87,19 @@
- #define CPUSTRING "Unknown"
- #endif
-
--#elif( defined __sun__ ) /* __linux__ */
-+#elif( defined __FreeBSD__ ) /* __linux__ */
-+
-+#define BUILDSTRING "FreeBSD"
-+
-+#ifdef __i386__
-+#define CPUSTRING "i386"
-+#elif defined __alpha__
-+#define CPUSTRING "axp"
-+#else
-+#define CPUSTRING "Unknown"
-+#endif
-+
-+#elif( defined __sun__ ) /* __FreeBSD__ */
-
- #define BUILDSTRING "Solaris"
-
diff --git a/games/q2pro/files/patch-include__qgl_api.h b/games/q2pro/files/patch-include__qgl_api.h
deleted file mode 100644
index ac63e362c1c0..000000000000
--- a/games/q2pro/files/patch-include__qgl_api.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./include/qgl_api.h.orig Mon Dec 25 17:07:02 2006
-+++ ./include/qgl_api.h Mon Dec 25 17:07:02 2006
-@@ -392,7 +392,7 @@
- typedef BOOL ( WINAPI * PFNWGLSWAPINTERWALEXTPROC )( int );
- extern PROC ( WINAPI * qwglGetProcAddress )( LPCSTR );
- extern BOOL ( WINAPI * qwglSwapIntervalEXT )( int interval );
--#elif ( defined __linux__ )
-+#elif ( defined __FreeBSD__ )
- // local function in dll
- extern void *qwglGetProcAddress( const char *symbol );
- extern void (*qgl3DfxSetPaletteEXT)(GLuint *);
diff --git a/games/q2pro/files/patch-include__qgl_local.h b/games/q2pro/files/patch-include__qgl_local.h
deleted file mode 100644
index f811a348da65..000000000000
--- a/games/q2pro/files/patch-include__qgl_local.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./include/qgl_local.h.orig Mon Dec 25 17:07:02 2006
-+++ ./include/qgl_local.h Mon Dec 25 17:07:02 2006
-@@ -3,7 +3,7 @@
- #include <windows.h>
- #include <GL/gl.h>
- #include <GL/glext.h>
--#elif (defined __linux__)
-+#elif (defined __unix__)
- #include <GL/gl.h>
- #else
- #error Unknown Target OS
diff --git a/games/q2pro/files/patch-ref_shared__qgl.c b/games/q2pro/files/patch-ref_shared__qgl.c
deleted file mode 100644
index e28138446141..000000000000
--- a/games/q2pro/files/patch-ref_shared__qgl.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./ref_shared/qgl.c.orig Mon Dec 25 17:07:02 2006
-+++ ./ref_shared/qgl.c Mon Dec 25 17:07:03 2006
-@@ -392,7 +392,7 @@
- BOOL ( WINAPI * qwglSwapIntervalEXT )( int interval );
- #endif
-
--#ifdef __linux
-+#ifdef __unix__
- void *qwglGetProcAddress( const char *symbol ) { return video.GetProcAddr( symbol ); }
- void (*qgl3DfxSetPaletteEXT)(GLuint *);
- #endif
diff --git a/games/q2pro/files/patch-source__cl_main.c b/games/q2pro/files/patch-source__cl_main.c
deleted file mode 100644
index cff10c9d1a2c..000000000000
--- a/games/q2pro/files/patch-source__cl_main.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./source/cl_main.c.orig Mon Dec 25 17:07:02 2006
-+++ ./source/cl_main.c Mon Dec 25 17:07:03 2006
-@@ -2637,7 +2637,7 @@
-
- // all archived variables will now be loaded
-
--#if defined __linux__ || defined __sgi
-+#if defined __unix__ || defined __sgi
- S_Init();
- CL_InitRefresh();
- #else
diff --git a/games/q2pro/files/patch-source__files.c b/games/q2pro/files/patch-source__files.c
index 06ede9193136..b10e20f9624c 100644
--- a/games/q2pro/files/patch-source__files.c
+++ b/games/q2pro/files/patch-source__files.c
@@ -1,96 +1,119 @@
---- ./source/files.c.orig Mon Dec 25 17:07:02 2006
-+++ ./source/files.c Mon Dec 25 17:09:49 2006
-@@ -413,6 +413,7 @@
- char *ext;
+--- source/files.c.orig Tue Jan 30 18:07:53 2007
++++ source/files.c Sun Feb 4 19:31:21 2007
+@@ -1542,6 +1542,22 @@
- switch( file->mode & FS_PATH_MASK ) {
-+ /*
- case FS_PATH_INIT:
- Com_sprintf( file->fullpath, sizeof( file->fullpath ),
- "%s/" INITDIRNAME "/%s", fs_basedir->string, file->name );
-@@ -421,6 +422,7 @@
- Com_sprintf( file->fullpath, sizeof( file->fullpath ),
- "%s/" BASEDIRNAME "/%s", fs_basedir->string, file->name );
- break;
-+ */
- default:
- Com_sprintf( file->fullpath, sizeof( file->fullpath ),
- "%s/%s", fs_gamedir, file->name );
-@@ -1495,7 +1497,7 @@
+ }
+
++#ifdef __unix__
++/*
++================
++FS_AddHomeAsGameDirectory
++
++Adds ~/.q2pro/<dir> as a game directory.
++================
++*/
++void FS_AddHomeAsGameDirectory(char *dir)
++{
++ char *homedir; /* Home directory. */
++
++ if ((homedir = getenv("HOME")) != NULL)
++ FS_AddGameDirectory("%s/"HOMEDIRNAME"/%s", homedir, dir);
++}
++#endif
+
+ /*
+ =================
+@@ -1569,7 +1585,7 @@
#ifdef _WIN32
Com_sprintf( path, sizeof( path ), "%s/%s/gamex86.dll", fs_basedir->string, dirlist[i] );
#else
-- Com_sprintf( path, sizeof( path ), "%s/%s/gamex86.so", fs_basedir->string, dirlist[i] );
+- Com_sprintf( path, sizeof( path ), "%s/%s/gamei386.so", fs_basedir->string, dirlist[i] );
+ Com_sprintf( path, sizeof( path ), "%s/%s/game.so", fs_basedir->string, dirlist[i] );
#endif
- Com_ReplaceSeparators( path, PATH_SEP_CHAR );
-@@ -2153,15 +2155,35 @@
- ================
+ if( !( fp = fopen( path, "rb" ) ) ) {
+@@ -2358,21 +2374,15 @@
*/
static void FS_DefaultGamedir( void ) {
-+ /*
- Com_sprintf( fs_gamedir, sizeof( fs_gamedir ), "%s/"BASEDIRNAME, fs_basedir->string );
+ #ifdef __unix__
+- char *homedir = getenv( "HOME" );
+-
+- if( homedir ) {
+- FS_AddGameDirectory( "%s/"HOMEDIRNAME"/"BASEDIRNAME, homedir );
+- } else
++ FS_AddHomeAsGameDirectory(BASEDIRNAME);
+ #else
+- {
+ /* write to baseq2pro on Windows */
+ Com_sprintf( fs_gamedir, sizeof( fs_gamedir ), "%s/"INITDIRNAME,
+ fs_basedir->string );
+- }
+-#endif
Cvar_Set( "game", "" );
Cvar_Set( "gamedir", "" );
-+ */
++#endif
}
- /*
- ================
-+FS_AddHomeAsGameDirectory
-+
-+Adds ~/.q2pro/<dir> as a game directory.
-+================
-+*/
-+void FS_AddHomeAsGameDirectory(char *dir)
-+{
-+ char gdir[MAX_OSPATH]; /* Game directory. */
-+ char *homedir; /* Home directory. */
-+
-+ if ((homedir = getenv("HOME")) != NULL) {
-+ Com_sprintf(gdir, sizeof(gdir), "%s/.q2pro/%s", homedir, dir);
-+ FS_AddGameDirectory(gdir);
-+ }
-+}
-+
-+/*
-+================
- FS_SetupGamedir
-
- Sets the gamedir and path to a different directory.
-@@ -2196,7 +2218,10 @@
+@@ -2410,18 +2420,11 @@
if( fs_cddir->string[0] )
- FS_AddGameDirectory( va( "%s/%s", fs_cddir->string, fs_game->string ) );
+ FS_AddGameDirectory( "%s/%s", fs_cddir->string, fs_game->string );
-+ FS_AddGameDirectory(va("%s/%s", DATADIR, fs_game->string));
-+ FS_AddGameDirectory(va("%s/%s", LIBDIR, fs_game->string));
- FS_AddGameDirectory( va( "%s/%s", fs_basedir->string, fs_game->string ) );
++ FS_AddGameDirectory("%s/%s", DATADIR, fs_game->string);
++ FS_AddGameDirectory("%s/%s", LIBDIR, fs_game->string);
+ FS_AddGameDirectory( "%s/%s", fs_basedir->string, fs_game->string );
+ FS_AddHomeAsGameDirectory(fs_game->string);
+-#ifdef __unix__
+- {
+- char *homedir = getenv( "HOME" );
+-
+- if( homedir ) {
+- FS_AddGameDirectory( "%s/"HOMEDIRNAME"/%s",
+- homedir, fs_game->string );
+- }
+- }
+-#endif
}
-@@ -2339,7 +2364,10 @@
- //
- // start up with baseq2pro by default
- //
-+ FS_AddGameDirectory(va("%s/"INITDIRNAME, DATADIR));
-+ FS_AddGameDirectory(va("%s/"INITDIRNAME, LIBDIR));
- FS_AddGameDirectory( va( "%s/"INITDIRNAME, fs_basedir->string ) );
-+ FS_AddHomeAsGameDirectory(INITDIRNAME);
+ qboolean FS_SafeToRestart( void ) {
+@@ -2518,7 +2521,6 @@
+ */
+ void FS_Init( void ) {
+ int startTime, i;
+- char *base;
+
+ startTime = Sys_Milliseconds();
+@@ -2554,13 +2556,7 @@
+ // allows the game to run from outside the data tree
+ //
- fs_init_searchpaths = fs_searchpaths;
-@@ -2363,7 +2391,10 @@
+-#ifdef __unix__
+- base = DATADIR;
+-#else
+- base = Sys_GetCurrentDirectory();
+-#endif
+-
+- fs_basedir = Cvar_Get( "basedir", base, CVAR_NOSET );
++ fs_basedir = Cvar_Get( "basedir", Sys_GetCurrentDirectory(), CVAR_NOSET );
+
+ /* strip trailing slash */
+ if( fs_basedir->string[0] ) {
+@@ -2591,8 +2587,15 @@
//
// start up with baseq2 by default
//
-+ FS_AddGameDirectory(va("%s/"BASEDIRNAME, DATADIR));
-+ FS_AddGameDirectory(va("%s/"BASEDIRNAME, LIBDIR));
- FS_AddGameDirectory( va( "%s/"BASEDIRNAME, fs_basedir->string ) );
++ FS_AddGameDirectory("%s/"BASEDIRNAME, DATADIR);
++ FS_AddGameDirectory("%s/"BASEDIRNAME, LIBDIR);
+ FS_AddGameDirectory( "%s/"BASEDIRNAME, fs_basedir->string );
+ FS_AddHomeAsGameDirectory(BASEDIRNAME);
++
++ FS_AddGameDirectory("%s/"INITDIRNAME, DATADIR);
++ FS_AddGameDirectory("%s/"INITDIRNAME, LIBDIR);
+ FS_AddGameDirectory( "%s/"INITDIRNAME, fs_basedir->string );
++ FS_AddHomeAsGameDirectory(INITDIRNAME);
fs_base_searchpaths = fs_searchpaths;
diff --git a/games/q2pro/files/patch-source__in_linux.c b/games/q2pro/files/patch-source__in_linux.c
index 3bfe7c5e3818..ac30d68a9db8 100644
--- a/games/q2pro/files/patch-source__in_linux.c
+++ b/games/q2pro/files/patch-source__in_linux.c
@@ -1,5 +1,5 @@
---- ./source/in_linux.c.orig Mon Dec 25 17:07:02 2006
-+++ ./source/in_linux.c Mon Dec 25 17:07:03 2006
+--- source/in_linux.c.orig Sun Jan 28 20:57:44 2007
++++ source/in_linux.c Sun Feb 4 19:35:14 2007
@@ -27,10 +27,14 @@
#include <sys/ioctl.h>
#include <unistd.h>
@@ -10,7 +10,7 @@
#include <errno.h>
+#ifdef __linux__
- #include "SDL/SDL.h"
+ #include <SDL.h>
+#endif
static cvar_t *in_device;
@@ -23,10 +23,9 @@
#define MAX_EVENTS 64
#define EVENT_SIZE sizeof( struct input_event )
-@@ -223,5 +228,4 @@
- api->Frame = Evdev_SendMouseMoveEvents;
+@@ -224,4 +229,4 @@
api->ClearStates = Evdev_ClearMouseStates;
}
--
+
-
+#endif
diff --git a/games/q2pro/files/patch-source__snd_dma.c b/games/q2pro/files/patch-source__snd_dma.c
deleted file mode 100644
index 76c097bf95a6..000000000000
--- a/games/q2pro/files/patch-source__snd_dma.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./source/snd_dma.c.orig Mon Dec 25 17:07:02 2006
-+++ ./source/snd_dma.c Mon Dec 25 17:07:03 2006
-@@ -110,7 +110,7 @@
- #if (defined _WIN32)
- void WAVE_FillAPI( snddmaAPI_t *api );
- void DS_FillAPI( snddmaAPI_t *api );
--#elif (defined __linux__)
-+#elif (defined __unix__)
- void OSS_FillAPI( snddmaAPI_t *api );
- #endif
-
-@@ -129,7 +129,7 @@
- /* fallback driver should be present on all systems */
- #if (defined _WIN32)
- { "wave", WAVE_FillAPI },
--#elif (defined __linux__)
-+#elif (defined __unix__)
- { "oss", OSS_FillAPI },
- #endif
-
diff --git a/games/q2pro/files/patch-source__snd_linux.c b/games/q2pro/files/patch-source__snd_linux.c
deleted file mode 100644
index 78b27e0467b8..000000000000
--- a/games/q2pro/files/patch-source__snd_linux.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./source/snd_linux.c.orig Mon Dec 25 17:07:02 2006
-+++ ./source/snd_linux.c Mon Dec 25 17:07:03 2006
-@@ -27,6 +27,8 @@
- #include <sys/wait.h>
- #ifdef __linux__
- #include <linux/soundcard.h>
-+#else
-+#include <sys/soundcard.h>
- #endif
- #include <stdio.h>
- #include <errno.h>
diff --git a/games/q2pro/files/patch-source__sys_unix.c b/games/q2pro/files/patch-source__sys_unix.c
index 6dae184ee783..d1d701945a30 100644
--- a/games/q2pro/files/patch-source__sys_unix.c
+++ b/games/q2pro/files/patch-source__sys_unix.c
@@ -1,66 +1,7 @@
---- ./source/sys_unix.c.orig Mon Dec 25 17:07:02 2006
-+++ ./source/sys_unix.c Mon Dec 25 17:07:03 2006
-@@ -36,10 +36,15 @@
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <errno.h>
-+#ifdef __linux__
- #include <mntent.h>
-+#endif
- #include <dirent.h>
- #include <dlfcn.h>
- #include <termios.h>
-+#ifndef __linux__
-+#include <machine/param.h>
-+#endif
+--- source/sys_unix.c.orig Sun Jan 28 20:57:44 2007
++++ source/sys_unix.c Sun Feb 4 19:49:07 2007
+@@ -908,7 +908,7 @@
- #include "qcommon.h"
- #include "q_list.h"
-@@ -376,7 +381,7 @@
- pool->maxsize = ( maxsize + 4095 ) & ~4095;
- pool->cursize = 0;
- buf = mmap( NULL, pool->maxsize, PROT_READ|PROT_WRITE,
-- MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 );
-+ MAP_PRIVATE|MAP_ANON, -1, 0 );
- if( buf == NULL || buf == ( byte * )-1 ) {
- Com_Error( ERR_FATAL, "Hunk_Begin: unable to virtual allocate %d bytes",
- pool->maxsize );
-@@ -403,7 +408,24 @@
- void Hunk_End( mempool_t *pool ) {
- byte *n;
-
-+#ifndef __linux__
-+ size_t old_size = pool->maxsize;
-+ size_t new_size = pool->cursize + sizeof(int);
-+ void * unmap_base;
-+ size_t unmap_len;
-+
-+ new_size = round_page(new_size);
-+ old_size = round_page(old_size);
-+ if (new_size > old_size)
-+ n = 0; /* error */
-+ else if (new_size < old_size) {
-+ unmap_base = (caddr_t)(pool->base + new_size);
-+ unmap_len = old_size - new_size;
-+ n = munmap(unmap_base, unmap_len) + pool->base;
-+ }
-+#else
- n = mremap( pool->base, pool->maxsize, pool->cursize, 0 );
-+#endif
- if( n != pool->base ) {
- Com_Error( ERR_FATAL, "Hunk_End: could not remap virtual block: %s",
- strerror( errno ) );
-@@ -750,7 +772,7 @@
- if( sys_debugdir->string[0] ) {
- base = sys_debugdir->string;
- } else {
-- base = Sys_GetCurrentDirectory();
-+ base = LIBDIR;
- }
-
- // check the current debug directory first for development purposes
-@@ -829,7 +851,7 @@
- //=======================================================================
static void *gameLibrary;
-#define GAMELIB "gamei386.so"
@@ -68,3 +9,15 @@
/*
=================
+@@ -935,9 +935,9 @@
+ char name[MAX_OSPATH];
+ char *path;
+ #ifdef NDEBUG
+- const char *debugdir = "releasei386";
++ const char *debugdir = "release";
+ #else
+- const char *debugdir = "debugi386";
++ const char *debugdir = "debug";
+ #endif
+
+ if( gameLibrary ) {