aboutsummaryrefslogtreecommitdiff
path: root/games/ezquake/files
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2008-01-04 17:23:44 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2008-01-04 17:23:44 +0000
commit4fbde95c552009bd5d715f0e76a81293378e081e (patch)
treefc67250db639bbde9a9e86b4e6187cb2b2a3d367 /games/ezquake/files
parent99533b1805cba163e94f4c51f8c22d316cf7a69e (diff)
downloadports-4fbde95c552009bd5d715f0e76a81293378e081e.tar.gz
ports-4fbde95c552009bd5d715f0e76a81293378e081e.zip
- Update to version 1.8.2.
- Bump PORTEPOCH. - Remove many upstream already integrated patches.
Notes
Notes: svn path=/head/; revision=205006
Diffstat (limited to 'games/ezquake/files')
-rw-r--r--games/ezquake/files/patch-Makefile58
-rw-r--r--games/ezquake/files/patch-Makefile.list18
-rw-r--r--games/ezquake/files/patch-cd_linux.c253
-rw-r--r--games/ezquake/files/patch-cl_tcl.c10
-rw-r--r--games/ezquake/files/patch-common.c72
-rw-r--r--games/ezquake/files/patch-host.c11
-rw-r--r--games/ezquake/files/patch-image.c10
-rw-r--r--games/ezquake/files/patch-modules.c10
-rw-r--r--games/ezquake/files/patch-mp3_player.c31
-rw-r--r--games/ezquake/files/patch-q_shared.h43
-rw-r--r--games/ezquake/files/patch-snd_dma.c28
-rw-r--r--games/ezquake/files/patch-snd_linux.c77
-rw-r--r--games/ezquake/files/patch-snd_oss.c42
-rw-r--r--games/ezquake/files/patch-sys_linux.c26
-rw-r--r--games/ezquake/files/patch-teamplay.c10
-rw-r--r--games/ezquake/files/patch-vid_common_gl.c13
-rw-r--r--games/ezquake/files/patch-vid_glx.c25
17 files changed, 104 insertions, 633 deletions
diff --git a/games/ezquake/files/patch-Makefile b/games/ezquake/files/patch-Makefile
index 268734803cc1..e2de78662f16 100644
--- a/games/ezquake/files/patch-Makefile
+++ b/games/ezquake/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Nov 25 15:28:35 2006
-+++ Makefile Tue Dec 19 20:41:59 2006
+--- Makefile.orig Fri Jan 4 11:28:34 2008
++++ Makefile Fri Jan 4 11:29:06 2008
@@ -6,7 +6,7 @@
# compilation tool and detection of targets/achitecture
@@ -9,38 +9,25 @@
CC_BASEVERSION = $(shell $(CC) -dumpversion | sed -e 's/\..*//g')
# TYPE = release debug
-@@ -16,25 +16,18 @@
-
- # ARCH = x86 ppc
- # OS = linux darwin
--ARCH = $(shell uname -m | sed -e 's/i.86/x86/g' -e 's/Power Macintosh/ppc/g')
-+ARCH ?= $(shell uname -m | sed -e 's/i.86/x86/g' -e 's/Power Macintosh/ppc/g')
+@@ -19,17 +19,6 @@
+ ARCH = $(shell uname -m | sed -e 's/i.86/x86/g' -e 's/Power Macintosh/ppc/g')
OS = $(shell uname -s | tr A-Z a-z)
-# add special architecture based flags
-ifeq ($(ARCH),x86_64)
-- ARCH_CFLAGS = -march=k8 -D__LITTLE_ENDIAN__Q__
+- ARCH_CFLAGS = -mtune=nocona -mmmx -msse -msse2 -m64
-endif
-ifeq ($(ARCH),x86)
-- ARCH_CFLAGS = -march=i686 -D__LITTLE_ENDIAN__Q__ -Did386
+- ARCH_CFLAGS = -march=i686 -mtune=generic -mmmx -Did386
-endif
-ifeq ($(ARCH),ppc)
-- ARCH_CFLAGS = -arch ppc -faltivec -maltivec -mcpu=7450 -mtune=7450 -mpowerpc -mpowerpc-gfxopt -D__BIG_ENDIAN__Q__
+- ARCH_CFLAGS = -arch i686 -arch ppc -msse2
-endif
-
- # TODO: LIB_PREFIX must be $(OS)-$(ARCH)
ifeq ($(OS),linux)
DEFAULT_TARGET = glx
OS_GL_CFLAGS = -DWITH_DGA -DWITH_EVDEV -DWITH_VMODE
- endif
-+ifeq ($(OS),freebsd)
-+ DEFAULT_TARGET = glx
-+ OS_GL_CFLAGS = -DWITH_DGA -DWITH_VMODE -I$(X11BASE)/include
-+endif
- ifeq ($(OS),darwin)
- DEFAULT_TARGET = mac
- OS_GL_CFLAGS = -I/opt/local/include/ -I/Developer/Headers/FlatCarbon -I/sw/include -FOpenGL -FAGL
-@@ -50,19 +43,19 @@
+@@ -53,19 +42,19 @@
# Directories for object files #
################################
@@ -68,30 +55,33 @@
################
-@@ -78,9 +71,12 @@
+@@ -81,9 +70,11 @@
# compiler flags
- PRJ_CFLAGS = -DWITH_ZLIB -DWITH_PNG -DEMBED_TCL -DJSS_CAM
--BASE_CFLAGS = -Wall -funsigned-char $(ARCH_CFLAGS) $(PRJ_CFLAGS) -I ./libs
-+XMMS_CFLAGS= -DWITH_XMMS `xmms-config --cflags` `glib-config --cflags`
-+BASE_CFLAGS := $(CFLAGS) -I$(LOCALBASE)/include `pcre-config --cflags` -I$(TCL_INCLUDEDIR) -DDATADIR='"$(Q1DIR)"' -Wall -funsigned-char $(PRJ_CFLAGS) $(XMMS_CFLAGS)
+ PRJ_CFLAGS = -DWITH_ZLIB -DWITH_PNG -DEMBED_TCL -DJSS_CAM -DWITH_ZIP #-DWITH_FTE_VFS
+-BASE_CFLAGS = -pipe -Wall -funsigned-char $(ARCH_CFLAGS) $(PRJ_CFLAGS) -I ./libs
++BASE_CFLAGS := $(CFLAGS) -pipe -Wall -funsigned-char $(ARCH_CFLAGS) $(PRJ_CFLAGS) `pcre-config --cflags` -I$(TCL_INCLUDEDIR) -I.. -DDATADIR='"$(Q1DIR)"'
+ifeq ($(USE_OPTIMIZED_CFLAGS),YES)
- RELEASE_CFLAGS = -pipe -O2 -fno-strict-aliasing -ffast-math -fomit-frame-pointer -fexpensive-optimizations -funroll-loops
+ RELEASE_CFLAGS = -O2 -fno-strict-aliasing -ffast-math -funroll-loops
+endif
DEBUG_CFLAGS = -ggdb
# opengl builds
-@@ -92,9 +88,9 @@
- CFLAGS = $(BASE_CFLAGS) $(DEBUG_CFLAGS) -D_DEBUG
+@@ -96,13 +87,13 @@
endif
+ ifeq ($(TYPE),release)
-LDFLAGS = -lm -lpthread
--COMMON_LIBS = libs/$(LIB_PREFIX)/libpng.a libs/$(LIB_PREFIX)/libz.a libs/$(LIB_PREFIX)/libpcre.a libs/$(LIB_PREFIX)/libexpat.a libs/$(LIB_PREFIX)/libtcl8.4.a
++LDFLAGS = -lm -pthread
+ else
+ LDFLAGS = -ggdb -lm -lpthread
+ endif
+
+-COMMON_LIBS = libs/$(LIB_PREFIX)/minizip.a libs/$(LIB_PREFIX)/libpng.a libs/$(LIB_PREFIX)/libz.a libs/$(LIB_PREFIX)/libpcre.a libs/$(LIB_PREFIX)/libexpat.a libs/$(LIB_PREFIX)/libtcl8.4.a
-GL_LIBS = libs/$(LIB_PREFIX)/libjpeg.a
-+LDFLAGS = -L$(LOCALBASE)/lib -L$(X11BASE)/lib
-+COMMON_LIBS = -lm -lpng -lz `pcre-config --libs` `glib-config --libs` -lexpat -ltcl$(TCL_SUFX) $(PTHREAD_LIBS)
++COMMON_LIBS = -lm -lpng -lz `pcre-config --libs` `glib-config --libs` -lexpat -ltcl$(TCL_SUFX)
+GL_LIBS = -ljpeg
- include Makefile.list
-
+ ifeq ($(OS),freebsd)
+ X11BASE ?= /usr/X11R6
diff --git a/games/ezquake/files/patch-Makefile.list b/games/ezquake/files/patch-Makefile.list
index a409158362f5..cc75d55c8c63 100644
--- a/games/ezquake/files/patch-Makefile.list
+++ b/games/ezquake/files/patch-Makefile.list
@@ -1,7 +1,17 @@
---- Makefile.list.orig Sat Nov 25 15:28:35 2006
-+++ Makefile.list Tue Dec 19 20:02:43 2006
-@@ -156,7 +156,6 @@
- cd_linux \
+--- Makefile.list.orig Fri Jan 4 11:28:34 2008
++++ Makefile.list Fri Jan 4 11:28:47 2008
+@@ -109,7 +109,8 @@
+ net_chan \
+ q_shared \
+ version \
+- zone
++ zone \
++ ../unzip ../ioapi
+
+ GL_C_FILES := \
+ collision \
+@@ -167,7 +168,6 @@
+ in_linux \
keymap_x11 \
localtime_linux \
- snd_alsa \
diff --git a/games/ezquake/files/patch-cd_linux.c b/games/ezquake/files/patch-cd_linux.c
deleted file mode 100644
index 9ee8d0998b20..000000000000
--- a/games/ezquake/files/patch-cd_linux.c
+++ /dev/null
@@ -1,253 +0,0 @@
---- ./cd_linux.c.orig Thu Apr 6 20:23:18 2006
-+++ ./cd_linux.c Tue Aug 29 20:59:12 2006
-@@ -30,7 +30,11 @@
- #include <string.h>
- #include <time.h>
- #include <errno.h>
-+#ifdef __FreeBSD__
-+#include <sys/cdio.h>
-+#else
- #include <linux/cdrom.h>
-+#endif
-
- #include "quakedef.h"
- #include "cdaudio.h"
-@@ -54,8 +58,13 @@
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCEJECT) == -1)
-+ Com_DPrintf ("ioctl cdioceject failed\n");
-+#else
- if ( ioctl(cdfile, CDROMEJECT) == -1 )
- Com_DPrintf ("ioctl cdromeject failed\n");
-+#endif
- }
-
-
-@@ -64,30 +73,53 @@
- if (cdfile == -1 || !enabled)
- return; // no cd init'd
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCCLOSE) == -1)
-+ Com_DPrintf ("ioctl cdiocclose failed\n");
-+#else
- if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
- Com_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)
-+ {
-+ Com_DPrintf ("ioctl cdioreadtocheader failed\n");
-+#else
- if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 )
- {
- Com_DPrintf ("ioctl cdromreadtochdr failed\n");
-+#endif
- return -1;
- }
-
-+#ifdef __FreeBSD__
-+ if (tochdr.starting_track < 1)
-+#else
- if (tochdr.cdth_trk0 < 1)
-+#endif
- {
- Com_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 +127,14 @@
-
- void CDAudio_Play(byte track, qbool 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 +154,21 @@
- return;
- }
-
-+#ifdef __FreeBSD__
-+ #define CDROM_DATA_TRACK 4
-+ 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 )
-+ {
-+ Com_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
- {
- Com_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)
-+ {
-+ Com_DPrintf ("ioctl cdiocplaytracks failed\n");
-+#else
- if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
- {
- Com_DPrintf ("ioctl cdromplaytrkind failed\n");
-+#endif
- return;
- }
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCRESUME) == -1)
-+ Com_DPrintf ("ioctl cdiocresume failed\n");
-+#else
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Com_DPrintf ("ioctl cdromresume failed\n");
-+#endif
-
- playLooping = looping;
- playTrack = track;
-@@ -168,8 +240,13 @@
- if (!playing)
- return;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCSTOP) == -1)
-+ Com_DPrintf ("ioctl cdiocstop failed (%d)\n", errno);
-+#else
- if ( ioctl(cdfile, CDROMSTOP) == -1 )
- Com_DPrintf ("ioctl cdromstop failed (%d)\n", errno);
-+#endif
-
- wasPlaying = false;
- playing = false;
-@@ -183,8 +260,13 @@
- if (!playing)
- return;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCPAUSE) == -1)
-+ Com_DPrintf ("ioctl cdiocpause failed\n");
-+#else
- if ( ioctl(cdfile, CDROMPAUSE) == -1 )
- Com_DPrintf ("ioctl cdrompause failed\n");
-+#endif
-
- wasPlaying = playing;
- playing = false;
-@@ -202,8 +284,13 @@
- if (!wasPlaying)
- return;
-
-+#ifdef __FreeBSD__
-+ if (ioctl(cdfile, CDIOCRESUME) == -1)
-+ Com_DPrintf ("ioctl cdiocresume failed\n");
-+#else
- if ( ioctl(cdfile, CDROMRESUME) == -1 )
- Com_DPrintf ("ioctl cdromresume failed\n");
-+#endif
- playing = true;
- }
-
-@@ -299,7 +386,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)
-@@ -323,6 +415,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 ) {
-+ Com_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 ) {
- Com_DPrintf ("ioctl cdromsubchnl failed\n");
-@@ -335,6 +445,7 @@
- if (playLooping)
- CDAudio_Play(playTrack, true);
- }
-+#endif
- }
- }
-
diff --git a/games/ezquake/files/patch-cl_tcl.c b/games/ezquake/files/patch-cl_tcl.c
deleted file mode 100644
index 9d821fec2370..000000000000
--- a/games/ezquake/files/patch-cl_tcl.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./cl_tcl.c.orig Tue Apr 18 17:59:55 2006
-+++ ./cl_tcl.c Tue Aug 29 20:59:12 2006
-@@ -24,6 +24,7 @@
- #define STATIC_BUILD
- #include <tcl.h>
- #include <time.h>
-+#include <dlfcn.h>
- #include "quakedef.h"
-
- extern cmd_function_t *impulse_cmd;
diff --git a/games/ezquake/files/patch-common.c b/games/ezquake/files/patch-common.c
index c1c3f52dea9c..184fbc5ef173 100644
--- a/games/ezquake/files/patch-common.c
+++ b/games/ezquake/files/patch-common.c
@@ -1,52 +1,36 @@
---- common.c.orig Tue Oct 24 12:50:11 2006
-+++ common.c Tue Dec 19 14:11:31 2006
-@@ -931,14 +931,18 @@
- }
-
- void FS_InitFilesystem (void) {
-+ char *home;
-+ char homepath[MAX_OSPATH];
- int i;
+--- common.c.orig Fri Jan 4 12:29:52 2008
++++ common.c Fri Jan 4 12:41:04 2008
+@@ -2012,7 +2012,7 @@
+ if (!Sys_fullpath(com_basedir, "/proc/self/exe", sizeof(com_basedir)))
+ Sys_Error("FS_InitFilesystemEx: Sys_fullpath failed");
+ #else
+- com_basedir[0] = 0; // FIXME: MAC / FreeBSD
++ snprintf(com_basedir, sizeof(com_basedir), "%s/.ezquake/", getenv("HOME") ? getenv("HOME") : ".");
+ #endif
-+ home = getenv("HOME");
-+
- // -basedir <path>
- // Overrides the system supplied base directory (under id1)
- if ((i = COM_CheckParm ("-basedir")) && i < com_argc - 1)
+ // strip ezquake*.exe, we need only path
+@@ -2029,12 +2029,7 @@
strlcpy (com_basedir, com_argv[i + 1], sizeof(com_basedir));
- else
-- Sys_getcwd(com_basedir, sizeof(com_basedir) - 1); // FIXME strlcpy (com_basedir, sizeof(com_basedir, "."); ?
-+ strlcpy(com_basedir, DATADIR, sizeof(com_basedir) - 1);
+ }
+ else { // made com_basedir equa to cwd
+-//#ifdef __FreeBSD__
+-// strlcpy(com_basedir, DATADIR, sizeof(com_basedir) - 1);
+-//#else
+-
+- Sys_getcwd(com_basedir, sizeof(com_basedir) - 1); // FIXME strlcpy (com_basedir, ".", sizeof(com_basedir)); ?
+-//#endif
++ snprintf(com_basedir, sizeof(com_basedir), "%s/.ezquake/", getenv("HOME") ? getenv("HOME") : ".");
+ }
for (i = 0; i < (int) strlen(com_basedir); i++)
- if (com_basedir[i] == '\\')
-@@ -950,9 +954,14 @@
+@@ -2078,6 +2073,10 @@
+ }
// start up with id1 by default
- FS_AddGameDirectory ( va("%s/id1", com_basedir) );
-- FS_AddGameDirectory ( va("%s/ezquake", com_basedir) );
-+ if (home != NULL)
-+ FS_AddGameDirectory(va("%s/.ezquake/id1", home));
- FS_AddGameDirectory ( va("%s/qw", com_basedir) );
-
-+ FS_AddGameDirectory ( va("%s/ezquake", com_basedir) );
-+ if (home != NULL)
-+ FS_AddGameDirectory(va("%s/.ezquake/ezquake", home));
++ FS_AddGameDirectory(DATADIR, "id1");
++ FS_AddGameDirectory(DATADIR, "ezquake");
++ FS_AddGameDirectory(DATADIR, "qw");
+
- // any set gamedirs will be freed up to here
- com_base_searchpaths = com_searchpaths;
-
-@@ -971,6 +980,13 @@
- if( UserdirSet )
- #endif
- FS_SetGamedir("qw");
-+ }
-+
-+ if (home != NULL) {
-+ snprintf(homepath, sizeof(homepath), "%s/.ezquake/%s", home, com_gamedirfile);
-+ COM_CreatePath(homepath);
-+ Sys_mkdir(homepath);
-+ FS_AddGameDirectory(homepath);
- }
- }
+ FS_AddGameDirectory(com_basedir, "id1");
+ FS_AddGameDirectory(com_basedir, "ezquake");
diff --git a/games/ezquake/files/patch-host.c b/games/ezquake/files/patch-host.c
deleted file mode 100644
index 7e1378c0eabd..000000000000
--- a/games/ezquake/files/patch-host.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- host.c.orig Tue Dec 19 19:51:09 2006
-+++ host.c Tue Dec 19 19:51:13 2006
-@@ -249,7 +249,7 @@
-
- #ifdef __i386__
- unsigned long long old_tsc, tsc_freq;
-- struct timeval tp, tp_old;
-+ struct timeval tp, old_tp;
- #endif
-
- mib[0] = CTL_HW;
diff --git a/games/ezquake/files/patch-image.c b/games/ezquake/files/patch-image.c
deleted file mode 100644
index 4dac1571b6da..000000000000
--- a/games/ezquake/files/patch-image.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- image.c.orig Thu Dec 14 10:04:06 2006
-+++ image.c Tue Dec 19 19:00:49 2006
-@@ -20,6 +20,7 @@
- $Id: image.c,v 1.33 2006/12/14 13:04:06 disconn3ct Exp $
- */
-
-+#include <dlfcn.h>
- #include "quakedef.h"
-
-
diff --git a/games/ezquake/files/patch-modules.c b/games/ezquake/files/patch-modules.c
deleted file mode 100644
index e3b4382a3f20..000000000000
--- a/games/ezquake/files/patch-modules.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./modules.c.orig Mon Mar 20 10:51:27 2006
-+++ ./modules.c Tue Aug 29 20:59:12 2006
-@@ -20,6 +20,7 @@
- $Id: modules.c,v 1.8 2006/03/20 13:51:27 vvd0 Exp $
- */
-
-+#include <dlfcn.h>
- #include "quakedef.h"
-
-
diff --git a/games/ezquake/files/patch-mp3_player.c b/games/ezquake/files/patch-mp3_player.c
deleted file mode 100644
index 561213a96798..000000000000
--- a/games/ezquake/files/patch-mp3_player.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- mp3_player.c.orig Thu Apr 6 20:23:18 2006
-+++ mp3_player.c Wed Aug 30 20:11:52 2006
-@@ -21,6 +21,7 @@
- */
-
-
-+#include <dlfcn.h>
- #include "quakedef.h"
- #include "mp3_player.h"
-
-@@ -58,9 +59,10 @@
-
- #include <sys/wait.h>
- #include <sys/types.h> // fork, execv, usleep
-+#include <signal.h>
- #include <unistd.h> // fork, execv, usleep
-
--cvar_t mp3_dir = {"mp3_xmms_dir", "/usr/local/bin"};
-+cvar_t mp3_dir = {"mp3_xmms_dir", "%%X11BASE%%/bin"};
- cvar_t mp3_xmms_session = {"mp3_xmms_session", "0"};
-
- #endif
-@@ -134,7 +136,7 @@
- }
-
- static void XMMS_LoadLibrary(void) {
-- if (!(libxmms_handle = dlopen("libxmms.so.1", RTLD_NOW)) && !(libxmms_handle = dlopen("libxmms.so", RTLD_NOW)))
-+ if (!(libxmms_handle = dlopen("libxmms.so", RTLD_NOW)))
- return;
-
- if (!QLib_ProcessProcdef(libxmms_handle, xmmsProcs, NUM_XMMSPROCS)) {
diff --git a/games/ezquake/files/patch-q_shared.h b/games/ezquake/files/patch-q_shared.h
index b6fc12a7a0c0..a4ae32d61198 100644
--- a/games/ezquake/files/patch-q_shared.h
+++ b/games/ezquake/files/patch-q_shared.h
@@ -1,35 +1,20 @@
---- q_shared.h.orig Tue Dec 5 22:01:04 2006
-+++ q_shared.h Tue Dec 19 19:45:32 2006
-@@ -31,6 +31,7 @@
- #include <stdlib.h>
+--- q_shared.h.orig Fri Jan 4 10:53:25 2008
++++ q_shared.h Fri Jan 4 11:10:59 2008
+@@ -32,6 +32,17 @@
#include <ctype.h>
#include <assert.h>
-+#include <machine/endian.h>
-
- #include "mathlib.h"
- #include "sys.h"
-@@ -114,21 +115,21 @@
- float FloatSwapPDP2Big (float f);
- float FloatSwapPDP2Lit (float f);
--#ifdef __BIG_ENDIAN__Q__
++#ifdef __FreeBSD__
++#include <machine/endian.h>
+#if BYTE_ORDER == BIG_ENDIAN
- #define BigShort(x) (x)
- #define BigLong(x) (x)
- #define BigFloat(x) (x)
- #define LittleShort(x) ShortSwap(x)
- #define LittleLong(x) LongSwap(x)
- #define LittleFloat(x) FloatSwap(x)
--#elif defined(__LITTLE_ENDIAN__Q__)
++#define __BIG_ENDIAN__ 1
+#elif BYTE_ORDER == LITTLE_ENDIAN
- #define BigShort(x) ShortSwap(x)
- #define BigLong(x) LongSwap(x)
- #define BigFloat(x) FloatSwap(x)
- #define LittleShort(x) (x)
- #define LittleLong(x) (x)
- #define LittleFloat(x) (x)
--#elif defined(__PDP_ENDIAN__Q__)
++#define __LITTLE_ENDIAN__ 1
+#elif BYTE_ORDER == PDP_ENDIAN
- #define BigShort(x) ShortSwap(x)
- #define BigLong(x) LongSwapPDP2Big(x)
- #define BigFloat(x) FloatSwapPDP2Big(x)
++#define __PDP_ENDIAN__ 1
++#endif
++#endif
++
+ #define wchar unsigned short // 16-bit Unicode char
+
+ #include "mathlib.h"
diff --git a/games/ezquake/files/patch-snd_dma.c b/games/ezquake/files/patch-snd_dma.c
index dac408ff9ef6..d3e5c41180c3 100644
--- a/games/ezquake/files/patch-snd_dma.c
+++ b/games/ezquake/files/patch-snd_dma.c
@@ -1,25 +1,11 @@
---- snd_dma.c.orig Fri Dec 22 02:00:07 2006
-+++ snd_dma.c Fri Dec 22 02:00:22 2006
-@@ -90,11 +90,11 @@
- cvar_t s_swapstereo = {"s_swapstereo", "0", CVAR_ARCHIVE};
-
- cvar_t s_khz = {"s_khz", "11", CVAR_ARCHIVE};
--#ifdef __linux__
-+#ifdef __unix__
- cvar_t s_noalsa = {"s_noalsa", "0"};
- // ALSA only -->
+--- snd_dma.c.orig Fri Jan 4 07:05:02 2008
++++ snd_dma.c Fri Jan 4 07:06:53 2008
+@@ -94,7 +94,7 @@
+ cvar_t s_khz = {"s_khz", "11", CVAR_ARCHIVE, OnChange_s_khz};
+ #ifdef __FreeBSD__
cvar_t s_stereo = {"s_stereo", "1"};
--cvar_t s_device = {"s_device", "default"};
+-cvar_t s_device = {"s_device", "/dev/dsp0.0"};
+cvar_t s_device = {"s_device", "/dev/dsp"};
cvar_t s_bits = {"s_bits", "16"};
- // <-- ALSA only
#endif
-@@ -185,7 +185,7 @@
- Cvar_Register(&s_show);
- Cvar_Register(&s_mixahead);
- Cvar_Register(&s_swapstereo);
--#ifdef __linux__
-+#ifdef __unix__
- Cvar_Register(&s_noalsa);
- Cvar_Register(&s_stereo);
- Cvar_Register(&s_device);
+
diff --git a/games/ezquake/files/patch-snd_linux.c b/games/ezquake/files/patch-snd_linux.c
deleted file mode 100644
index d0540851a469..000000000000
--- a/games/ezquake/files/patch-snd_linux.c
+++ /dev/null
@@ -1,77 +0,0 @@
---- snd_linux.c.orig Tue May 16 06:40:16 2006
-+++ snd_linux.c Tue Dec 19 19:22:24 2006
-@@ -21,19 +21,14 @@
-
- #include "quakedef.h"
-
--static qbool SNDDMA_ALSA = true;
- // Note: The functions here keep track of if the sound system is inited.
- // They perform checks so that the real functions are only called if appropriate.
-
-
- // Prototypes
--qbool SNDDMA_Init_ALSA(void);
- qbool SNDDMA_Init_OSS(void);
--int SNDDMA_GetDMAPos_ALSA(void);
- int SNDDMA_GetDMAPos_OSS(void);
--void SNDDMA_Shutdown_ALSA(void);
- void SNDDMA_Shutdown_OSS(void);
--void SNDDMA_Submit_ALSA(void);
-
-
- // Main functions
-@@ -41,49 +36,24 @@
- {
- int retval;
-
-- // Give user the option to force OSS...
-- if (Cvar_VariableValue("s_noalsa")) {
-- // User wants us to use OSS...
-- SNDDMA_ALSA = false;
-- Com_Printf("sound: Using OSS at user's request...\n");
-- retval = SNDDMA_Init_OSS();
-- } else {
-- // Try ALSA first...
-- Com_Printf("sound: Attempting to initialise ALSA...\n");
-- retval = SNDDMA_Init_ALSA();
-- if (retval) {
-- SNDDMA_ALSA = true;
-- } else {
-- // Fall back to OSS...
-- SNDDMA_ALSA = false;
-- Com_Printf("sound: Falling back to OSS...\n");
-- retval = SNDDMA_Init_OSS();
-- }
-- }
-+ Com_Printf("sound: Initializing OSS...\n");
-+ retval = SNDDMA_Init_OSS();
-
- return retval;
- }
-
- int SNDDMA_GetDMAPos(void)
- {
-- if (SNDDMA_ALSA)
-- return SNDDMA_GetDMAPos_ALSA();
-- else
-- return SNDDMA_GetDMAPos_OSS();
-+ return SNDDMA_GetDMAPos_OSS();
- }
-
- void SNDDMA_Shutdown(void)
- {
-- if (SNDDMA_ALSA)
-- SNDDMA_Shutdown_ALSA();
-- else
-- SNDDMA_Shutdown_OSS();
-+ SNDDMA_Shutdown_OSS();
- }
-
- //Send sound to device if buffer isn't really the dma buffer
- void SNDDMA_Submit(void)
- {
-- if (SNDDMA_ALSA)
-- SNDDMA_Submit_ALSA();
-- // OSS doesn't use this so no need to call it.
-+ // OSS doesn't use this so no need to call it.
- }
diff --git a/games/ezquake/files/patch-snd_oss.c b/games/ezquake/files/patch-snd_oss.c
deleted file mode 100644
index 010e9a99d32f..000000000000
--- a/games/ezquake/files/patch-snd_oss.c
+++ /dev/null
@@ -1,42 +0,0 @@
---- snd_oss.c.orig Fri Dec 22 01:11:27 2006
-+++ snd_oss.c Fri Dec 22 01:14:20 2006
-@@ -27,7 +27,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"
-@@ -70,13 +74,6 @@
- return 0;
- }
-
-- if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) {
-- perror("GETOSPACE");
-- Com_Printf("Um, can't do GETOSPACE?\n");
-- close(audio_fd);
-- return 0;
-- }
--
- // set sample bits & speed
- shm->format.width = (int) (s_bits.value / 8);
- shm->format.speed = SND_Rate((int)s_khz.value);
-@@ -127,6 +124,13 @@
- } else {
- perror(snd_dev);
- Com_Printf("%d-bit sound not supported.", shm->format.width * 8);
-+ close(audio_fd);
-+ return 0;
-+ }
-+
-+ if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) {
-+ perror("GETOSPACE");
-+ Com_Printf("Um, can't do GETOSPACE?\n");
- close(audio_fd);
- return 0;
- }
diff --git a/games/ezquake/files/patch-sys_linux.c b/games/ezquake/files/patch-sys_linux.c
deleted file mode 100644
index ceef7b379869..000000000000
--- a/games/ezquake/files/patch-sys_linux.c
+++ /dev/null
@@ -1,26 +0,0 @@
---- ./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>
--#include <linux/rtc.h>
- #include <sys/ioctl.h>
- #include <sys/poll.h>
- #include <sched.h>
-@@ -257,6 +256,7 @@
- if (COM_CheckParm("-nostdout"))
- sys_nostdout.value = 1;
-
-+#if 0
- /* also check for -rtctimer before Host_Init is called */
- if (COM_CheckParm("-rtctimer")) {
- int retval;
-@@ -293,6 +293,7 @@
-
- Com_Printf("RTC Timer Enabled.\n");
- }
-+#endif
-
- #ifdef id386
- Sys_SetFPCW();
diff --git a/games/ezquake/files/patch-teamplay.c b/games/ezquake/files/patch-teamplay.c
new file mode 100644
index 000000000000..d0dfdab8d03d
--- /dev/null
+++ b/games/ezquake/files/patch-teamplay.c
@@ -0,0 +1,10 @@
+--- teamplay.c.orig Fri Jan 4 10:53:25 2008
++++ teamplay.c Fri Jan 4 11:14:15 2008
+@@ -21,6 +21,7 @@
+
+ #include <time.h>
+ #include <string.h>
++#include <limits.h>
+ #include "quakedef.h"
+ #include "ignore.h"
+ #ifdef GLQUAKE
diff --git a/games/ezquake/files/patch-vid_common_gl.c b/games/ezquake/files/patch-vid_common_gl.c
index 325ea0b91dee..eda8f1076951 100644
--- a/games/ezquake/files/patch-vid_common_gl.c
+++ b/games/ezquake/files/patch-vid_common_gl.c
@@ -1,6 +1,6 @@
---- ./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 @@
+--- vid_common_gl.c.orig Fri Jan 4 07:13:37 2008
++++ vid_common_gl.c Fri Jan 4 07:15:29 2008
+@@ -68,6 +68,9 @@
lpMTexFUNC qglMultiTexCoord2f = NULL;
lpSelTexFUNC qglActiveTexture = NULL;
@@ -10,13 +10,14 @@
qbool gl_combine = false;
qbool gl_add_ext = false;
-@@ -175,6 +178,9 @@
- Cvar_Register (&gl_strings);
+@@ -198,6 +201,10 @@
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));
+ Cvar_Register (&gl_maxtmu2);
+
+ qglXGetVideoSyncSGI = GL_GetProcAddress("glXGetVideoSyncSGI");
+ qglXWaitVideoSyncSGI = GL_GetProcAddress("glXWaitVideoSyncSGI");
-
++
#ifndef __APPLE__
glClearColor (1,0,0,0);
+ #else
diff --git a/games/ezquake/files/patch-vid_glx.c b/games/ezquake/files/patch-vid_glx.c
deleted file mode 100644
index 3335b5438568..000000000000
--- a/games/ezquake/files/patch-vid_glx.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- ./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;