aboutsummaryrefslogtreecommitdiffstats
path: root/games/demonquake/files
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-01-22 10:56:17 +0800
committeralepulver <alepulver@FreeBSD.org>2007-01-22 10:56:17 +0800
commit02a392afac0b6accdf4da5e85bb2408b2675db27 (patch)
tree92fa2c5d44d980f72c68b972a22e3d6f330a8461 /games/demonquake/files
parent7059287ee7f04af0095aadd19e476fb76b913ffd (diff)
downloadfreebsd-ports-gnome-02a392afac0b6accdf4da5e85bb2408b2675db27.tar.gz
freebsd-ports-gnome-02a392afac0b6accdf4da5e85bb2408b2675db27.tar.zst
freebsd-ports-gnome-02a392afac0b6accdf4da5e85bb2408b2675db27.zip
- Update to version 0.16.1.
- Make fetchable.
Diffstat (limited to 'games/demonquake/files')
-rw-r--r--games/demonquake/files/patch-Makefile200
-rw-r--r--games/demonquake/files/patch-src__cd_linux.c326
-rw-r--r--games/demonquake/files/patch-src__cdaudio.h11
-rw-r--r--games/demonquake/files/patch-src__cl_parse.c11
-rw-r--r--games/demonquake/files/patch-src__common.c56
-rw-r--r--games/demonquake/files/patch-src__host.c4
-rw-r--r--games/demonquake/files/patch-src__keys.c4
-rw-r--r--games/demonquake/files/patch-src__mod.c4
-rw-r--r--games/demonquake/files/patch-src__net.h11
-rw-r--r--games/demonquake/files/patch-src__snd_linux.c14
-rw-r--r--games/demonquake/files/patch-src__sys.h11
-rw-r--r--games/demonquake/files/patch-src__vid_glx.c12
12 files changed, 73 insertions, 591 deletions
diff --git a/games/demonquake/files/patch-Makefile b/games/demonquake/files/patch-Makefile
index 1a18ab36e9c2..c1c9498ca2f3 100644
--- a/games/demonquake/files/patch-Makefile
+++ b/games/demonquake/files/patch-Makefile
@@ -1,137 +1,71 @@
---- Makefile.orig Thu Nov 10 09:52:39 2005
-+++ Makefile Sat May 27 13:44:29 2006
-@@ -8,7 +8,7 @@
- # Modified by QuDos at http://qudos.quakedev.com
-
- BASEVERSION=0.16
--VERSION=$(BASEVERSION)$(GLIBC)
-+VERSION=$(BASEVERSION)
-
- ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6 ];then echo libc6;fi)))
- GLIBC=-glibc
-@@ -16,45 +16,50 @@
- GLIBC=
+--- ./Makefile.orig Sun Jan 21 16:03:40 2007
++++ ./Makefile Sun Jan 21 16:14:19 2007
+@@ -12,8 +12,6 @@
+
+ # this nice line comes from the linux kernel makefile
+ ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
+-MARCH :=$(shell uname -m)
+-
+
+ VERSION=0.16
+ BINDIR=quake
+@@ -21,14 +19,14 @@
+ BUILD_DEBUG_DIR=debug_build
+ BUILD_RELEASE_DIR=release_build
+
+-BUILD_DEMONQUAKE=YES # DemonQuake glx executable (uses oss for cdrom and sound)
+-BUILD_DEMONQUAKE_SDL=YES # DemonQuake sdl glx executable (uses SDL for cdrom and sound)
+-BUILD_DZIP=YES # Dzip binary for compress/uncompress demos
++BUILD_DEMONQUAKE?=NO # DemonQuake glx executable (uses oss for cdrom and sound)
++BUILD_DEMONQUAKE_SDL?=NO # DemonQuake sdl glx executable (uses SDL for cdrom and sound)
++BUILD_DZIP?=NO # Dzip binary for compress/uncompress demos
+
+ # Use DATADIR for reading and ~/.demonquake for writting.
+-WITH_DATADIR=NO
++WITH_DATADIR=YES
+ # The next option is required when DATADIR is set to YES, Use ~/ for writing, instead of .
+-WITH_HOMEDIR=NO
++WITH_HOMEDIR=YES
+ # Directory within $HOME to write to
+ HOMEDIR=.demonquake
+
+@@ -36,33 +34,26 @@
+ WITH_FMOD=NO # Fmod Sound support
endif
--ifneq (,$(findstring alpha,$(shell uname -m)))
--ARCH=axp
--else
--ARCH=i386
--endif
- NOARCH=noarch
-
- MOUNT_DIR=./src
-
--BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC)
--BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC)
-+BUILD_DEBUG_DIR=debug
-+BUILD_RELEASE_DIR=release
-
--BUILD_SDL=YES # demonquake sdl glx executable (uses SDL for cdrom and sound)
-+BUILD_SDL?=NO # demonquake sdl glx executable (uses SDL for cdrom and sound)
-
-CC=gcc
-+ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
+CC?=gcc
-+USE_OPTIMIZED_CFLAGS?=YES
-
--BASE_CFLAGS=-Dstricmp=strcasecmp -Did386 -funsigned-char #-Wall
-+BASE_CFLAGS=$(CFLAGS) -DDATADIR='"$(Q1DIR)"' -Dstricmp=strcasecmp -funsigned-char
-
--RELEASE_CFLAGS=$(BASE_CFLAGS) -march=i686 -O2 -ffast-math -funroll-loops \
-- -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing -pipe #-Wall
--
--DEBUG_CFLAGS=$(BASE_CFLAGS) -g #-DDEBUG_MEM
-+ifeq ($(ARCH),i386)
-+USE_X86_ASM?=YES
-+else
-+USE_X86_ASM=NO
-+endif
-
-+ifeq ($(strip $(USE_X86_ASM)),YES)
-+BASE_CFLAGS+=-Did386
-+endif
-
--LDFLAGS=-lm -ldl
-+RELEASE_CFLAGS=$(BASE_CFLAGS)
-+ifeq ($(strip $(USE_OPTIMIZED_CFLAGS)),YES)
-+RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops \
-+ -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing -pipe
-+endif
-+
-+DEBUG_CFLAGS=$(BASE_CFLAGS) -g #-DDEBUG_MEM
-
--LDFLAGS += -L./src/fmod -Wl,-rpath,. -lfmod #-L./src/mss -Wl,-rpath,. -lmss
-+LDFLAGS+=-lm
-
- ifeq ($(strip $(BUILD_SDL)),YES)
-- SDLCFLAGS=$(shell sdl-config --cflags)
-- SDLLDFLAGS=$(shell sdl-config --libs)
-- LDFLAGS += \
-- -lSDL
-+ SDLCFLAGS=$(shell $(SDL_CONFIG) --cflags)
-+ SDLLDFLAGS=$(shell $(SDL_CONFIG) --libs)
- BASE_CFLAGS += \
- -D_SDL_FIX -D_SDL_BIN
- endif
-
--GLLDFLAGS=-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib -lGL -lGLU -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm -lz -lpng -ljpeg
--GLCFLAGS=-DGLQUAKE -I/usr/include -I/usr/X11R6/include
-+GLLDFLAGS=-L$(X11BASE)/lib -L$(LOCALBASE)/lib -lGL -lGLU -lX11 -lXext -lXxf86dga -lXxf86vm -lm -lz -lpng -ljpeg
-+GLCFLAGS=-DGLQUAKE -I$(X11BASE)/include -I$(LOCALBASE)/include
-
- DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
- DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $<
-@@ -70,10 +75,10 @@
- # SETUP AND BUILD
- #############################################################################
-
-- TARGETS=$(BUILDDIR)/demonquake.glx
-+ TARGETS=$(BUILDDIR)/demonquake
-
- ifeq ($(strip $(BUILD_SDL)),YES)
-- TARGETS +=$(BUILDDIR)/demonquake-sdl.glx
-+ TARGETS +=$(BUILDDIR)/demonquake-sdl
- endif
-
- all:
-@@ -165,12 +170,15 @@
- $(BUILDDIR)/glquake/sys_linux.o \
- $(BUILDDIR)/glquake/snd_dma.o \
- $(BUILDDIR)/glquake/snd_mem.o \
-- $(BUILDDIR)/glquake/snd_mix.o \
-- \
-+ $(BUILDDIR)/glquake/snd_mix.o
-+
-+ifeq ($(strip $(USE_X86_ASM)),YES)
-+GLQUAKE_OBJS+= \
- $(BUILDDIR)/glquake/math.o \
- $(BUILDDIR)/glquake/snd_mixa.o \
- $(BUILDDIR)/glquake/sys_x86.o \
- $(BUILDDIR)/glquake/worlda.o
-+endif
-
- GLQUAKE_LNX_OBJS = \
- $(BUILDDIR)/glquake/cd_linux.o \
-@@ -183,10 +191,10 @@
- GLX_OBJS=$(BUILDDIR)/glquake/vid_glx.o \
- $(BUILDDIR)/glquake/vid_common_gl.o
-
--$(BUILDDIR)/demonquake.glx : $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS)
-+$(BUILDDIR)/demonquake : $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS)
- $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS)
-
--$(BUILDDIR)/demonquake-sdl.glx : $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS)
-+$(BUILDDIR)/demonquake-sdl : $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS)
- $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS) $(SDLLDFLAGS)
-
- $(BUILDDIR)/glquake/cl_collision.o : $(MOUNT_DIR)/cl_collision.c
-@@ -291,7 +299,7 @@
- $(BUILDDIR)/glquake/mathlib.o : $(MOUNT_DIR)/mathlib.c
- $(DO_GL_CC)
-
--$(BUILDDIR)/glquake/mod.o : $(MOUNT_DIR)/mod.c
-+$(BUILDDIR)/glquake/mod.o : $(MOUNT_DIR)/mod.c
- $(DO_GL_CC)
-
- $(BUILDDIR)/glquake/nehahra.o : $(MOUNT_DIR)/nehahra.c
+ CC_VERSION=$(shell $(CC) -dumpversion | sed -e 's/\..*//g')
+ CC_VERSION_NUM=$(shell $(CC) -dumpversion)
+
+-OPTIMIZE=NO # Enable Optimization, release build only.
++OPTIMIZE?=NO # Enable Optimization, release build only.
+ STRIP=NO # Remove symbols from binaries, reduce size.
+ VERBOSE=NO
+
+-LOCALBASE= /usr/local
+-GAMEBASE= /usr/local
+-X11BASE=/usr/X11R6
++LOCALBASE?=/usr/local
++X11BASE?=/usr/X11R6
+ SYSBINDIR=$(LOCALBASE)/bin
+-DATADIR= $(GAMEBASE)/games/quake
+-
+-ifeq ($(ARCH),x86_64)
+- ARCH_LIBDIR=64
+-endif
++DATADIR?=$(Q2DIR)
+
+ # Seems that gcc 4.0 has some issues with -march option here, so i added it by default.
+ # Feel free to remove it.
+ BASE_CFLAGS+= \
++ $(CFLAGS) \
+ -I$(LOCALBASE)/include \
+ -I$(X11BASE)/include \
+ -DGLQUAKE
+-ifeq ($(ARCH),i386)
+- BASE_CFLAGS+=-march=$(MARCH)
+-endif
+
+ DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb -Wall
+ RELEASE_CFLAGS+=$(BASE_CFLAGS)\
diff --git a/games/demonquake/files/patch-src__cd_linux.c b/games/demonquake/files/patch-src__cd_linux.c
deleted file mode 100644
index d70ea3c037c8..000000000000
--- a/games/demonquake/files/patch-src__cd_linux.c
+++ /dev/null
@@ -1,326 +0,0 @@
---- ./src/cd_linux.c.orig Thu Nov 3 16:05:07 2005
-+++ ./src/cd_linux.c Tue May 16 14:33:39 2006
-@@ -31,7 +31,12 @@
- #include <time.h>
- #include <errno.h>
-
-+#ifdef __FreeBSD__
-+#include <sys/cdio.h>
-+#define CDROM_DATA_TRACK 4
-+#else
- #include <linux/cdrom.h>
-+#endif
-
- #include "quakedef.h"
-
-@@ -54,8 +59,13 @@
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCEJECT) == -1)
-+ Con_DPrintf ("ioctl cdioceject failed\n");
-+#else
- if ( ioctl(cdfile, CDROMEJECT) == -1 )
- Con_DPrintf("ioctl cdromeject failed\n");
-+#endif
- }
-
-
-@@ -64,30 +74,53 @@
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCCLOSE) == -1)
-+ Con_DPrintf ("ioctl cdiocclose failed\n");
-+#else
- if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
- Con_DPrintf("ioctl cdromclosetray failed\n");
-+#endif
- }
-
- static int CDAudio_GetAudioDiskInfo(void)
- {
-+#ifdef __FreeBSD__
-+ struct ioc_toc_header tochdr;
-+#else
- struct cdrom_tochdr tochdr;
-+#endif
-
- cdValid = false;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1)
-+ {
-+ Con_DPrintf ("ioctl cdioreadtocheader failed\n");
-+#else
- if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 )
- {
- Con_DPrintf("ioctl cdromreadtochdr failed\n");
- return -1;
-+#endif
- }
-
-+#ifdef __FreeBSD__
-+ if (tochdr.starting_track < 1)
-+#else
- if (tochdr.cdth_trk0 < 1)
-+#endif
- {
- Con_DPrintf("CDAudio: no music tracks\n");
- return -1;
- }
-
- cdValid = true;
-+#ifdef __FreeBSD__
-+ maxTrack = tochdr.ending_track;
-+#else
- maxTrack = tochdr.cdth_trk1;
-+#endif
-
- return 0;
- }
-@@ -95,8 +128,14 @@
-
- void CDAudio_Play(byte track, qboolean looping)
- {
-+#ifdef __FreeBSD__
-+ struct ioc_read_toc_entry entry;
-+ struct cd_toc_entry toc_buffer;
-+ struct ioc_play_track ti;
-+#else
- struct cdrom_tocentry entry;
- struct cdrom_ti ti;
-+#endif
-
- if (cdfile == -1 || !enabled)
- return;
-@@ -116,6 +155,20 @@
- return;
- }
-
-+#ifdef __FreeBSD__
-+ bzero((char *)&toc_buffer, sizeof(toc_buffer));
-+ entry.data_len = sizeof(toc_buffer);
-+ entry.data = &toc_buffer;
-+ // don't try to play a non-audio track
-+ entry.starting_track = track;
-+ entry.address_format = CD_MSF_FORMAT;
-+ if ( ioctl(cdfile, CDIOREADTOCENTRYS, &entry) == -1 )
-+ {
-+ Con_DPrintf("ioctl cdromreadtocentry failed\n");
-+ return;
-+ }
-+ if (toc_buffer.control == CDROM_DATA_TRACK)
-+#else
- // don't try to play a non-audio track
- entry.cdte_track = track;
- entry.cdte_format = CDROM_MSF;
-@@ -125,6 +178,7 @@
- return;
- }
- if (entry.cdte_ctrl == CDROM_DATA_TRACK)
-+#endif
- {
- Con_Printf("CDAudio: track %i is not audio\n", track);
- return;
-@@ -137,19 +191,37 @@
- CDAudio_Stop();
- }
-
-+#ifdef __FreeBSD__
-+ ti.start_track = track;
-+ ti.end_track = track;
-+ ti.start_index = 1;
-+ ti.end_index = 99;
-+#else
- ti.cdti_trk0 = track;
- ti.cdti_trk1 = track;
- ti.cdti_ind0 = 1;
- ti.cdti_ind1 = 99;
-+#endif
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1)
-+ {
-+ Con_DPrintf ("ioctl cdiocplaytracks failed\n");
-+#else
- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
- {
- Con_DPrintf("ioctl cdromplaytrkind failed\n");
- return;
-+#endif
- }
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCRESUME) == -1)
-+ Con_DPrintf ("ioctl cdiocresume failed\n");
-+#else
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Con_DPrintf("ioctl cdromresume failed\n");
-+#endif
-
- playLooping = looping;
- playTrack = track;
-@@ -166,8 +238,14 @@
- int track, i = 0, free_tracks = 0, remap_track;
- float f;
- byte* track_bools;
-+#ifdef __FreeBSD__
-+ struct ioc_read_toc_entry entry;
-+ struct cd_toc_entry toc_buffer;
-+ struct ioc_play_track ti;
-+#else
- struct cdrom_tocentry entry;
- struct cdrom_ti ti;
-+#endif
-
- if (cdfile == -1 || !enabled)
- return;
-@@ -181,15 +259,30 @@
-
- for (; i < maxTrack; i++)
- {
-+#ifdef __FreeBSD__
-+ bzero((char *)&toc_buffer, sizeof(toc_buffer));
-+ entry.data_len = sizeof(toc_buffer);
-+ entry.data = &toc_buffer;
-+ // don't try to play a non-audio track
-+ entry.starting_track = remap[i];
-+ entry.address_format = CD_LBA_FORMAT;
-+ if ( ioctl(cdfile, CDIOREADTOCENTRYS, &entry) == -1 )
-+ {
-+ track_bools[i] = 0;
-+ }
-+ else
-+ track_bools[i] = (toc_buffer.control != CDROM_DATA_TRACK);
-+#else
- entry.cdte_track = remap[i];
- entry.cdte_format = CDROM_LBA;
- if ( ioctl(cdfile, CDROMREADTOCENTRY, &entry) == -1 )
- {
- track_bools[i] = 0;
- }
-- else
-+ else
- track_bools[i] = (entry.cdte_ctrl != CDROM_DATA_TRACK);
-
-+#endif
- free_tracks += track_bools[i];
- }
-
-@@ -220,13 +313,25 @@
- CDAudio_Stop();
- }
-
-+#ifdef __FreeBSD__
-+ ti.start_track = track;
-+ ti.end_track = track;
-+ ti.start_index = 1;
-+ ti.end_index = 99;
-+#else
- ti.cdti_trk0 = remap_track;
- ti.cdti_trk1 = remap_track;
- ti.cdti_ind0 = 0;
- ti.cdti_ind1 = 0;
-+#endif
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1)
-+ {
-+#else
- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
- {
-+#endif
- track_bools[track] = 0;
- free_tracks--;
- }
-@@ -254,8 +359,13 @@
- if (!playing)
- return;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCSTOP) == -1)
-+ Con_DPrintf ("ioctl cdiocstop failed (%d)\n", errno);
-+#else
- if ( ioctl(cdfile, CDROMSTOP) == -1 )
- Con_DPrintf("ioctl cdromstop failed (%d)\n", errno);
-+#endif
-
- wasPlaying = false;
- playing = false;
-@@ -269,8 +379,13 @@
- if (!playing)
- return;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCPAUSE) == -1)
-+ Con_DPrintf ("ioctl cdiocpause failed\n");
-+#else
- if ( ioctl(cdfile, CDROMPAUSE) == -1 )
- Con_DPrintf("ioctl cdrompause failed\n");
-+#endif
-
- wasPlaying = playing;
- playing = false;
-@@ -288,8 +403,13 @@
- if (!wasPlaying)
- return;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCRESUME) == -1)
-+ Con_DPrintf ("ioctl cdiocresume failed\n");
-+#else
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Con_DPrintf("ioctl cdromresume failed\n");
-+#endif
- playing = true;
- }
-
-@@ -422,7 +542,12 @@
-
- void CDAudio_Update(void)
- {
-+#ifdef __FreeBSD__
-+ struct ioc_read_subchannel subchnl;
-+ struct cd_sub_channel_info data;
-+#else
- struct cdrom_subchnl subchnl;
-+#endif
- static time_t lastchk;
-
- if (!enabled)
-@@ -446,6 +571,24 @@
-
- if (playing && lastchk < time(NULL)) {
- lastchk = time(NULL) + 2; //two seconds between chks
-+#if defined(__FreeBSD__)
-+ subchnl.address_format = CD_MSF_FORMAT;
-+ subchnl.data_format = CD_CURRENT_POSITION;
-+ subchnl.data_len = sizeof(data);
-+ subchnl.track = playTrack;
-+ subchnl.data = &data;
-+ if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1 ) {
-+ Con_DPrintf("ioctl cdiocreadsubchannel failed\n");
-+ playing = false;
-+ return;
-+ }
-+ if (subchnl.data->header.audio_status != CD_AS_PLAY_IN_PROGRESS &&
-+ subchnl.data->header.audio_status != CD_AS_PLAY_PAUSED) {
-+ playing = false;
-+ if (playLooping)
-+ CDAudio_Play(playTrack, true);
-+ }
-+#else
- subchnl.cdsc_format = CDROM_MSF;
- if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) {
- Con_DPrintf("ioctl cdromsubchnl failed\n");
-@@ -458,6 +601,7 @@
- if (playLooping)
- CDAudio_Play(playTrack, true);
- }
-+#endif
- }
- }
-
diff --git a/games/demonquake/files/patch-src__cdaudio.h b/games/demonquake/files/patch-src__cdaudio.h
deleted file mode 100644
index 5bd22fb588f5..000000000000
--- a/games/demonquake/files/patch-src__cdaudio.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/cdaudio.h.orig Thu Nov 3 16:03:41 2005
-+++ ./src/cdaudio.h Tue May 16 14:33:39 2006
-@@ -26,7 +26,7 @@
- void CDAudio_Shutdown(void);
- void CDAudio_Update(void);
- //QuDos-
--#ifdef __linux__ //Thx quake2 icculus
-+#ifdef __unix__ //Thx quake2 icculus
- void CDAudio_RandomPlay(void);
- #endif
- //-QuDos
diff --git a/games/demonquake/files/patch-src__cl_parse.c b/games/demonquake/files/patch-src__cl_parse.c
deleted file mode 100644
index f643f5131804..000000000000
--- a/games/demonquake/files/patch-src__cl_parse.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/cl_parse.c.orig Thu Nov 3 16:06:26 2005
-+++ ./src/cl_parse.c Tue May 16 14:33:39 2006
-@@ -974,7 +974,7 @@
- cl.looptrack = MSG_ReadByte ();
- if ((cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1)) {
- //QuDos- cd tracks randomplay support ### FIXME ### tracks stop when changing levels
--#ifdef __linux__
-+#ifdef __unix__
- CDAudio_RandomPlay();
- #endif
- //-QuDos
diff --git a/games/demonquake/files/patch-src__common.c b/games/demonquake/files/patch-src__common.c
deleted file mode 100644
index a13c6bb65eae..000000000000
--- a/games/demonquake/files/patch-src__common.c
+++ /dev/null
@@ -1,56 +0,0 @@
---- ./src/common.c.orig Thu Nov 10 09:51:58 2005
-+++ ./src/common.c Tue May 16 14:33:39 2006
-@@ -1820,14 +1820,18 @@
- */
- void COM_InitFilesystem (void)
- {
-+ char *home;
-+ char homepath[MAX_OSPATH];
- int i;
-
-+ home = getenv("HOME");
-+
- // -basedir <path>
- // Overrides the system supplied base directory (under GAMENAME)
- if ((i = COM_CheckParm ("-basedir")) && i < com_argc-1)
- Q_strcpy (com_basedir, com_argv[i+1]);
- else
-- Q_strcpy (com_basedir, host_parms. basedir);
-+ Q_strcpy (com_basedir, DATADIR);
-
- for (i=0 ; i < strlen(com_basedir) ; i++)
- {
-@@ -1845,10 +1849,17 @@
- COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir));
- Q_strncpy (demodir, "/id1", sizeof(demodir));
-
-+
-+ if (home != NULL)
-+ COM_AddGameDirectory(va("%s/.demonquake/id1", homepath));
-+
- // add demonquake to the path (demonquake)
- COM_AddGameDirectory (va("%s/"BASENAME, com_basedir));
- Q_strncpy (demodir, "/demonquake", sizeof(demodir));
-
-+ if (home != NULL)
-+ COM_AddGameDirectory(va("%s/.demonquake/demonquake", homepath));
-+
- // reckless (expanded checks):
- if (COM_CheckParm("-rogue")) {
- COM_AddGameDirectory (va("%s/rogue", com_basedir));
-@@ -1878,6 +1889,15 @@
- if ((i = COM_CheckParm ("-game")) && i < com_argc-1) {
- COM_AddGameDirectory (va("%s/%s", com_basedir, com_argv[i+1]));
- Q_strncpy (demodir, va("/%s", com_argv[i+1]), sizeof(demodir));
-+ }
-+
-+ if (home != NULL) {
-+ Q_snprintfz(homepath, sizeof(homepath), "%s/.demonquake/%s",
-+ home, strrchr(com_gamedir, '/') + 1 ?
-+ strrchr(com_gamedir, '/') + 1 : "demonquake");
-+ COM_CreatePath(homepath);
-+ Sys_mkdir(homepath);
-+ COM_AddGameDirectory(homepath);
- }
-
- if (!strncmp(demodir, "/rogue", 6)) {
diff --git a/games/demonquake/files/patch-src__host.c b/games/demonquake/files/patch-src__host.c
index 2ee9fdadce28..06e867d3b6bf 100644
--- a/games/demonquake/files/patch-src__host.c
+++ b/games/demonquake/files/patch-src__host.c
@@ -1,5 +1,5 @@
---- ./src/host.c.orig Thu Nov 3 16:12:17 2005
-+++ ./src/host.c Tue May 16 14:36:05 2006
+--- ./host.c.orig Thu Nov 3 16:12:17 2005
++++ ./host.c Tue May 16 14:36:05 2006
@@ -1046,7 +1046,7 @@
// joe: same here
//QuDos- enable/disable cmdhist.dat file creation, i don't need this feature
diff --git a/games/demonquake/files/patch-src__keys.c b/games/demonquake/files/patch-src__keys.c
index 8748547b73b4..5828dee6fe55 100644
--- a/games/demonquake/files/patch-src__keys.c
+++ b/games/demonquake/files/patch-src__keys.c
@@ -1,5 +1,5 @@
---- ./src/keys.c.orig Thu Nov 3 16:14:02 2005
-+++ ./src/keys.c Tue May 16 14:36:16 2006
+--- ./keys.c.orig Thu Nov 3 16:14:02 2005
++++ ./keys.c Tue May 16 14:36:16 2006
@@ -663,7 +663,7 @@
//QuDos- enable/disable cmdhist.dat file creation, i don't need this feature
diff --git a/games/demonquake/files/patch-src__mod.c b/games/demonquake/files/patch-src__mod.c
index 7e852e11eabc..3cadd7546a99 100644
--- a/games/demonquake/files/patch-src__mod.c
+++ b/games/demonquake/files/patch-src__mod.c
@@ -1,5 +1,5 @@
---- ./src/mod.c.orig Sat Oct 8 14:08:32 2005
-+++ ./src/mod.c Tue May 16 14:33:39 2006
+--- ./mod.c.orig Sat Oct 8 14:08:32 2005
++++ ./mod.c Tue May 16 14:33:39 2006
@@ -30,14 +30,17 @@
void MOD_stop (void)
diff --git a/games/demonquake/files/patch-src__net.h b/games/demonquake/files/patch-src__net.h
deleted file mode 100644
index 1298278aafc0..000000000000
--- a/games/demonquake/files/patch-src__net.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/net.h.orig Sun May 30 22:34:26 2004
-+++ ./src/net.h Tue May 16 14:33:39 2006
-@@ -253,7 +253,7 @@
- extern int hostCacheCount;
- extern hostcache_t hostcache[HOSTCACHESIZE];
-
--#if !defined(_WIN32 ) && !defined (__linux__)
-+#if !defined(_WIN32 ) && !defined (__unix__)
- #ifndef htonl
- extern unsigned long htonl (unsigned long hostlong);
- #endif
diff --git a/games/demonquake/files/patch-src__snd_linux.c b/games/demonquake/files/patch-src__snd_linux.c
deleted file mode 100644
index ae4f68d10f89..000000000000
--- a/games/demonquake/files/patch-src__snd_linux.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./src/snd_linux.c.orig Thu Nov 3 16:19:53 2005
-+++ ./src/snd_linux.c Tue May 16 14:33:39 2006
-@@ -25,7 +25,11 @@
- #include <sys/mman.h>
- #include <sys/shm.h>
- #include <sys/wait.h>
-+#ifdef __linux__
- #include <linux/soundcard.h>
-+#else
-+#include <sys/soundcard.h>
-+#endif
- #include <stdio.h>
- #include "quakedef.h"
-
diff --git a/games/demonquake/files/patch-src__sys.h b/games/demonquake/files/patch-src__sys.h
deleted file mode 100644
index b6a252c480b2..000000000000
--- a/games/demonquake/files/patch-src__sys.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/sys.h.orig Thu Nov 3 16:20:30 2005
-+++ ./src/sys.h Tue May 16 14:33:39 2006
-@@ -65,7 +65,7 @@
-
- char *Sys_GetClipboardData (void);
- //QuDos-
--#ifdef __linux__
-+#ifdef __unix__
- //linux *pak loading Tenebrae
- typedef struct
- {
diff --git a/games/demonquake/files/patch-src__vid_glx.c b/games/demonquake/files/patch-src__vid_glx.c
deleted file mode 100644
index fbf59e7c7ce2..000000000000
--- a/games/demonquake/files/patch-src__vid_glx.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./src/vid_glx.c.orig Thu Nov 3 17:12:46 2005
-+++ ./src/vid_glx.c Tue May 16 14:33:39 2006
-@@ -20,7 +20,9 @@
- #include <termios.h>
- #include <sys/ioctl.h>
- #include <sys/stat.h>
-+#ifdef __linux__
- #include <sys/vt.h>
-+#endif
- #include <stdarg.h>
- #include <stdio.h>
- #include <signal.h>