diff options
author | Alejandro Pulver <alepulver@FreeBSD.org> | 2006-05-25 21:42:29 +0000 |
---|---|---|
committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2006-05-25 21:42:29 +0000 |
commit | eb157204ccbf1714eaf25cf1a2689b1c6223a38d (patch) | |
tree | 328d2119da15fc71798f66dd05f3bd2b39105d9b /games | |
parent | 8e712e0aa7280abef5f8c890bcde199098984e96 (diff) | |
download | ports-eb157204ccbf1714eaf25cf1a2689b1c6223a38d.tar.gz ports-eb157204ccbf1714eaf25cf1a2689b1c6223a38d.zip |
Notes
Diffstat (limited to 'games')
48 files changed, 1614 insertions, 592 deletions
diff --git a/games/q3cellshading/Makefile b/games/q3cellshading/Makefile index 8e3850349113..c764ffb614b1 100644 --- a/games/q3cellshading/Makefile +++ b/games/q3cellshading/Makefile @@ -7,57 +7,106 @@ PORTNAME= quake3 PORTVERSION= 1.32b -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= games -MASTER_SITES= ${MASTER_SITE_IDSOFTWARE:S|$|source/|} \ - http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \ +MASTER_SITES= http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \ http://www.planetgargoyle.com/ \ http://www.teamdarkside.net/ \ http://0day.icculus.org/mirrors/quake3/ \ - http://www.olpainless.net/files/ + http://www.olpainless.net/files/ \ + ${MASTER_SITE_IDSOFTWARE:S|$|source/|} DISTFILES= ${DISTNAME}-source${EXTRACT_SUFX} MAINTAINER= shirshegsm@gmail.com COMMENT= Quake III Arena -- first person shooter (native build) -BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm - USE_ZIP= yes -USE_CRLF= yes +USE_DOS2UNIX= yes USE_GMAKE= yes -USE_PERL5_BUILD=yes -USE_GL= yes USE_GCC= 3.2+ +BUILD_WRKSRC= ${WRKSRC}/code/unix + +OPTIONS= CLIENT "Build client" on \ + DEDICATED "Build dedicated server" on \ + GAMELIBS "Build game libraries (mandatory on !i386)" off \ + OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ + SMP "Build SMP (threaded) client" on + +MAKE_ENV= LIBDIR="${LIBDIR}" DLL_ONLY=true +PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" -PLIST_FILES= bin/q3ded bin/quake3 +LIBDIR= ${PREFIX}/lib/${PORTNAME} .include <bsd.port.pre.mk> -# Anyone to play with this on !i386 -.if ${ARCH} != "i386" -BROKEN= "Does not compile on !i386 (feel free to submit fixes)" +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) \ + && defined(WITHOUT_SMP) +IGNORE= needs at least one of CLIENT, DEDICATED and SMP options .endif -.if ${PERL_LEVEL} < 500600 -BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 +.if ${ARCH} == "i386" +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm .endif -post-patch: - @${REINPLACE_CMD} -e 's|%%Q3DIR%%|"${Q3DIR}"|' \ - ${WRKSRC}/code/unix/unix_shared.c - @${REINPLACE_CMD} -e 's|botlib.log|/dev/null|' ${WRKSRC}/code/botlib/be_interface.c +.if !defined(WITHOUT_CLIENT) && !defined(WITHOUT_SMP) +USE_GL= yes +.endif + +.if !defined(WITHOUT_CLIENT) +MAKE_ENV+= CLIENT=YES +PLIST_SUB+= CLIENT="" +Q3BIN+= quake3 +.else +PLIST_SUB+= CLIENT="@comment " +.endif + +.if !defined(WITHOUT_DEDICATED) +MAKE_ENV+= DEDICATED=YES +PLIST_SUB+= DEDICATED="" +Q3BIN+= q3ded +.else +PLIST_SUB+= DEDICATED="@comment " +.endif + +.if defined(WITH_GAMELIBS) || ${ARCH} != "i386" +MAKE_ENV+= GAMELIBS=YES +PLIST_SUB+= GAMELIBS="" +.else +PLIST_SUB+= GAMELIBS="@comment " +.endif -pre-build: - ${MKDIR} ${WRKSRC}/lcc/build +.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +MAKE_ENV+= OPTIMIZED_CFLAGS=YES +.endif -do-build: - cd ${WRKSRC}/code && ${MAKE_ENV} ${PERL} unix/cons +.if !defined(WITHOUT_SMP) +MAKE_ENV+= SMP=YES \ + PTHREAD_LIBS="${PTHREAD_LIBS}" +PLIST_SUB+= SMP="" +Q3BIN+= quake3-smp +.else +PLIST_SUB+= SMP="@comment " +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \ + ${WRKSRC}/code/botlib/be_interface.c + @${REINPLACE_CMD} -e \ + 's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \ + ${WRKSRC}/code/botlib/be_interface.c \ + ${WRKSRC}/code/qcommon/common.c \ + ${WRKSRC}/code/renderer/tr_init.c do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/code/install/linuxq3ded \ - ${PREFIX}/bin/q3ded - ${INSTALL_PROGRAM} ${WRKSRC}/code/install/linuxquake3 \ - ${PREFIX}/bin/quake3 +.for bin in ${Q3BIN} + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${PREFIX}/bin +.endfor +.if defined(WITH_GAMELIBS) || ${ARCH} != "i386" +.for dir in baseq3 missionpack + ${MKDIR} ${LIBDIR}/${dir} + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${LIBDIR}/${dir} +.endfor +.endif .include "${.CURDIR}/../quake3-data/Makefile.include" .include <bsd.port.post.mk> diff --git a/games/q3cellshading/files/patch-code-Construct b/games/q3cellshading/files/patch-code-Construct deleted file mode 100644 index 8ec4aa967b32..000000000000 --- a/games/q3cellshading/files/patch-code-Construct +++ /dev/null @@ -1,69 +0,0 @@ ---- code/Construct.orig Mon Aug 15 20:56:27 2005 -+++ code/Construct Wed Nov 23 10:37:04 2005 -@@ -19,8 +19,8 @@ - use Cons_gcc; - - # defaults --$config = 'debug'; --$do_smp = 1; -+$config = 'release'; -+$do_smp = 0; - $do_masterserver = 0; - $do_authserver = 0; - $do_authport = 0; -@@ -32,8 +32,8 @@ - $DO_WIN32 = 0; - $NO_VM = 0; - $NO_SO = 0; --$CC='gcc'; --$CXX='g++'; -+$CC=$ENV{CC}; -+$CXX=$ENV{CXX}; - - # detect an sdk build (don't attempt client build and other things) - if ( -r 'unix/Conscript-client' ) -@@ -63,9 +63,9 @@ - else - { - # libc .. do the little magic! -- $libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3'; -- $libc = `$libc_cmd`; -- chop ($libc); -+ # $libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3'; -+ # $libc = `$libc_cmd`; -+ # chop ($libc); - } - - if ($DO_WIN32 eq 1) -@@ -227,7 +227,7 @@ - # build the config directory - $CONFIG_DIR = $config . '-' . $cpu . '-' . $OS . '-' . $libc; - --$COMMON_CFLAGS = '-pipe -fsigned-char '; -+$COMMON_CFLAGS = '-pipe -fsigned-char -I/usr/local/include -L/usr/local/lib -I/usr/X11R6/include -L/usr/X11R6/lib '; - - if ($config eq 'debug') - { -@@ -237,7 +237,7 @@ - } - else - { -- $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce '; -+ $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce '; - $BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp '; - } - -@@ -287,11 +287,11 @@ - system("mkdir qvmtools 2>/dev/null"); - if (@_[0] eq 'q3lcc') - { -- system("cd ../lcc ; make all ; cp /tmp/lcc ../code/qvmtools/q3lcc ; cp /tmp/rcc ../code/qvmtools/q3rcc ; cp /tmp/cpp ../code/qvmtools/q3cpp"); -+ system("cd ../lcc ; gmake all ; cp ../lcc/build/lcc ../code/qvmtools/q3lcc ; cp ../lcc/build/rcc ../code/qvmtools/q3rcc ; cp ../lcc/build/cpp ../code/qvmtools/q3cpp"); - } - elsif (@_[0] eq 'q3asm') - { -- system("cd ../q3asm ; make ; cp q3asm ../code/qvmtools"); -+ system("cd ../q3asm ; gmake ; cp q3asm ../code/qvmtools"); - } - else - { diff --git a/games/q3cellshading/files/patch-code-botlib-linux-i386.mak b/games/q3cellshading/files/patch-code-botlib-linux-i386.mak deleted file mode 100644 index 2fadee73c19a..000000000000 --- a/games/q3cellshading/files/patch-code-botlib-linux-i386.mak +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/botlib/linux-i386.mak ../quake3-1.32b-BUILT/./code/botlib/linux-i386.mak ---- ./code/botlib/linux-i386.mak Wed May 23 15:07:59 2001 -+++ ../quake3-1.32b-BUILT/./code/botlib/linux-i386.mak Mon Aug 22 20:55:02 2005 -@@ -14,7 +14,7 @@ - #use these when debugging - #CFLAGS=$(BASE_CFLAGS) -g - --LDFLAGS=-ldl -lm -+LDFLAGS=-lm - SHLIBEXT=so - SHLIBCFLAGS=-fPIC - SHLIBLDFLAGS=-shared diff --git a/games/q3cellshading/files/patch-code-bspc-Conscript b/games/q3cellshading/files/patch-code-bspc-Conscript deleted file mode 100644 index 08ed1797e7c2..000000000000 --- a/games/q3cellshading/files/patch-code-bspc-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/bspc/Conscript ../quake3-1.32b-BUILT/./code/bspc/Conscript ---- ./code/bspc/Conscript Tue Aug 16 01:47:07 2005 -+++ ../quake3-1.32b-BUILT/./code/bspc/Conscript Mon Aug 22 20:54:27 2005 -@@ -67,7 +67,7 @@ - CXX => $CXX, - LINK => $LINK, - CFLAGS => $BSPC_BASE_CFLAGS, -- LIBS => '-ldl -lm -lpthread' -+ LIBS => '-lm -lpthread' - ); - - Program $env 'bspc', @$BSPC_REF; diff --git a/games/q3cellshading/files/patch-code-bspc-Makefile b/games/q3cellshading/files/patch-code-bspc-Makefile deleted file mode 100644 index d8a00e38bfd4..000000000000 --- a/games/q3cellshading/files/patch-code-bspc-Makefile +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/bspc/Makefile ../quake3-1.32b-BUILT/./code/bspc/Makefile ---- ./code/bspc/Makefile Wed May 23 15:07:59 2001 -+++ ../quake3-1.32b-BUILT/./code/bspc/Makefile Mon Aug 22 20:54:39 2005 -@@ -18,7 +18,7 @@ - #use these when debugging - #CFLAGS=$(BASE_CFLAGS) -g - --LDFLAGS=-ldl -lm -lpthread -+LDFLAGS=-lm -lpthread - - DO_CC=$(CC) $(CFLAGS) -o $@ -c $< - diff --git a/games/q3cellshading/files/patch-code-bspc-linux-i386.mak b/games/q3cellshading/files/patch-code-bspc-linux-i386.mak deleted file mode 100644 index d8be0355f149..000000000000 --- a/games/q3cellshading/files/patch-code-bspc-linux-i386.mak +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/bspc/linux-i386.mak ../quake3-1.32b-BUILT/./code/bspc/linux-i386.mak ---- ./code/bspc/linux-i386.mak Wed May 23 15:07:59 2001 -+++ ../quake3-1.32b-BUILT/./code/bspc/linux-i386.mak Mon Aug 22 20:54:48 2005 -@@ -14,7 +14,7 @@ - #use these when debugging - #CFLAGS=$(BASE_CFLAGS) -g - --LDFLAGS=-ldl -lm -lpthread -+LDFLAGS=-lm -lpthread - - DO_CC=$(CC) $(CFLAGS) -o $@ -c $< - diff --git a/games/q3cellshading/files/patch-code-cgame-Conscript b/games/q3cellshading/files/patch-code-cgame-Conscript deleted file mode 100644 index 8e19ef9e567c..000000000000 --- a/games/q3cellshading/files/patch-code-cgame-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/cgame/Conscript ../quake3-1.32b-BUILT/./code/cgame/Conscript ---- ./code/cgame/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/cgame/Conscript Mon Aug 22 20:54:15 2005 -@@ -22,7 +22,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # for TA, use -DMISSIONPACK diff --git a/games/q3cellshading/files/patch-code-client-cl_ui.c b/games/q3cellshading/files/patch-code-client-cl_ui.c new file mode 100644 index 000000000000..58cfc63e87ea --- /dev/null +++ b/games/q3cellshading/files/patch-code-client-cl_ui.c @@ -0,0 +1,11 @@ +--- code/client/cl_ui.c.orig Thu May 25 15:41:27 2006 ++++ code/client/cl_ui.c Thu May 25 15:46:39 2006 +@@ -1166,7 +1166,7 @@ + // init for this gamestate + VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE)); + } +- else if (v != UI_API_VERSION) { ++ else if (v != 0 && v != UI_API_VERSION) { + Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION ); + cls.uiStarted = qfalse; + } diff --git a/games/q3cellshading/files/patch-code-game-Conscript b/games/q3cellshading/files/patch-code-game-Conscript deleted file mode 100644 index d6ae11d79bea..000000000000 --- a/games/q3cellshading/files/patch-code-game-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/game/Conscript ../quake3-1.32b-BUILT/./code/game/Conscript ---- ./code/game/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/game/Conscript Mon Aug 22 20:54:04 2005 -@@ -21,7 +21,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # for TA, use -DMISSIONPACK diff --git a/games/q3cellshading/files/patch-code-game-q_shared.c b/games/q3cellshading/files/patch-code-game-q_shared.c new file mode 100644 index 000000000000..efbf3bd6789b --- /dev/null +++ b/games/q3cellshading/files/patch-code-game-q_shared.c @@ -0,0 +1,99 @@ +--- code/game/q_shared.c.orig Thu May 25 13:42:26 2006 ++++ code/game/q_shared.c Thu May 25 13:44:30 2006 +@@ -99,29 +99,29 @@ + + ============================================================================ + */ +-/* ++ + // can't just use function pointers, or dll linkage can + // mess up when qcommon is included in multiple places +-static short (*_BigShort) (short l); +-static short (*_LittleShort) (short l); +-static int (*_BigLong) (int l); +-static int (*_LittleLong) (int l); ++static int16_t (*_BigShort) (int16_t l); ++static int16_t (*_LittleShort) (int16_t l); ++static int32_t (*_BigLong) (int32_t l); ++static int32_t (*_LittleLong) (int32_t l); + static qint64 (*_BigLong64) (qint64 l); + static qint64 (*_LittleLong64) (qint64 l); + static float (*_BigFloat) (const float *l); + static float (*_LittleFloat) (const float *l); + +-short BigShort(short l){return _BigShort(l);} +-short LittleShort(short l) {return _LittleShort(l);} +-int BigLong (int l) {return _BigLong(l);} +-int LittleLong (int l) {return _LittleLong(l);} +-qint64 BigLong64 (qint64 l) {return _BigLong64(l);} +-qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);} +-float BigFloat (const float *l) {return _BigFloat(l);} +-float LittleFloat (const float *l) {return _LittleFloat(l);} +-*/ ++int16_t BigShort(int16_t l){return _BigShort(l);} ++int16_t LittleShort(int16_t l) {return _LittleShort(l);} ++int32_t BigLong (int32_t l) {return _BigLong(l);} ++int32_t LittleLong (int32_t l) {return _LittleLong(l);} ++qint64 BigLong64 (qint64 l) {return _BigLong64(l);} ++qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);} ++float BigFloat (float l) {return _BigFloat(&l);} ++float LittleFloat (float l) {return _LittleFloat(&l);} + +-short ShortSwap (short l) ++ ++int16_t ShortSwap (int16_t l) + { + byte b1,b2; + +@@ -131,12 +131,12 @@ + return (b1<<8) + b2; + } + +-short ShortNoSwap (short l) ++int16_t ShortNoSwap (int16_t l) + { + return l; + } + +-int LongSwap (int l) ++int32_t LongSwap (int32_t l) + { + byte b1,b2,b3,b4; + +@@ -145,15 +145,15 @@ + b3 = (l>>16)&255; + b4 = (l>>24)&255; + +- return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; ++ return ((int32_t)b1<<24) + ((int32_t)b2<<16) + ((int32_t)b3<<8) + b4; + } + +-int LongNoSwap (int l) ++int32_t LongNoSwap (int32_t l) + { + return l; + } + +-qint64 Long64Swap (qint64 ll) ++qint64 Long64Swap (qint64 ll) + { + qint64 result; + +@@ -199,7 +199,7 @@ + Swap_Init + ================ + */ +-/* ++ + void Swap_Init (void) + { + byte swaptest[2] = {1,0}; +@@ -229,7 +229,7 @@ + } + + } +-*/ ++ + + /* + ============================================================================ diff --git a/games/q3cellshading/files/patch-code-game-q_shared.h b/games/q3cellshading/files/patch-code-game-q_shared.h index d628bf7b5a3c..4b72f5464fd3 100644 --- a/games/q3cellshading/files/patch-code-game-q_shared.h +++ b/games/q3cellshading/files/patch-code-game-q_shared.h @@ -1,7 +1,94 @@ -diff -ruN ./code/game/q_shared.h ../quake3-1.32b-BUILT/./code/game/q_shared.h ---- ./code/game/q_shared.h Tue Aug 16 02:10:07 2005 -+++ ../quake3-1.32b-BUILT/./code/game/q_shared.h Tue Aug 23 14:16:34 2005 -@@ -452,13 +452,9 @@ +--- code/game/q_shared.h.orig Thu May 25 13:26:31 2006 ++++ code/game/q_shared.h Thu May 25 13:26:58 2006 +@@ -150,12 +150,14 @@ + + #define ID_INLINE __inline + ++#if 0 + static ID_INLINE short BigShort( short l) { return ShortSwap(l); } + #define LittleShort + static ID_INLINE int BigLong(int l) { LongSwap(l); } + #define LittleLong + static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); } + #define LittleFloat ++#endif + + #define PATH_SEP '\\' + +@@ -206,12 +208,14 @@ + return fi; + } + ++#if 0 + #define BigShort + static inline short LittleShort(short l) { return ShortSwap(l); } + #define BigLong + static inline int LittleLong (int l) { return LongSwap(l); } + #define BigFloat + static inline float LittleFloat (const float l) { return FloatSwap(&l); } ++#endif + + #endif + +@@ -229,12 +233,14 @@ + + void Sys_PumpEvents( void ); + ++#if 0 + #define BigShort + static inline short LittleShort(short l) { return ShortSwap(l); } + #define BigLong + static inline int LittleLong (int l) { return LongSwap(l); } + #define BigFloat + static inline float LittleFloat (const float l) { return FloatSwap(&l); } ++#endif + + #endif + +@@ -268,6 +274,7 @@ + #define BOTLIB_HARD_LINKED + #endif + ++#if 0 + #if !idppc + inline static short BigShort( short l) { return ShortSwap(l); } + #define LittleShort +@@ -283,6 +290,7 @@ + #define BigFloat + inline static float LittleFloat (const float *l) { return FloatSwap(l); } + #endif ++#endif + + #endif + +@@ -302,10 +310,18 @@ + #define CPUSTRING "freebsd-other" + #endif + ++#include <machine/param.h> ++#if __FreeBSD_version < 500000 ++#include <inttypes.h> ++#else ++#include <stdint.h> ++#endif ++ + #define PATH_SEP '/' + + // bk010116 - omitted Q3STATIC (see Linux above), broken target + ++#if 0 + #if !idppc + static short BigShort( short l) { return ShortSwap(l); } + #define LittleShort +@@ -321,6 +337,7 @@ + #define BigFloat + static float LittleFloat (const float *l) { return FloatSwap(l); } + #endif ++#endif + + #endif + +@@ -452,13 +469,9 @@ void *Hunk_Alloc( int size, ha_pref preference ); #endif @@ -15,3 +102,32 @@ diff -ruN ./code/game/q_shared.h ../quake3-1.32b-BUILT/./code/game/q_shared.h #if !( defined __VECTORC ) void Com_Memset (void* dest, const int val, const size_t count); +@@ -888,18 +901,18 @@ + } qint64; + + //============================================= +-/* +-short BigShort(short l); +-short LittleShort(short l); +-int BigLong (int l); +-int LittleLong (int l); +-qint64 BigLong64 (qint64 l); +-qint64 LittleLong64 (qint64 l); +-float BigFloat (const float *l); +-float LittleFloat (const float *l); ++ ++int16_t BigShort(int16_t l); ++int16_t LittleShort(int16_t l); ++int32_t BigLong (int32_t l); ++int32_t LittleLong (int32_t l); ++qint64 BigLong64 (qint64 l); ++qint64 LittleLong64 (qint64 l); ++float BigFloat (float l); ++float LittleFloat (float l); + + void Swap_Init (void); +-*/ ++ + char * QDECL va(char *format, ...); + + //============================================= diff --git a/games/q3cellshading/files/patch-code-q3_ui-Conscript b/games/q3cellshading/files/patch-code-q3_ui-Conscript deleted file mode 100644 index bbddde9f2ca5..000000000000 --- a/games/q3cellshading/files/patch-code-q3_ui-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/q3_ui/Conscript ../quake3-1.32b-BUILT/./code/q3_ui/Conscript ---- ./code/q3_ui/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/q3_ui/Conscript Mon Aug 22 20:56:57 2005 -@@ -16,7 +16,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # qvm building diff --git a/games/q3cellshading/files/patch-code-qcommon-files.c b/games/q3cellshading/files/patch-code-qcommon-files.c new file mode 100644 index 000000000000..fcff4d19cad7 --- /dev/null +++ b/games/q3cellshading/files/patch-code-qcommon-files.c @@ -0,0 +1,26 @@ +--- code/qcommon/files.c.orig Thu May 25 16:39:34 2006 ++++ code/qcommon/files.c Thu May 25 16:41:43 2006 +@@ -2763,6 +2763,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory( fs_basepath->string, gameName ); + } ++ FS_AddGameDirectory( LIBDIR, gameName ); + // fs_homepath is somewhat particular to *nix systems, only add if relevant + // NOTE: same filtering below for mods and basegame + if (fs_basepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { +@@ -2777,6 +2778,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory(fs_basepath->string, fs_basegame->string); + } ++ FS_AddGameDirectory(LIBDIR, fs_basegame->string); + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + FS_AddGameDirectory(fs_homepath->string, fs_basegame->string); + } +@@ -2790,6 +2792,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string); + } ++ FS_AddGameDirectory(LIBDIR, fs_gamedirvar->string); + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + FS_AddGameDirectory(fs_homepath->string, fs_gamedirvar->string); + } diff --git a/games/q3cellshading/files/patch-code-qcommon-vm.c b/games/q3cellshading/files/patch-code-qcommon-vm.c new file mode 100644 index 000000000000..404b804d4012 --- /dev/null +++ b/games/q3cellshading/files/patch-code-qcommon-vm.c @@ -0,0 +1,20 @@ +--- code/qcommon/vm.c.orig Thu May 25 16:59:36 2006 ++++ code/qcommon/vm.c Thu May 25 17:08:51 2006 +@@ -478,7 +478,7 @@ + } + } + +- if ( interpret == VMI_NATIVE ) { ++ if ( 1 ) { + // try to load as a system dll + Com_Printf( "Loading dll file %s.\n", vm->name ); + vm->dllHandle = Sys_LoadDll( module, vm->fqpath , &vm->entryPoint, VM_DllSyscall ); +@@ -826,7 +826,7 @@ + + + +-#ifdef oDLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM ++#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM + int VM_CallCompiled( vm_t *vm, int *args ) { + return(0); + } diff --git a/games/q3cellshading/files/patch-code-ui-Conscript b/games/q3cellshading/files/patch-code-ui-Conscript deleted file mode 100644 index 0b19a27ed11f..000000000000 --- a/games/q3cellshading/files/patch-code-ui-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/ui/Conscript ../quake3-1.32b-BUILT/./code/ui/Conscript ---- ./code/ui/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/ui/Conscript Mon Aug 22 20:53:50 2005 -@@ -16,7 +16,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-DMISSIONPACK -fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # qvm building diff --git a/games/q3cellshading/files/patch-code-unix-Conscript-client b/games/q3cellshading/files/patch-code-unix-Conscript-client deleted file mode 100644 index d96e68cfd001..000000000000 --- a/games/q3cellshading/files/patch-code-unix-Conscript-client +++ /dev/null @@ -1,20 +0,0 @@ -diff -ruN ./code/unix/Conscript-client ../quake3-1.32b-BUILT/./code/unix/Conscript-client ---- ./code/unix/Conscript-client Mon Aug 15 23:56:27 2005 -+++ ../quake3-1.32b-BUILT/./code/unix/Conscript-client Mon Aug 22 21:55:50 2005 -@@ -153,7 +153,7 @@ - . $BUILD_DIR . '/unix/asmlib.a ' - . $BUILD_DIR . '/unix/inlinelib.a ' - . $BASE_LDFLAGS -- . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm' -+ . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -lm' - ); - - @RENDERER_FILES = qw( -@@ -231,7 +231,6 @@ - ../unix/linux_common.c - ../unix/linux_qgl.c - ../unix/linux_glimp.c -- ../unix/linux_joystick.c - ../unix/linux_snd.c - ../unix/linux_signals.c - ); diff --git a/games/q3cellshading/files/patch-code-unix-Conscript-dedicated b/games/q3cellshading/files/patch-code-unix-Conscript-dedicated deleted file mode 100644 index 3de75039ffe0..000000000000 --- a/games/q3cellshading/files/patch-code-unix-Conscript-dedicated +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/unix/Conscript-dedicated ../quake3-1.32b-BUILT/./code/unix/Conscript-dedicated ---- ./code/unix/Conscript-dedicated Mon Aug 15 23:56:27 2005 -+++ ../quake3-1.32b-BUILT/./code/unix/Conscript-dedicated Mon Aug 22 20:52:42 2005 -@@ -63,7 +63,7 @@ - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - # FIXME TTimo I'm not sure about what C_ONLY is for - CFLAGS => $BASE_CFLAGS . '-DC_ONLY', -- LDFLAGS => '-ldl -lm', -+ LDFLAGS => '-lm', - LIBS => ' ' - . $BUILD_DIR . '/unix/botlib.a ' - . $BUILD_DIR . '/unix/asmlib.a ' diff --git a/games/q3cellshading/files/patch-code-unix-Makefile b/games/q3cellshading/files/patch-code-unix-Makefile index 47f9174f8a2e..9b6a16757899 100644 --- a/games/q3cellshading/files/patch-code-unix-Makefile +++ b/games/q3cellshading/files/patch-code-unix-Makefile @@ -1,6 +1,43 @@ ---- code/unix/Makefile.orig Sun May 5 07:21:10 2002 -+++ code/unix/Makefile Sun Nov 20 18:48:48 2005 -@@ -136,7 +136,7 @@ +--- code/unix/Makefile.orig Thu May 25 16:59:37 2006 ++++ code/unix/Makefile Thu May 25 17:04:46 2006 +@@ -19,6 +19,7 @@ + + PLATFORM=$(shell uname|tr A-Z a-z) + PLATFORM_RELEASE=$(shell uname -r) ++ARCH=$(shell uname -m) + + ### + ### These paths are where you probably want to change things +@@ -34,7 +35,7 @@ + + # Build name + # BUILD_NAME=$(BUILD_NAME) +-BUILD_NAME=quake3.x86 ++BUILD_NAME=quake3 + + + +@@ -46,8 +47,8 @@ + + BASEQ3_DIR=$(BDIR)/baseq3 + +-BD=debug$(ARCH)$(GLIBC) +-BR=release$(ARCH)$(GLIBC) ++BD=debug ++BR=release + CDIR=$(MOUNT_DIR)/client + SDIR=$(MOUNT_DIR)/server + RDIR=$(MOUNT_DIR)/renderer +@@ -76,7 +77,7 @@ + ############################################################################# + + ## Defaults +-DLL_ONLY=false ++DLL_ONLY?=false + # bk010215 - TODO - add all defaults / kill Ryan + + +@@ -136,7 +137,7 @@ ifeq ($(ARCH),ppc) NEWPGCC=/loki/global/ppc/bin/gcc CC=$(NEWPGCC) @@ -9,7 +46,7 @@ else #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205 #NEWPGCC=/loki/global/x86/bin/gcc -@@ -146,9 +146,9 @@ +@@ -146,9 +147,9 @@ # TTimo: legacy RELEASE_CFLAGS # NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box # but building on the Mdk 7.2 baseline seems to work @@ -21,7 +58,7 @@ endif endif -@@ -162,7 +162,7 @@ +@@ -162,7 +163,7 @@ RANLIB=ranlib THREAD_LDFLAGS=-lpthread @@ -30,16 +67,109 @@ GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm ifeq ($(ARCH),axp) -@@ -223,7 +223,7 @@ - #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc - NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc - CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi ) +@@ -199,31 +200,27 @@ + + GLIBC= #libc is irrelevant + +-ifneq (,$(findstring alpha,$(shell uname -m))) +-ARCH=axp +-RPMARCH=alpha +-VENDOR=dec +-else #default to i386 +-ARCH=i386 +-RPMARCH=i386 +-VENDOR=unknown +-endif #alpha test ++BASE_CFLAGS = $(CFLAGS) -DDATADIR='\"$(Q3DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' -pipe + ++GL_CFLAGS = -I$(X11BASE)/include + +-BASE_CFLAGS = -pipe ++DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror ++RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG + +-GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include ++ifdef OPTIMIZED_CFLAGS ++ ifeq ($(ARCH),i386) ++RELEASE_CFLAGS+=-O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce ++ else ++RELEASE_CFLAGS+=-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations ++ endif ++endif + +-DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror +-ifeq ($(ARCH),axp) +-CC=pgcc +-RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations +-else +-#NEWPGCC=/loki/global/x86/bin/gcc # raistlin012301 +-#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc +-NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc +-CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi ) -RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing - fstrength-reduce -+RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing - fstrength-reduce ++ifneq ($(ARCH),i386) ++DLL_ONLY=true ++endif ++ ++ifeq ($(DLL_ONLY),true) ++BASE_CFLAGS += -DDLL_ONLY endif LIBEXT=a -@@ -283,7 +283,7 @@ +@@ -235,25 +232,37 @@ + ARFLAGS=ar rv + RANLIB=ranlib + +-THREAD_LDFLAGS=-lpthread ++THREAD_LDFLAGS=$(PTHREAD_LIBS) + # don't need -ldl (FreeBSD) +-LDFLAGS=-lm ++LDFLAGS+=-lm + #GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm + #GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm +-GLLDFLAGS=-L/usr/X11R6/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm ++GLLDFLAGS=-L$(X11BASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm + +-ifeq ($(ARCH),axp) +-TARGETS=\ +- $(B)/$(PLATFORM)q3ded +-else +-TARGETS=\ +- $(B)/$(PLATFORM)quake3 \ +- $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \ +- $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \ +- $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) ++ifdef CLIENT ++TARGETS+=$(B)/quake3 ++endif ++ ++ifdef DEDICATED ++TARGETS+=$(B)/q3ded ++endif ++ ++ifdef SMP ++TARGETS+=$(B)/quake3-smp ++endif ++ ++ifeq ($(DLL_ONLY),true) ++GAMELIBS=yes ++endif ++ ++ifdef GAMELIBS ++TARGETS+=\ ++ $(B)/baseq3/cgame.$(SHLIBEXT) \ ++ $(B)/baseq3/qagame.$(SHLIBEXT) \ ++ $(B)/baseq3/ui.$(SHLIBEXT) \ ++ $(B)/missionpack/cgame.$(SHLIBEXT) \ ++ $(B)/missionpack/qagame.$(SHLIBEXT) \ ++ $(B)/missionpack/ui.$(SHLIBEXT) + endif + + else # ifeq freebsd +@@ -283,7 +292,7 @@ ARFLAGS=ar rv RANLIB=ranlib @@ -48,16 +178,88 @@ GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm TARGETS=$(B)/sgiquake3 \ -@@ -312,7 +312,7 @@ +@@ -310,9 +319,9 @@ + RANLIB=ranlib + ifeq ($(PLATFORM),freebsd) - LDFLAGS=-lm +-LDFLAGS=-lm ++LDFLAGS+=-lm else -LDFLAGS=-ldl -lm +LDFLAGS=-lm endif # ifeq freebsd TARGETS=\ -@@ -578,7 +578,6 @@ +@@ -348,7 +357,7 @@ + $(MAKE) targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)" + + #Build both debug and release builds +-all:build_debug build_release ++all:build_release + + targets:makedirs $(TARGETS) + +@@ -516,20 +525,6 @@ + $(B)/client/unix_net.o \ + $(B)/client/unix_shared.o \ + \ +- $(B)/client/ahoptim.o \ +- $(B)/client/autohint.o \ +- $(B)/client/ftbase.o \ +- $(B)/client/ftdebug.o \ +- $(B)/client/ftglyph.o \ +- $(B)/client/ftinit.o \ +- $(B)/client/ftmm.o \ +- $(B)/client/ftsystem.o \ +- $(B)/client/raster1.o \ +- $(B)/client/sfnt.o \ +- $(B)/client/sfobjs.o \ +- $(B)/client/smooth.o \ +- $(B)/client/truetype.o +-# \ + # $(B)/client/q_parse.o \ + # $(B)/client/math_quaternion.o \ + # $(B)/client/util_str.o \ +@@ -541,7 +536,9 @@ + # $(B)/client/q_shared.o \ + + ifeq ($(ARCH),i386) +- Q3OBJ += $(B)/client/vm_x86.o ++ ifeq ($(DLL_ONLY),false) ++ Q3OBJ += $(B)/client/vm_x86.o ++ endif + endif + + ifeq ($(ARCH),ppc) +@@ -559,10 +556,24 @@ + $(B)/client/linux_qgl.o \ + $(B)/client/linux_glimp.o \ + $(B)/client/linux_snd.o \ ++ $(B)/client/linux_signals.o \ ++ $(B)/client/snd_mixa.o \ ++ $(B)/client/matha.o ++ ++ Q3POBJ_SMP=\ ++ $(B)/client/linux_common.o \ ++ $(B)/client/linux_qgl.o \ ++ $(B)/client/linux_glimp_smp.o \ ++ $(B)/client/linux_snd.o \ ++ $(B)/client/linux_signals.o \ + $(B)/client/snd_mixa.o \ +- $(B)/client/matha.o \ +- $(B)/client/ftol.o \ +- $(B)/client/snapvector.o ++ $(B)/client/matha.o ++ ++ ifeq ($(ARCH),i386) ++ Q3POBJ += $(B)/client/ftol.o $(B)/client/snapvector.o ++ Q3POBJ_SMP += $(B)/client/ftol.o $(B)/client/snapvector.o ++ endif ++ + else + ifeq ($(PLATFORM),irix) + Q3POBJ=\ +@@ -578,7 +589,6 @@ $(B)/client/linux_common.o \ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp.o \ @@ -65,7 +267,7 @@ $(B)/client/linux_snd.o \ $(B)/client/snd_mixa.o \ $(B)/client/matha.o \ -@@ -587,7 +586,6 @@ +@@ -587,7 +597,6 @@ $(B)/client/linux_common.o \ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp_smp.o \ @@ -73,7 +275,22 @@ $(B)/client/linux_snd.o \ $(B)/client/snd_mixa.o \ $(B)/client/matha.o -@@ -754,7 +752,6 @@ +@@ -602,12 +611,12 @@ + endif #FreeBSD + endif #IRIX + +-$(B)/$(PLATFORM)quake3 : $(Q3OBJ) $(Q3POBJ) ++$(B)/quake3 : $(Q3OBJ) $(Q3POBJ) + $(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) + # TTimo: splines code requires C++ linking, but splines have not been officially included in the codebase + # $(CXX) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) + +-$(B)/$(PLATFORM)quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP) ++$(B)/quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP) + $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \ + $(THREAD_LDFLAGS) $(LDFLAGS) + +@@ -754,10 +763,10 @@ $(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC) $(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS) @@ -81,15 +298,134 @@ $(B)/client/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -@@ -1629,7 +1626,6 @@ ++$(B)/client/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_CC) $(GL_CFLAGS) + $(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS) + $(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS) + +@@ -912,13 +921,17 @@ + $(B)/ded/unix_main.o \ + $(B)/ded/unix_net.o \ + $(B)/ded/unix_shared.o \ ++ $(B)/ded/linux_signals.o \ + \ + $(B)/ded/null_client.o \ + $(B)/ded/null_input.o \ + $(B)/ded/null_snddma.o + + ifeq ($(ARCH),i386) +- Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o ++ Q3DOBJ += $(B)/ded/ftol.o $(B)/ded/snapvector.o ++ ifeq ($(DLL_ONLY),false) ++ Q3DOBJ += $(B)/ded/vm_x86.o ++ endif + endif + + ifeq ($(ARCH),ppc) +@@ -927,7 +940,7 @@ + endif + endif + +-$(B)/$(PLATFORM)q3ded : $(Q3DOBJ) ++$(B)/q3ded : $(Q3DOBJ) + $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) + + $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) +@@ -988,6 +1001,7 @@ + $(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC) + $(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC) + $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC) ++$(B)/ded/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_DED_CC) + $(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC) + $(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC) + $(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC) +@@ -1068,7 +1082,7 @@ + $(B)/baseq3/cgame/q_math.o \ + $(B)/baseq3/cgame/q_shared.o + +-$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ) ++$(B)/baseq3/cgame.$(SHLIBEXT) : $(Q3CGOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) + + $(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) +@@ -1128,7 +1142,7 @@ + $(B)/missionpack/cgame/q_shared.o \ + $(B)/missionpack/cgame/ui_shared.o + +-$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ) ++$(B)/missionpack/cgame.$(SHLIBEXT) : $(MPCGOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ) + + $(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -DMISSIONPACK +@@ -1200,7 +1214,7 @@ + $(B)/baseq3/game/q_math.o \ + $(B)/baseq3/game/q_shared.o + +-$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ) ++$(B)/baseq3/qagame.$(SHLIBEXT) : $(Q3GOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) + + $(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) +@@ -1278,7 +1292,7 @@ + $(B)/missionpack/game/q_math.o \ + $(B)/missionpack/game/q_shared.o + +-$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ) ++$(B)/missionpack/qagame.$(SHLIBEXT) : $(MPGOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ) + + $(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -DMISSIONPACK +@@ -1367,7 +1381,7 @@ + $(B)/baseq3/ui/q_math.o \ + $(B)/baseq3/ui/q_shared.o + +-$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ) ++$(B)/baseq3/ui.$(SHLIBEXT) : $(Q3UIOBJ) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) + + $(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) +@@ -1410,7 +1424,7 @@ + $(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC) + $(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC) + $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC) +-$(B)/baseq3/ui/ui_syscalls.o : $(Q3UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) ++$(B)/baseq3/ui/ui_syscalls.o : $(UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) + $(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC) + + # bk001205 - these wre the only SHLIB compiles in 1.17 +@@ -1450,7 +1464,7 @@ + # $(B)/missionpack/ui/q_math.o \ + # $(B)/missionpack/ui/q_shared.o + +-$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ) ++$(B)/missionpack/ui.$(SHLIBEXT) : $(MPUIOBJ) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ) + + $(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC) -DMISSIONPACK +@@ -1613,23 +1627,8 @@ + $(B)/q3static/unix_net.o \ + $(B)/q3static/unix_shared.o \ \ +- $(B)/q3static/ahoptim.o \ +- $(B)/q3static/autohint.o \ +- $(B)/q3static/ftbase.o \ +- $(B)/q3static/ftdebug.o \ +- $(B)/q3static/ftglyph.o \ +- $(B)/q3static/ftinit.o \ +- $(B)/q3static/ftmm.o \ +- $(B)/q3static/ftsystem.o \ +- $(B)/q3static/raster1.o \ +- $(B)/q3static/sfnt.o \ +- $(B)/q3static/sfobjs.o \ +- $(B)/q3static/smooth.o \ +- $(B)/q3static/truetype.o \ +- \ $(B)/q3static/linux_qgl.o \ $(B)/q3static/linux_glimp.o \ - $(B)/q3static/linux_joystick.o \ $(B)/q3static/linux_snd.o \ $(B)/q3static/snd_mixa.o \ $(B)/q3static/matha.o -@@ -1779,7 +1775,6 @@ +@@ -1779,7 +1778,6 @@ $(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC @@ -97,3 +433,25 @@ $(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC +@@ -2020,7 +2018,7 @@ + + + +-$(B)/$(PLATFORM)q3static : $(Q3SOBJ) ++$(B)/q3static : $(Q3SOBJ) + $(CC) $(CFLAGS) -o $@ $(Q3SOBJ) $(GLLDFLAGS) $(LDFLAGS) + + +@@ -2059,9 +2057,9 @@ + + copyfiles: + -mkdirhier $(COPYDIR) +- cp $(BR)/linuxquake3 $(COPYDIR)/quake3.x86 +- strip $(COPYDIR)/quake3.x86 +- chmod 755 $(COPYDIR)/quake3.x86 ++ cp $(BR)/linuxquake3 $(COPYDIR)/quake3 ++ strip $(COPYDIR)/quake3 ++ chmod 755 $(COPYDIR)/quake3 + cp $(BR)/linuxq3ded $(COPYDIR)/q3ded + strip $(COPYDIR)/q3ded + chmod 755 $(COPYDIR)/q3ded diff --git a/games/q3cellshading/files/patch-code-unix-cons b/games/q3cellshading/files/patch-code-unix-cons deleted file mode 100644 index b2e41f55f747..000000000000 --- a/games/q3cellshading/files/patch-code-unix-cons +++ /dev/null @@ -1,27 +0,0 @@ ---- code/unix/cons.orig Fri Jun 14 13:01:32 2002 -+++ code/unix/cons Wed Nov 23 10:32:49 2005 -@@ -271,11 +271,11 @@ - # Defaults for a typical (?) UNIX platform. - # Your mileage may vary. - 'unix' => [ -- 'CC' => 'cc', -- 'CFLAGS' => '', -+ 'CC' => $ENV{CC}, -+ 'CFLAGS' => $ENV{CFLAGS}, - 'CCCOM' => '%CC %CFLAGS %_IFLAGS -c %< -o %>', -- 'CXX' => '%CC', -- 'CXXFLAGS' => '%CFLAGS', -+ 'CXX' => $ENV{CXX}, -+ 'CXXFLAGS' => $ENV{CXXFLAGS}, - 'CXXCOM' => '%CXX %CXXFLAGS %_IFLAGS -c %< -o %>', - 'INCDIRPREFIX' => '-I', - 'INCDIRSUFFIX' => '', -@@ -294,7 +294,7 @@ - 'LD' => 'ld', - 'LDFLAGS' => '', - 'PREFLIB' => 'lib', -- 'ENV' => { 'PATH' => '/bin:/usr/bin' }, -+ 'ENV' => { 'PATH' => '/bin:/usr/bin:/usr/local/bin' }, - ], - ); - diff --git a/games/q3cellshading/files/patch-code-unix-unix_main.c b/games/q3cellshading/files/patch-code-unix-unix_main.c new file mode 100644 index 000000000000..093aff871d16 --- /dev/null +++ b/games/q3cellshading/files/patch-code-unix-unix_main.c @@ -0,0 +1,58 @@ +--- code/unix/unix_main.c.orig Thu May 25 16:59:37 2006 ++++ code/unix/unix_main.c Thu May 25 17:00:58 2006 +@@ -707,12 +707,12 @@ + { + void *libHandle; + void (*dllEntry)( int (*syscallptr)(int, ...) ); +- char curpath[MAX_OSPATH]; + char fname[MAX_OSPATH]; + char *basepath; + char *homepath; + char *pwdpath; + char *gamedir; ++ char *libdir = LIBDIR; + char *fn; + const char* err = NULL; + +@@ -721,18 +721,7 @@ + // bk001206 - let's have some paranoia + assert( name ); + +- getcwd(curpath, sizeof(curpath)); +-#if defined __i386__ +- snprintf (fname, sizeof(fname), "%si386.so", name); +-#elif defined __powerpc__ //rcg010207 - PPC support. +- snprintf (fname, sizeof(fname), "%sppc.so", name); +-#elif defined __axp__ +- snprintf (fname, sizeof(fname), "%saxp.so", name); +-#elif defined __mips__ +- snprintf (fname, sizeof(fname), "%smips.so", name); +-#else +-#error Unknown arch +-#endif ++ snprintf (fname, sizeof(fname), "%s.so", name); + + // bk001129 - was RTLD_LAZY + #define Q_RTLD RTLD_NOW +@@ -742,10 +731,19 @@ + homepath = Cvar_VariableString( "fs_homepath" ); + gamedir = Cvar_VariableString( "fs_game" ); + +- // pwdpath +- fn = FS_BuildOSPath( pwdpath, gamedir, fname ); ++ // libdir ++ fn = FS_BuildOSPath( libdir, gamedir, fname ); + Com_Printf( "Sys_LoadDll(%s)... \n", fn ); + libHandle = dlopen( fn, Q_RTLD ); ++ ++ // pwdpath ++ if ( !libHandle ) ++ { ++ Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror() ); ++ fn = FS_BuildOSPath( pwdpath, gamedir, fname ); ++ Com_Printf( "Sys_LoadDll(%s)... \n", fn ); ++ libHandle = dlopen( fn, Q_RTLD ); ++ } + + if ( !libHandle ) + { diff --git a/games/q3cellshading/files/patch-code-unix-unix_shared.c b/games/q3cellshading/files/patch-code-unix-unix_shared.c index 013c39f2bc13..e30407e90ca2 100644 --- a/games/q3cellshading/files/patch-code-unix-unix_shared.c +++ b/games/q3cellshading/files/patch-code-unix-unix_shared.c @@ -1,11 +1,11 @@ ---- code/unix/unix_shared.c.orig Mon Aug 15 20:10:07 2005 -+++ code/unix/unix_shared.c Sun Nov 20 18:41:22 2005 +--- code/unix/unix_shared.c.orig Thu May 25 14:38:44 2006 ++++ code/unix/unix_shared.c Thu May 25 14:41:26 2006 @@ -38,7 +38,7 @@ static char cdPath[MAX_OSPATH]; // Used to determine local installation path -static char installPath[MAX_OSPATH]; -+static char installPath[MAX_OSPATH] = %%Q3DIR%%; ++static char installPath[MAX_OSPATH] = DATADIR; // Used to determine where to store user-specific files static char homePath[MAX_OSPATH]; @@ -34,7 +34,7 @@ // test the wrap issue #if 0 -@@ -136,7 +140,7 @@ +@@ -136,10 +140,10 @@ return ret; } @@ -42,4 +42,8 @@ +// #endif //#if 0 // bk001215 - see snapvector.nasm for replacement - #if (defined __APPLE__) // rcg010206 - using this for PPC builds... +-#if (defined __APPLE__) // rcg010206 - using this for PPC builds... ++#ifndef __i386__ // rcg010206 - using this for PPC builds... + long fastftol( float f ) { // bk001213 - from win32/win_shared.c + //static int tmp; + // __asm fld f diff --git a/games/q3cellshading/files/patch-lcc-custom.mk b/games/q3cellshading/files/patch-lcc-custom.mk deleted file mode 100644 index 8e6807919e3b..000000000000 --- a/games/q3cellshading/files/patch-lcc-custom.mk +++ /dev/null @@ -1,6 +0,0 @@ -diff -ruN ./lcc/custom.mk ../quake3-1.32b-BUILT/./lcc/custom.mk ---- ./lcc/custom.mk Wed Oct 17 23:53:10 2001 -+++ ../quake3-1.32b-BUILT/./lcc/custom.mk Mon Aug 22 20:50:29 2005 -@@ -1 +1 @@ --BUILDDIR=/tmp -+BUILDDIR=./build diff --git a/games/q3cellshading/files/patch-lcc-makefile b/games/q3cellshading/files/patch-lcc-makefile deleted file mode 100644 index f5bf35620127..000000000000 --- a/games/q3cellshading/files/patch-lcc-makefile +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./lcc/makefile ../quake3-1.32b-BUILT/./lcc/makefile ---- ./lcc/makefile Wed Oct 17 23:53:10 2001 -+++ ../quake3-1.32b-BUILT/./lcc/makefile Mon Aug 22 20:59:15 2005 -@@ -136,7 +136,7 @@ - - $Blcc$E: $Blcc$O $Bhost$O; $(LD) $(LDFLAGS) -o $@ $Blcc$O $Bhost$O - --SYSTEM=$(shell cc -print-search-dirs | head -n 1 | cut -b 10-) -+SYSTEM=/usr/lib - - $Blcc$O: etc/lcc.c; $(CC) $(CFLAGS) -c -DTEMPDIR=\"$(TEMPDIR)\" -o $@ etc/lcc.c - $Bhost$O: $(HOSTFILE); $(CC) $(CFLAGS) -c -DSYSTEM=\"$(SYSTEM)\" -o $@ $(HOSTFILE) diff --git a/games/q3cellshading/pkg-plist b/games/q3cellshading/pkg-plist new file mode 100644 index 000000000000..0ce6c302de0c --- /dev/null +++ b/games/q3cellshading/pkg-plist @@ -0,0 +1,12 @@ +%%DEDICATED%%bin/q3ded +%%CLIENT%%bin/quake3 +%%SMP%%bin/quake3-smp +%%GAMELIBS%%%%LIBDIR%%/baseq3/cgame.so +%%GAMELIBS%%%%LIBDIR%%/baseq3/qagame.so +%%GAMELIBS%%%%LIBDIR%%/baseq3/ui.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/cgame.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/qagame.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/ui.so +%%GAMELIBS%%@dirrm %%LIBDIR%%/missionpack +%%GAMELIBS%%@dirrm %%LIBDIR%%/baseq3 +%%GAMELIBS%%@dirrm %%LIBDIR%% diff --git a/games/quake3/Makefile b/games/quake3/Makefile index 8e3850349113..c764ffb614b1 100644 --- a/games/quake3/Makefile +++ b/games/quake3/Makefile @@ -7,57 +7,106 @@ PORTNAME= quake3 PORTVERSION= 1.32b -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= games -MASTER_SITES= ${MASTER_SITE_IDSOFTWARE:S|$|source/|} \ - http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \ +MASTER_SITES= http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \ http://www.planetgargoyle.com/ \ http://www.teamdarkside.net/ \ http://0day.icculus.org/mirrors/quake3/ \ - http://www.olpainless.net/files/ + http://www.olpainless.net/files/ \ + ${MASTER_SITE_IDSOFTWARE:S|$|source/|} DISTFILES= ${DISTNAME}-source${EXTRACT_SUFX} MAINTAINER= shirshegsm@gmail.com COMMENT= Quake III Arena -- first person shooter (native build) -BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm - USE_ZIP= yes -USE_CRLF= yes +USE_DOS2UNIX= yes USE_GMAKE= yes -USE_PERL5_BUILD=yes -USE_GL= yes USE_GCC= 3.2+ +BUILD_WRKSRC= ${WRKSRC}/code/unix + +OPTIONS= CLIENT "Build client" on \ + DEDICATED "Build dedicated server" on \ + GAMELIBS "Build game libraries (mandatory on !i386)" off \ + OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ + SMP "Build SMP (threaded) client" on + +MAKE_ENV= LIBDIR="${LIBDIR}" DLL_ONLY=true +PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" -PLIST_FILES= bin/q3ded bin/quake3 +LIBDIR= ${PREFIX}/lib/${PORTNAME} .include <bsd.port.pre.mk> -# Anyone to play with this on !i386 -.if ${ARCH} != "i386" -BROKEN= "Does not compile on !i386 (feel free to submit fixes)" +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) \ + && defined(WITHOUT_SMP) +IGNORE= needs at least one of CLIENT, DEDICATED and SMP options .endif -.if ${PERL_LEVEL} < 500600 -BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 +.if ${ARCH} == "i386" +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm .endif -post-patch: - @${REINPLACE_CMD} -e 's|%%Q3DIR%%|"${Q3DIR}"|' \ - ${WRKSRC}/code/unix/unix_shared.c - @${REINPLACE_CMD} -e 's|botlib.log|/dev/null|' ${WRKSRC}/code/botlib/be_interface.c +.if !defined(WITHOUT_CLIENT) && !defined(WITHOUT_SMP) +USE_GL= yes +.endif + +.if !defined(WITHOUT_CLIENT) +MAKE_ENV+= CLIENT=YES +PLIST_SUB+= CLIENT="" +Q3BIN+= quake3 +.else +PLIST_SUB+= CLIENT="@comment " +.endif + +.if !defined(WITHOUT_DEDICATED) +MAKE_ENV+= DEDICATED=YES +PLIST_SUB+= DEDICATED="" +Q3BIN+= q3ded +.else +PLIST_SUB+= DEDICATED="@comment " +.endif + +.if defined(WITH_GAMELIBS) || ${ARCH} != "i386" +MAKE_ENV+= GAMELIBS=YES +PLIST_SUB+= GAMELIBS="" +.else +PLIST_SUB+= GAMELIBS="@comment " +.endif -pre-build: - ${MKDIR} ${WRKSRC}/lcc/build +.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +MAKE_ENV+= OPTIMIZED_CFLAGS=YES +.endif -do-build: - cd ${WRKSRC}/code && ${MAKE_ENV} ${PERL} unix/cons +.if !defined(WITHOUT_SMP) +MAKE_ENV+= SMP=YES \ + PTHREAD_LIBS="${PTHREAD_LIBS}" +PLIST_SUB+= SMP="" +Q3BIN+= quake3-smp +.else +PLIST_SUB+= SMP="@comment " +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \ + ${WRKSRC}/code/botlib/be_interface.c + @${REINPLACE_CMD} -e \ + 's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \ + ${WRKSRC}/code/botlib/be_interface.c \ + ${WRKSRC}/code/qcommon/common.c \ + ${WRKSRC}/code/renderer/tr_init.c do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/code/install/linuxq3ded \ - ${PREFIX}/bin/q3ded - ${INSTALL_PROGRAM} ${WRKSRC}/code/install/linuxquake3 \ - ${PREFIX}/bin/quake3 +.for bin in ${Q3BIN} + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${PREFIX}/bin +.endfor +.if defined(WITH_GAMELIBS) || ${ARCH} != "i386" +.for dir in baseq3 missionpack + ${MKDIR} ${LIBDIR}/${dir} + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${LIBDIR}/${dir} +.endfor +.endif .include "${.CURDIR}/../quake3-data/Makefile.include" .include <bsd.port.post.mk> diff --git a/games/quake3/files/patch-code-Construct b/games/quake3/files/patch-code-Construct deleted file mode 100644 index 8ec4aa967b32..000000000000 --- a/games/quake3/files/patch-code-Construct +++ /dev/null @@ -1,69 +0,0 @@ ---- code/Construct.orig Mon Aug 15 20:56:27 2005 -+++ code/Construct Wed Nov 23 10:37:04 2005 -@@ -19,8 +19,8 @@ - use Cons_gcc; - - # defaults --$config = 'debug'; --$do_smp = 1; -+$config = 'release'; -+$do_smp = 0; - $do_masterserver = 0; - $do_authserver = 0; - $do_authport = 0; -@@ -32,8 +32,8 @@ - $DO_WIN32 = 0; - $NO_VM = 0; - $NO_SO = 0; --$CC='gcc'; --$CXX='g++'; -+$CC=$ENV{CC}; -+$CXX=$ENV{CXX}; - - # detect an sdk build (don't attempt client build and other things) - if ( -r 'unix/Conscript-client' ) -@@ -63,9 +63,9 @@ - else - { - # libc .. do the little magic! -- $libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3'; -- $libc = `$libc_cmd`; -- chop ($libc); -+ # $libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3'; -+ # $libc = `$libc_cmd`; -+ # chop ($libc); - } - - if ($DO_WIN32 eq 1) -@@ -227,7 +227,7 @@ - # build the config directory - $CONFIG_DIR = $config . '-' . $cpu . '-' . $OS . '-' . $libc; - --$COMMON_CFLAGS = '-pipe -fsigned-char '; -+$COMMON_CFLAGS = '-pipe -fsigned-char -I/usr/local/include -L/usr/local/lib -I/usr/X11R6/include -L/usr/X11R6/lib '; - - if ($config eq 'debug') - { -@@ -237,7 +237,7 @@ - } - else - { -- $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce '; -+ $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce '; - $BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp '; - } - -@@ -287,11 +287,11 @@ - system("mkdir qvmtools 2>/dev/null"); - if (@_[0] eq 'q3lcc') - { -- system("cd ../lcc ; make all ; cp /tmp/lcc ../code/qvmtools/q3lcc ; cp /tmp/rcc ../code/qvmtools/q3rcc ; cp /tmp/cpp ../code/qvmtools/q3cpp"); -+ system("cd ../lcc ; gmake all ; cp ../lcc/build/lcc ../code/qvmtools/q3lcc ; cp ../lcc/build/rcc ../code/qvmtools/q3rcc ; cp ../lcc/build/cpp ../code/qvmtools/q3cpp"); - } - elsif (@_[0] eq 'q3asm') - { -- system("cd ../q3asm ; make ; cp q3asm ../code/qvmtools"); -+ system("cd ../q3asm ; gmake ; cp q3asm ../code/qvmtools"); - } - else - { diff --git a/games/quake3/files/patch-code-botlib-linux-i386.mak b/games/quake3/files/patch-code-botlib-linux-i386.mak deleted file mode 100644 index 2fadee73c19a..000000000000 --- a/games/quake3/files/patch-code-botlib-linux-i386.mak +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/botlib/linux-i386.mak ../quake3-1.32b-BUILT/./code/botlib/linux-i386.mak ---- ./code/botlib/linux-i386.mak Wed May 23 15:07:59 2001 -+++ ../quake3-1.32b-BUILT/./code/botlib/linux-i386.mak Mon Aug 22 20:55:02 2005 -@@ -14,7 +14,7 @@ - #use these when debugging - #CFLAGS=$(BASE_CFLAGS) -g - --LDFLAGS=-ldl -lm -+LDFLAGS=-lm - SHLIBEXT=so - SHLIBCFLAGS=-fPIC - SHLIBLDFLAGS=-shared diff --git a/games/quake3/files/patch-code-bspc-Conscript b/games/quake3/files/patch-code-bspc-Conscript deleted file mode 100644 index 08ed1797e7c2..000000000000 --- a/games/quake3/files/patch-code-bspc-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/bspc/Conscript ../quake3-1.32b-BUILT/./code/bspc/Conscript ---- ./code/bspc/Conscript Tue Aug 16 01:47:07 2005 -+++ ../quake3-1.32b-BUILT/./code/bspc/Conscript Mon Aug 22 20:54:27 2005 -@@ -67,7 +67,7 @@ - CXX => $CXX, - LINK => $LINK, - CFLAGS => $BSPC_BASE_CFLAGS, -- LIBS => '-ldl -lm -lpthread' -+ LIBS => '-lm -lpthread' - ); - - Program $env 'bspc', @$BSPC_REF; diff --git a/games/quake3/files/patch-code-bspc-Makefile b/games/quake3/files/patch-code-bspc-Makefile deleted file mode 100644 index d8a00e38bfd4..000000000000 --- a/games/quake3/files/patch-code-bspc-Makefile +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/bspc/Makefile ../quake3-1.32b-BUILT/./code/bspc/Makefile ---- ./code/bspc/Makefile Wed May 23 15:07:59 2001 -+++ ../quake3-1.32b-BUILT/./code/bspc/Makefile Mon Aug 22 20:54:39 2005 -@@ -18,7 +18,7 @@ - #use these when debugging - #CFLAGS=$(BASE_CFLAGS) -g - --LDFLAGS=-ldl -lm -lpthread -+LDFLAGS=-lm -lpthread - - DO_CC=$(CC) $(CFLAGS) -o $@ -c $< - diff --git a/games/quake3/files/patch-code-bspc-linux-i386.mak b/games/quake3/files/patch-code-bspc-linux-i386.mak deleted file mode 100644 index d8be0355f149..000000000000 --- a/games/quake3/files/patch-code-bspc-linux-i386.mak +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/bspc/linux-i386.mak ../quake3-1.32b-BUILT/./code/bspc/linux-i386.mak ---- ./code/bspc/linux-i386.mak Wed May 23 15:07:59 2001 -+++ ../quake3-1.32b-BUILT/./code/bspc/linux-i386.mak Mon Aug 22 20:54:48 2005 -@@ -14,7 +14,7 @@ - #use these when debugging - #CFLAGS=$(BASE_CFLAGS) -g - --LDFLAGS=-ldl -lm -lpthread -+LDFLAGS=-lm -lpthread - - DO_CC=$(CC) $(CFLAGS) -o $@ -c $< - diff --git a/games/quake3/files/patch-code-cgame-Conscript b/games/quake3/files/patch-code-cgame-Conscript deleted file mode 100644 index 8e19ef9e567c..000000000000 --- a/games/quake3/files/patch-code-cgame-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/cgame/Conscript ../quake3-1.32b-BUILT/./code/cgame/Conscript ---- ./code/cgame/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/cgame/Conscript Mon Aug 22 20:54:15 2005 -@@ -22,7 +22,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # for TA, use -DMISSIONPACK diff --git a/games/quake3/files/patch-code-client-cl_ui.c b/games/quake3/files/patch-code-client-cl_ui.c new file mode 100644 index 000000000000..58cfc63e87ea --- /dev/null +++ b/games/quake3/files/patch-code-client-cl_ui.c @@ -0,0 +1,11 @@ +--- code/client/cl_ui.c.orig Thu May 25 15:41:27 2006 ++++ code/client/cl_ui.c Thu May 25 15:46:39 2006 +@@ -1166,7 +1166,7 @@ + // init for this gamestate + VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE)); + } +- else if (v != UI_API_VERSION) { ++ else if (v != 0 && v != UI_API_VERSION) { + Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION ); + cls.uiStarted = qfalse; + } diff --git a/games/quake3/files/patch-code-game-Conscript b/games/quake3/files/patch-code-game-Conscript deleted file mode 100644 index d6ae11d79bea..000000000000 --- a/games/quake3/files/patch-code-game-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/game/Conscript ../quake3-1.32b-BUILT/./code/game/Conscript ---- ./code/game/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/game/Conscript Mon Aug 22 20:54:04 2005 -@@ -21,7 +21,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # for TA, use -DMISSIONPACK diff --git a/games/quake3/files/patch-code-game-q_shared.c b/games/quake3/files/patch-code-game-q_shared.c new file mode 100644 index 000000000000..efbf3bd6789b --- /dev/null +++ b/games/quake3/files/patch-code-game-q_shared.c @@ -0,0 +1,99 @@ +--- code/game/q_shared.c.orig Thu May 25 13:42:26 2006 ++++ code/game/q_shared.c Thu May 25 13:44:30 2006 +@@ -99,29 +99,29 @@ + + ============================================================================ + */ +-/* ++ + // can't just use function pointers, or dll linkage can + // mess up when qcommon is included in multiple places +-static short (*_BigShort) (short l); +-static short (*_LittleShort) (short l); +-static int (*_BigLong) (int l); +-static int (*_LittleLong) (int l); ++static int16_t (*_BigShort) (int16_t l); ++static int16_t (*_LittleShort) (int16_t l); ++static int32_t (*_BigLong) (int32_t l); ++static int32_t (*_LittleLong) (int32_t l); + static qint64 (*_BigLong64) (qint64 l); + static qint64 (*_LittleLong64) (qint64 l); + static float (*_BigFloat) (const float *l); + static float (*_LittleFloat) (const float *l); + +-short BigShort(short l){return _BigShort(l);} +-short LittleShort(short l) {return _LittleShort(l);} +-int BigLong (int l) {return _BigLong(l);} +-int LittleLong (int l) {return _LittleLong(l);} +-qint64 BigLong64 (qint64 l) {return _BigLong64(l);} +-qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);} +-float BigFloat (const float *l) {return _BigFloat(l);} +-float LittleFloat (const float *l) {return _LittleFloat(l);} +-*/ ++int16_t BigShort(int16_t l){return _BigShort(l);} ++int16_t LittleShort(int16_t l) {return _LittleShort(l);} ++int32_t BigLong (int32_t l) {return _BigLong(l);} ++int32_t LittleLong (int32_t l) {return _LittleLong(l);} ++qint64 BigLong64 (qint64 l) {return _BigLong64(l);} ++qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);} ++float BigFloat (float l) {return _BigFloat(&l);} ++float LittleFloat (float l) {return _LittleFloat(&l);} + +-short ShortSwap (short l) ++ ++int16_t ShortSwap (int16_t l) + { + byte b1,b2; + +@@ -131,12 +131,12 @@ + return (b1<<8) + b2; + } + +-short ShortNoSwap (short l) ++int16_t ShortNoSwap (int16_t l) + { + return l; + } + +-int LongSwap (int l) ++int32_t LongSwap (int32_t l) + { + byte b1,b2,b3,b4; + +@@ -145,15 +145,15 @@ + b3 = (l>>16)&255; + b4 = (l>>24)&255; + +- return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; ++ return ((int32_t)b1<<24) + ((int32_t)b2<<16) + ((int32_t)b3<<8) + b4; + } + +-int LongNoSwap (int l) ++int32_t LongNoSwap (int32_t l) + { + return l; + } + +-qint64 Long64Swap (qint64 ll) ++qint64 Long64Swap (qint64 ll) + { + qint64 result; + +@@ -199,7 +199,7 @@ + Swap_Init + ================ + */ +-/* ++ + void Swap_Init (void) + { + byte swaptest[2] = {1,0}; +@@ -229,7 +229,7 @@ + } + + } +-*/ ++ + + /* + ============================================================================ diff --git a/games/quake3/files/patch-code-game-q_shared.h b/games/quake3/files/patch-code-game-q_shared.h index d628bf7b5a3c..4b72f5464fd3 100644 --- a/games/quake3/files/patch-code-game-q_shared.h +++ b/games/quake3/files/patch-code-game-q_shared.h @@ -1,7 +1,94 @@ -diff -ruN ./code/game/q_shared.h ../quake3-1.32b-BUILT/./code/game/q_shared.h ---- ./code/game/q_shared.h Tue Aug 16 02:10:07 2005 -+++ ../quake3-1.32b-BUILT/./code/game/q_shared.h Tue Aug 23 14:16:34 2005 -@@ -452,13 +452,9 @@ +--- code/game/q_shared.h.orig Thu May 25 13:26:31 2006 ++++ code/game/q_shared.h Thu May 25 13:26:58 2006 +@@ -150,12 +150,14 @@ + + #define ID_INLINE __inline + ++#if 0 + static ID_INLINE short BigShort( short l) { return ShortSwap(l); } + #define LittleShort + static ID_INLINE int BigLong(int l) { LongSwap(l); } + #define LittleLong + static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); } + #define LittleFloat ++#endif + + #define PATH_SEP '\\' + +@@ -206,12 +208,14 @@ + return fi; + } + ++#if 0 + #define BigShort + static inline short LittleShort(short l) { return ShortSwap(l); } + #define BigLong + static inline int LittleLong (int l) { return LongSwap(l); } + #define BigFloat + static inline float LittleFloat (const float l) { return FloatSwap(&l); } ++#endif + + #endif + +@@ -229,12 +233,14 @@ + + void Sys_PumpEvents( void ); + ++#if 0 + #define BigShort + static inline short LittleShort(short l) { return ShortSwap(l); } + #define BigLong + static inline int LittleLong (int l) { return LongSwap(l); } + #define BigFloat + static inline float LittleFloat (const float l) { return FloatSwap(&l); } ++#endif + + #endif + +@@ -268,6 +274,7 @@ + #define BOTLIB_HARD_LINKED + #endif + ++#if 0 + #if !idppc + inline static short BigShort( short l) { return ShortSwap(l); } + #define LittleShort +@@ -283,6 +290,7 @@ + #define BigFloat + inline static float LittleFloat (const float *l) { return FloatSwap(l); } + #endif ++#endif + + #endif + +@@ -302,10 +310,18 @@ + #define CPUSTRING "freebsd-other" + #endif + ++#include <machine/param.h> ++#if __FreeBSD_version < 500000 ++#include <inttypes.h> ++#else ++#include <stdint.h> ++#endif ++ + #define PATH_SEP '/' + + // bk010116 - omitted Q3STATIC (see Linux above), broken target + ++#if 0 + #if !idppc + static short BigShort( short l) { return ShortSwap(l); } + #define LittleShort +@@ -321,6 +337,7 @@ + #define BigFloat + static float LittleFloat (const float *l) { return FloatSwap(l); } + #endif ++#endif + + #endif + +@@ -452,13 +469,9 @@ void *Hunk_Alloc( int size, ha_pref preference ); #endif @@ -15,3 +102,32 @@ diff -ruN ./code/game/q_shared.h ../quake3-1.32b-BUILT/./code/game/q_shared.h #if !( defined __VECTORC ) void Com_Memset (void* dest, const int val, const size_t count); +@@ -888,18 +901,18 @@ + } qint64; + + //============================================= +-/* +-short BigShort(short l); +-short LittleShort(short l); +-int BigLong (int l); +-int LittleLong (int l); +-qint64 BigLong64 (qint64 l); +-qint64 LittleLong64 (qint64 l); +-float BigFloat (const float *l); +-float LittleFloat (const float *l); ++ ++int16_t BigShort(int16_t l); ++int16_t LittleShort(int16_t l); ++int32_t BigLong (int32_t l); ++int32_t LittleLong (int32_t l); ++qint64 BigLong64 (qint64 l); ++qint64 LittleLong64 (qint64 l); ++float BigFloat (float l); ++float LittleFloat (float l); + + void Swap_Init (void); +-*/ ++ + char * QDECL va(char *format, ...); + + //============================================= diff --git a/games/quake3/files/patch-code-q3_ui-Conscript b/games/quake3/files/patch-code-q3_ui-Conscript deleted file mode 100644 index bbddde9f2ca5..000000000000 --- a/games/quake3/files/patch-code-q3_ui-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/q3_ui/Conscript ../quake3-1.32b-BUILT/./code/q3_ui/Conscript ---- ./code/q3_ui/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/q3_ui/Conscript Mon Aug 22 20:56:57 2005 -@@ -16,7 +16,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # qvm building diff --git a/games/quake3/files/patch-code-qcommon-files.c b/games/quake3/files/patch-code-qcommon-files.c new file mode 100644 index 000000000000..fcff4d19cad7 --- /dev/null +++ b/games/quake3/files/patch-code-qcommon-files.c @@ -0,0 +1,26 @@ +--- code/qcommon/files.c.orig Thu May 25 16:39:34 2006 ++++ code/qcommon/files.c Thu May 25 16:41:43 2006 +@@ -2763,6 +2763,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory( fs_basepath->string, gameName ); + } ++ FS_AddGameDirectory( LIBDIR, gameName ); + // fs_homepath is somewhat particular to *nix systems, only add if relevant + // NOTE: same filtering below for mods and basegame + if (fs_basepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { +@@ -2777,6 +2778,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory(fs_basepath->string, fs_basegame->string); + } ++ FS_AddGameDirectory(LIBDIR, fs_basegame->string); + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + FS_AddGameDirectory(fs_homepath->string, fs_basegame->string); + } +@@ -2790,6 +2792,7 @@ + if (fs_basepath->string[0]) { + FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string); + } ++ FS_AddGameDirectory(LIBDIR, fs_gamedirvar->string); + if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { + FS_AddGameDirectory(fs_homepath->string, fs_gamedirvar->string); + } diff --git a/games/quake3/files/patch-code-qcommon-vm.c b/games/quake3/files/patch-code-qcommon-vm.c new file mode 100644 index 000000000000..404b804d4012 --- /dev/null +++ b/games/quake3/files/patch-code-qcommon-vm.c @@ -0,0 +1,20 @@ +--- code/qcommon/vm.c.orig Thu May 25 16:59:36 2006 ++++ code/qcommon/vm.c Thu May 25 17:08:51 2006 +@@ -478,7 +478,7 @@ + } + } + +- if ( interpret == VMI_NATIVE ) { ++ if ( 1 ) { + // try to load as a system dll + Com_Printf( "Loading dll file %s.\n", vm->name ); + vm->dllHandle = Sys_LoadDll( module, vm->fqpath , &vm->entryPoint, VM_DllSyscall ); +@@ -826,7 +826,7 @@ + + + +-#ifdef oDLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM ++#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM + int VM_CallCompiled( vm_t *vm, int *args ) { + return(0); + } diff --git a/games/quake3/files/patch-code-ui-Conscript b/games/quake3/files/patch-code-ui-Conscript deleted file mode 100644 index 0b19a27ed11f..000000000000 --- a/games/quake3/files/patch-code-ui-Conscript +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/ui/Conscript ../quake3-1.32b-BUILT/./code/ui/Conscript ---- ./code/ui/Conscript Sun Jan 19 18:03:48 2003 -+++ ../quake3-1.32b-BUILT/./code/ui/Conscript Mon Aug 22 20:53:50 2005 -@@ -16,7 +16,7 @@ - LINK => $LINK, - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - CFLAGS => $BASE_CFLAGS . '-DMISSIONPACK -fPIC', -- LDFLAGS => '-shared -ldl -lm' -+ LDFLAGS => '-shared -lm' - ); - - # qvm building diff --git a/games/quake3/files/patch-code-unix-Conscript-client b/games/quake3/files/patch-code-unix-Conscript-client deleted file mode 100644 index d96e68cfd001..000000000000 --- a/games/quake3/files/patch-code-unix-Conscript-client +++ /dev/null @@ -1,20 +0,0 @@ -diff -ruN ./code/unix/Conscript-client ../quake3-1.32b-BUILT/./code/unix/Conscript-client ---- ./code/unix/Conscript-client Mon Aug 15 23:56:27 2005 -+++ ../quake3-1.32b-BUILT/./code/unix/Conscript-client Mon Aug 22 21:55:50 2005 -@@ -153,7 +153,7 @@ - . $BUILD_DIR . '/unix/asmlib.a ' - . $BUILD_DIR . '/unix/inlinelib.a ' - . $BASE_LDFLAGS -- . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm' -+ . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -lm' - ); - - @RENDERER_FILES = qw( -@@ -231,7 +231,6 @@ - ../unix/linux_common.c - ../unix/linux_qgl.c - ../unix/linux_glimp.c -- ../unix/linux_joystick.c - ../unix/linux_snd.c - ../unix/linux_signals.c - ); diff --git a/games/quake3/files/patch-code-unix-Conscript-dedicated b/games/quake3/files/patch-code-unix-Conscript-dedicated deleted file mode 100644 index 3de75039ffe0..000000000000 --- a/games/quake3/files/patch-code-unix-Conscript-dedicated +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./code/unix/Conscript-dedicated ../quake3-1.32b-BUILT/./code/unix/Conscript-dedicated ---- ./code/unix/Conscript-dedicated Mon Aug 15 23:56:27 2005 -+++ ../quake3-1.32b-BUILT/./code/unix/Conscript-dedicated Mon Aug 22 20:52:42 2005 -@@ -63,7 +63,7 @@ - ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, - # FIXME TTimo I'm not sure about what C_ONLY is for - CFLAGS => $BASE_CFLAGS . '-DC_ONLY', -- LDFLAGS => '-ldl -lm', -+ LDFLAGS => '-lm', - LIBS => ' ' - . $BUILD_DIR . '/unix/botlib.a ' - . $BUILD_DIR . '/unix/asmlib.a ' diff --git a/games/quake3/files/patch-code-unix-Makefile b/games/quake3/files/patch-code-unix-Makefile index 47f9174f8a2e..9b6a16757899 100644 --- a/games/quake3/files/patch-code-unix-Makefile +++ b/games/quake3/files/patch-code-unix-Makefile @@ -1,6 +1,43 @@ ---- code/unix/Makefile.orig Sun May 5 07:21:10 2002 -+++ code/unix/Makefile Sun Nov 20 18:48:48 2005 -@@ -136,7 +136,7 @@ +--- code/unix/Makefile.orig Thu May 25 16:59:37 2006 ++++ code/unix/Makefile Thu May 25 17:04:46 2006 +@@ -19,6 +19,7 @@ + + PLATFORM=$(shell uname|tr A-Z a-z) + PLATFORM_RELEASE=$(shell uname -r) ++ARCH=$(shell uname -m) + + ### + ### These paths are where you probably want to change things +@@ -34,7 +35,7 @@ + + # Build name + # BUILD_NAME=$(BUILD_NAME) +-BUILD_NAME=quake3.x86 ++BUILD_NAME=quake3 + + + +@@ -46,8 +47,8 @@ + + BASEQ3_DIR=$(BDIR)/baseq3 + +-BD=debug$(ARCH)$(GLIBC) +-BR=release$(ARCH)$(GLIBC) ++BD=debug ++BR=release + CDIR=$(MOUNT_DIR)/client + SDIR=$(MOUNT_DIR)/server + RDIR=$(MOUNT_DIR)/renderer +@@ -76,7 +77,7 @@ + ############################################################################# + + ## Defaults +-DLL_ONLY=false ++DLL_ONLY?=false + # bk010215 - TODO - add all defaults / kill Ryan + + +@@ -136,7 +137,7 @@ ifeq ($(ARCH),ppc) NEWPGCC=/loki/global/ppc/bin/gcc CC=$(NEWPGCC) @@ -9,7 +46,7 @@ else #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205 #NEWPGCC=/loki/global/x86/bin/gcc -@@ -146,9 +146,9 @@ +@@ -146,9 +147,9 @@ # TTimo: legacy RELEASE_CFLAGS # NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box # but building on the Mdk 7.2 baseline seems to work @@ -21,7 +58,7 @@ endif endif -@@ -162,7 +162,7 @@ +@@ -162,7 +163,7 @@ RANLIB=ranlib THREAD_LDFLAGS=-lpthread @@ -30,16 +67,109 @@ GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm ifeq ($(ARCH),axp) -@@ -223,7 +223,7 @@ - #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc - NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc - CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi ) +@@ -199,31 +200,27 @@ + + GLIBC= #libc is irrelevant + +-ifneq (,$(findstring alpha,$(shell uname -m))) +-ARCH=axp +-RPMARCH=alpha +-VENDOR=dec +-else #default to i386 +-ARCH=i386 +-RPMARCH=i386 +-VENDOR=unknown +-endif #alpha test ++BASE_CFLAGS = $(CFLAGS) -DDATADIR='\"$(Q3DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' -pipe + ++GL_CFLAGS = -I$(X11BASE)/include + +-BASE_CFLAGS = -pipe ++DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror ++RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG + +-GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include ++ifdef OPTIMIZED_CFLAGS ++ ifeq ($(ARCH),i386) ++RELEASE_CFLAGS+=-O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce ++ else ++RELEASE_CFLAGS+=-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations ++ endif ++endif + +-DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror +-ifeq ($(ARCH),axp) +-CC=pgcc +-RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations +-else +-#NEWPGCC=/loki/global/x86/bin/gcc # raistlin012301 +-#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc +-NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc +-CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi ) -RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing - fstrength-reduce -+RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing - fstrength-reduce ++ifneq ($(ARCH),i386) ++DLL_ONLY=true ++endif ++ ++ifeq ($(DLL_ONLY),true) ++BASE_CFLAGS += -DDLL_ONLY endif LIBEXT=a -@@ -283,7 +283,7 @@ +@@ -235,25 +232,37 @@ + ARFLAGS=ar rv + RANLIB=ranlib + +-THREAD_LDFLAGS=-lpthread ++THREAD_LDFLAGS=$(PTHREAD_LIBS) + # don't need -ldl (FreeBSD) +-LDFLAGS=-lm ++LDFLAGS+=-lm + #GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm + #GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm +-GLLDFLAGS=-L/usr/X11R6/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm ++GLLDFLAGS=-L$(X11BASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm + +-ifeq ($(ARCH),axp) +-TARGETS=\ +- $(B)/$(PLATFORM)q3ded +-else +-TARGETS=\ +- $(B)/$(PLATFORM)quake3 \ +- $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \ +- $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \ +- $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ +- $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) ++ifdef CLIENT ++TARGETS+=$(B)/quake3 ++endif ++ ++ifdef DEDICATED ++TARGETS+=$(B)/q3ded ++endif ++ ++ifdef SMP ++TARGETS+=$(B)/quake3-smp ++endif ++ ++ifeq ($(DLL_ONLY),true) ++GAMELIBS=yes ++endif ++ ++ifdef GAMELIBS ++TARGETS+=\ ++ $(B)/baseq3/cgame.$(SHLIBEXT) \ ++ $(B)/baseq3/qagame.$(SHLIBEXT) \ ++ $(B)/baseq3/ui.$(SHLIBEXT) \ ++ $(B)/missionpack/cgame.$(SHLIBEXT) \ ++ $(B)/missionpack/qagame.$(SHLIBEXT) \ ++ $(B)/missionpack/ui.$(SHLIBEXT) + endif + + else # ifeq freebsd +@@ -283,7 +292,7 @@ ARFLAGS=ar rv RANLIB=ranlib @@ -48,16 +178,88 @@ GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm TARGETS=$(B)/sgiquake3 \ -@@ -312,7 +312,7 @@ +@@ -310,9 +319,9 @@ + RANLIB=ranlib + ifeq ($(PLATFORM),freebsd) - LDFLAGS=-lm +-LDFLAGS=-lm ++LDFLAGS+=-lm else -LDFLAGS=-ldl -lm +LDFLAGS=-lm endif # ifeq freebsd TARGETS=\ -@@ -578,7 +578,6 @@ +@@ -348,7 +357,7 @@ + $(MAKE) targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)" + + #Build both debug and release builds +-all:build_debug build_release ++all:build_release + + targets:makedirs $(TARGETS) + +@@ -516,20 +525,6 @@ + $(B)/client/unix_net.o \ + $(B)/client/unix_shared.o \ + \ +- $(B)/client/ahoptim.o \ +- $(B)/client/autohint.o \ +- $(B)/client/ftbase.o \ +- $(B)/client/ftdebug.o \ +- $(B)/client/ftglyph.o \ +- $(B)/client/ftinit.o \ +- $(B)/client/ftmm.o \ +- $(B)/client/ftsystem.o \ +- $(B)/client/raster1.o \ +- $(B)/client/sfnt.o \ +- $(B)/client/sfobjs.o \ +- $(B)/client/smooth.o \ +- $(B)/client/truetype.o +-# \ + # $(B)/client/q_parse.o \ + # $(B)/client/math_quaternion.o \ + # $(B)/client/util_str.o \ +@@ -541,7 +536,9 @@ + # $(B)/client/q_shared.o \ + + ifeq ($(ARCH),i386) +- Q3OBJ += $(B)/client/vm_x86.o ++ ifeq ($(DLL_ONLY),false) ++ Q3OBJ += $(B)/client/vm_x86.o ++ endif + endif + + ifeq ($(ARCH),ppc) +@@ -559,10 +556,24 @@ + $(B)/client/linux_qgl.o \ + $(B)/client/linux_glimp.o \ + $(B)/client/linux_snd.o \ ++ $(B)/client/linux_signals.o \ ++ $(B)/client/snd_mixa.o \ ++ $(B)/client/matha.o ++ ++ Q3POBJ_SMP=\ ++ $(B)/client/linux_common.o \ ++ $(B)/client/linux_qgl.o \ ++ $(B)/client/linux_glimp_smp.o \ ++ $(B)/client/linux_snd.o \ ++ $(B)/client/linux_signals.o \ + $(B)/client/snd_mixa.o \ +- $(B)/client/matha.o \ +- $(B)/client/ftol.o \ +- $(B)/client/snapvector.o ++ $(B)/client/matha.o ++ ++ ifeq ($(ARCH),i386) ++ Q3POBJ += $(B)/client/ftol.o $(B)/client/snapvector.o ++ Q3POBJ_SMP += $(B)/client/ftol.o $(B)/client/snapvector.o ++ endif ++ + else + ifeq ($(PLATFORM),irix) + Q3POBJ=\ +@@ -578,7 +589,6 @@ $(B)/client/linux_common.o \ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp.o \ @@ -65,7 +267,7 @@ $(B)/client/linux_snd.o \ $(B)/client/snd_mixa.o \ $(B)/client/matha.o \ -@@ -587,7 +586,6 @@ +@@ -587,7 +597,6 @@ $(B)/client/linux_common.o \ $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp_smp.o \ @@ -73,7 +275,22 @@ $(B)/client/linux_snd.o \ $(B)/client/snd_mixa.o \ $(B)/client/matha.o -@@ -754,7 +752,6 @@ +@@ -602,12 +611,12 @@ + endif #FreeBSD + endif #IRIX + +-$(B)/$(PLATFORM)quake3 : $(Q3OBJ) $(Q3POBJ) ++$(B)/quake3 : $(Q3OBJ) $(Q3POBJ) + $(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) + # TTimo: splines code requires C++ linking, but splines have not been officially included in the codebase + # $(CXX) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) + +-$(B)/$(PLATFORM)quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP) ++$(B)/quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP) + $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \ + $(THREAD_LDFLAGS) $(LDFLAGS) + +@@ -754,10 +763,10 @@ $(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC) $(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS) @@ -81,15 +298,134 @@ $(B)/client/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -@@ -1629,7 +1626,6 @@ ++$(B)/client/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_CC) $(GL_CFLAGS) + $(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS) + $(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS) + +@@ -912,13 +921,17 @@ + $(B)/ded/unix_main.o \ + $(B)/ded/unix_net.o \ + $(B)/ded/unix_shared.o \ ++ $(B)/ded/linux_signals.o \ + \ + $(B)/ded/null_client.o \ + $(B)/ded/null_input.o \ + $(B)/ded/null_snddma.o + + ifeq ($(ARCH),i386) +- Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o ++ Q3DOBJ += $(B)/ded/ftol.o $(B)/ded/snapvector.o ++ ifeq ($(DLL_ONLY),false) ++ Q3DOBJ += $(B)/ded/vm_x86.o ++ endif + endif + + ifeq ($(ARCH),ppc) +@@ -927,7 +940,7 @@ + endif + endif + +-$(B)/$(PLATFORM)q3ded : $(Q3DOBJ) ++$(B)/q3ded : $(Q3DOBJ) + $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) + + $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) +@@ -988,6 +1001,7 @@ + $(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC) + $(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC) + $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC) ++$(B)/ded/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_DED_CC) + $(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC) + $(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC) + $(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC) +@@ -1068,7 +1082,7 @@ + $(B)/baseq3/cgame/q_math.o \ + $(B)/baseq3/cgame/q_shared.o + +-$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ) ++$(B)/baseq3/cgame.$(SHLIBEXT) : $(Q3CGOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) + + $(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) +@@ -1128,7 +1142,7 @@ + $(B)/missionpack/cgame/q_shared.o \ + $(B)/missionpack/cgame/ui_shared.o + +-$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ) ++$(B)/missionpack/cgame.$(SHLIBEXT) : $(MPCGOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ) + + $(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -DMISSIONPACK +@@ -1200,7 +1214,7 @@ + $(B)/baseq3/game/q_math.o \ + $(B)/baseq3/game/q_shared.o + +-$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ) ++$(B)/baseq3/qagame.$(SHLIBEXT) : $(Q3GOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) + + $(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) +@@ -1278,7 +1292,7 @@ + $(B)/missionpack/game/q_math.o \ + $(B)/missionpack/game/q_shared.o + +-$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ) ++$(B)/missionpack/qagame.$(SHLIBEXT) : $(MPGOBJ) + $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ) + + $(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -DMISSIONPACK +@@ -1367,7 +1381,7 @@ + $(B)/baseq3/ui/q_math.o \ + $(B)/baseq3/ui/q_shared.o + +-$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ) ++$(B)/baseq3/ui.$(SHLIBEXT) : $(Q3UIOBJ) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) + + $(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) +@@ -1410,7 +1424,7 @@ + $(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC) + $(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC) + $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC) +-$(B)/baseq3/ui/ui_syscalls.o : $(Q3UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) ++$(B)/baseq3/ui/ui_syscalls.o : $(UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) + $(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC) + + # bk001205 - these wre the only SHLIB compiles in 1.17 +@@ -1450,7 +1464,7 @@ + # $(B)/missionpack/ui/q_math.o \ + # $(B)/missionpack/ui/q_shared.o + +-$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ) ++$(B)/missionpack/ui.$(SHLIBEXT) : $(MPUIOBJ) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ) + + $(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC) -DMISSIONPACK +@@ -1613,23 +1627,8 @@ + $(B)/q3static/unix_net.o \ + $(B)/q3static/unix_shared.o \ \ +- $(B)/q3static/ahoptim.o \ +- $(B)/q3static/autohint.o \ +- $(B)/q3static/ftbase.o \ +- $(B)/q3static/ftdebug.o \ +- $(B)/q3static/ftglyph.o \ +- $(B)/q3static/ftinit.o \ +- $(B)/q3static/ftmm.o \ +- $(B)/q3static/ftsystem.o \ +- $(B)/q3static/raster1.o \ +- $(B)/q3static/sfnt.o \ +- $(B)/q3static/sfobjs.o \ +- $(B)/q3static/smooth.o \ +- $(B)/q3static/truetype.o \ +- \ $(B)/q3static/linux_qgl.o \ $(B)/q3static/linux_glimp.o \ - $(B)/q3static/linux_joystick.o \ $(B)/q3static/linux_snd.o \ $(B)/q3static/snd_mixa.o \ $(B)/q3static/matha.o -@@ -1779,7 +1775,6 @@ +@@ -1779,7 +1778,6 @@ $(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC @@ -97,3 +433,25 @@ $(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC $(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC +@@ -2020,7 +2018,7 @@ + + + +-$(B)/$(PLATFORM)q3static : $(Q3SOBJ) ++$(B)/q3static : $(Q3SOBJ) + $(CC) $(CFLAGS) -o $@ $(Q3SOBJ) $(GLLDFLAGS) $(LDFLAGS) + + +@@ -2059,9 +2057,9 @@ + + copyfiles: + -mkdirhier $(COPYDIR) +- cp $(BR)/linuxquake3 $(COPYDIR)/quake3.x86 +- strip $(COPYDIR)/quake3.x86 +- chmod 755 $(COPYDIR)/quake3.x86 ++ cp $(BR)/linuxquake3 $(COPYDIR)/quake3 ++ strip $(COPYDIR)/quake3 ++ chmod 755 $(COPYDIR)/quake3 + cp $(BR)/linuxq3ded $(COPYDIR)/q3ded + strip $(COPYDIR)/q3ded + chmod 755 $(COPYDIR)/q3ded diff --git a/games/quake3/files/patch-code-unix-cons b/games/quake3/files/patch-code-unix-cons deleted file mode 100644 index b2e41f55f747..000000000000 --- a/games/quake3/files/patch-code-unix-cons +++ /dev/null @@ -1,27 +0,0 @@ ---- code/unix/cons.orig Fri Jun 14 13:01:32 2002 -+++ code/unix/cons Wed Nov 23 10:32:49 2005 -@@ -271,11 +271,11 @@ - # Defaults for a typical (?) UNIX platform. - # Your mileage may vary. - 'unix' => [ -- 'CC' => 'cc', -- 'CFLAGS' => '', -+ 'CC' => $ENV{CC}, -+ 'CFLAGS' => $ENV{CFLAGS}, - 'CCCOM' => '%CC %CFLAGS %_IFLAGS -c %< -o %>', -- 'CXX' => '%CC', -- 'CXXFLAGS' => '%CFLAGS', -+ 'CXX' => $ENV{CXX}, -+ 'CXXFLAGS' => $ENV{CXXFLAGS}, - 'CXXCOM' => '%CXX %CXXFLAGS %_IFLAGS -c %< -o %>', - 'INCDIRPREFIX' => '-I', - 'INCDIRSUFFIX' => '', -@@ -294,7 +294,7 @@ - 'LD' => 'ld', - 'LDFLAGS' => '', - 'PREFLIB' => 'lib', -- 'ENV' => { 'PATH' => '/bin:/usr/bin' }, -+ 'ENV' => { 'PATH' => '/bin:/usr/bin:/usr/local/bin' }, - ], - ); - diff --git a/games/quake3/files/patch-code-unix-unix_main.c b/games/quake3/files/patch-code-unix-unix_main.c new file mode 100644 index 000000000000..093aff871d16 --- /dev/null +++ b/games/quake3/files/patch-code-unix-unix_main.c @@ -0,0 +1,58 @@ +--- code/unix/unix_main.c.orig Thu May 25 16:59:37 2006 ++++ code/unix/unix_main.c Thu May 25 17:00:58 2006 +@@ -707,12 +707,12 @@ + { + void *libHandle; + void (*dllEntry)( int (*syscallptr)(int, ...) ); +- char curpath[MAX_OSPATH]; + char fname[MAX_OSPATH]; + char *basepath; + char *homepath; + char *pwdpath; + char *gamedir; ++ char *libdir = LIBDIR; + char *fn; + const char* err = NULL; + +@@ -721,18 +721,7 @@ + // bk001206 - let's have some paranoia + assert( name ); + +- getcwd(curpath, sizeof(curpath)); +-#if defined __i386__ +- snprintf (fname, sizeof(fname), "%si386.so", name); +-#elif defined __powerpc__ //rcg010207 - PPC support. +- snprintf (fname, sizeof(fname), "%sppc.so", name); +-#elif defined __axp__ +- snprintf (fname, sizeof(fname), "%saxp.so", name); +-#elif defined __mips__ +- snprintf (fname, sizeof(fname), "%smips.so", name); +-#else +-#error Unknown arch +-#endif ++ snprintf (fname, sizeof(fname), "%s.so", name); + + // bk001129 - was RTLD_LAZY + #define Q_RTLD RTLD_NOW +@@ -742,10 +731,19 @@ + homepath = Cvar_VariableString( "fs_homepath" ); + gamedir = Cvar_VariableString( "fs_game" ); + +- // pwdpath +- fn = FS_BuildOSPath( pwdpath, gamedir, fname ); ++ // libdir ++ fn = FS_BuildOSPath( libdir, gamedir, fname ); + Com_Printf( "Sys_LoadDll(%s)... \n", fn ); + libHandle = dlopen( fn, Q_RTLD ); ++ ++ // pwdpath ++ if ( !libHandle ) ++ { ++ Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror() ); ++ fn = FS_BuildOSPath( pwdpath, gamedir, fname ); ++ Com_Printf( "Sys_LoadDll(%s)... \n", fn ); ++ libHandle = dlopen( fn, Q_RTLD ); ++ } + + if ( !libHandle ) + { diff --git a/games/quake3/files/patch-code-unix-unix_shared.c b/games/quake3/files/patch-code-unix-unix_shared.c index 013c39f2bc13..e30407e90ca2 100644 --- a/games/quake3/files/patch-code-unix-unix_shared.c +++ b/games/quake3/files/patch-code-unix-unix_shared.c @@ -1,11 +1,11 @@ ---- code/unix/unix_shared.c.orig Mon Aug 15 20:10:07 2005 -+++ code/unix/unix_shared.c Sun Nov 20 18:41:22 2005 +--- code/unix/unix_shared.c.orig Thu May 25 14:38:44 2006 ++++ code/unix/unix_shared.c Thu May 25 14:41:26 2006 @@ -38,7 +38,7 @@ static char cdPath[MAX_OSPATH]; // Used to determine local installation path -static char installPath[MAX_OSPATH]; -+static char installPath[MAX_OSPATH] = %%Q3DIR%%; ++static char installPath[MAX_OSPATH] = DATADIR; // Used to determine where to store user-specific files static char homePath[MAX_OSPATH]; @@ -34,7 +34,7 @@ // test the wrap issue #if 0 -@@ -136,7 +140,7 @@ +@@ -136,10 +140,10 @@ return ret; } @@ -42,4 +42,8 @@ +// #endif //#if 0 // bk001215 - see snapvector.nasm for replacement - #if (defined __APPLE__) // rcg010206 - using this for PPC builds... +-#if (defined __APPLE__) // rcg010206 - using this for PPC builds... ++#ifndef __i386__ // rcg010206 - using this for PPC builds... + long fastftol( float f ) { // bk001213 - from win32/win_shared.c + //static int tmp; + // __asm fld f diff --git a/games/quake3/files/patch-lcc-custom.mk b/games/quake3/files/patch-lcc-custom.mk deleted file mode 100644 index 8e6807919e3b..000000000000 --- a/games/quake3/files/patch-lcc-custom.mk +++ /dev/null @@ -1,6 +0,0 @@ -diff -ruN ./lcc/custom.mk ../quake3-1.32b-BUILT/./lcc/custom.mk ---- ./lcc/custom.mk Wed Oct 17 23:53:10 2001 -+++ ../quake3-1.32b-BUILT/./lcc/custom.mk Mon Aug 22 20:50:29 2005 -@@ -1 +1 @@ --BUILDDIR=/tmp -+BUILDDIR=./build diff --git a/games/quake3/files/patch-lcc-makefile b/games/quake3/files/patch-lcc-makefile deleted file mode 100644 index f5bf35620127..000000000000 --- a/games/quake3/files/patch-lcc-makefile +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ./lcc/makefile ../quake3-1.32b-BUILT/./lcc/makefile ---- ./lcc/makefile Wed Oct 17 23:53:10 2001 -+++ ../quake3-1.32b-BUILT/./lcc/makefile Mon Aug 22 20:59:15 2005 -@@ -136,7 +136,7 @@ - - $Blcc$E: $Blcc$O $Bhost$O; $(LD) $(LDFLAGS) -o $@ $Blcc$O $Bhost$O - --SYSTEM=$(shell cc -print-search-dirs | head -n 1 | cut -b 10-) -+SYSTEM=/usr/lib - - $Blcc$O: etc/lcc.c; $(CC) $(CFLAGS) -c -DTEMPDIR=\"$(TEMPDIR)\" -o $@ etc/lcc.c - $Bhost$O: $(HOSTFILE); $(CC) $(CFLAGS) -c -DSYSTEM=\"$(SYSTEM)\" -o $@ $(HOSTFILE) diff --git a/games/quake3/pkg-plist b/games/quake3/pkg-plist new file mode 100644 index 000000000000..0ce6c302de0c --- /dev/null +++ b/games/quake3/pkg-plist @@ -0,0 +1,12 @@ +%%DEDICATED%%bin/q3ded +%%CLIENT%%bin/quake3 +%%SMP%%bin/quake3-smp +%%GAMELIBS%%%%LIBDIR%%/baseq3/cgame.so +%%GAMELIBS%%%%LIBDIR%%/baseq3/qagame.so +%%GAMELIBS%%%%LIBDIR%%/baseq3/ui.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/cgame.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/qagame.so +%%GAMELIBS%%%%LIBDIR%%/missionpack/ui.so +%%GAMELIBS%%@dirrm %%LIBDIR%%/missionpack +%%GAMELIBS%%@dirrm %%LIBDIR%%/baseq3 +%%GAMELIBS%%@dirrm %%LIBDIR%% |