diff options
author | danfe <danfe@FreeBSD.org> | 2006-03-20 15:21:27 +0000 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2006-03-20 15:21:27 +0000 |
commit | cca7d173dc1b81f97d4594856afd357569077c3e (patch) | |
tree | e761315d7b655d36d8e3d6584b13843db5237149 /games/cleanq3 | |
parent | 78562892dbe95e077c3e02c6a27f3292095c6b2a (diff) | |
download | FreeBSD-ports-cca7d173dc1b81f97d4594856afd357569077c3e.zip FreeBSD-ports-cca7d173dc1b81f97d4594856afd357569077c3e.tar.gz |
Add CleanQ3, yet another cleaned up copy of the original Quake III Arena
source code.
CleanQ3 is a Quake III Arena engine project intended to clean up the
original source code, and eliminate bugs. You won't find revolutionary
features, just a "better" Quake III.
WWW: http://tremor.quakedev.com/cleanq3.html
Diffstat (limited to 'games/cleanq3')
-rw-r--r-- | games/cleanq3/Makefile | 77 | ||||
-rw-r--r-- | games/cleanq3/distinfo | 3 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-Construct | 68 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-game-q_shared.h | 16 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-qcommon-common.c | 19 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-unix-Conscript-client | 26 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-unix-cons | 27 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-unix-unix_main.c | 44 | ||||
-rw-r--r-- | games/cleanq3/files/patch-code-unix-unix_shared.c | 45 | ||||
-rw-r--r-- | games/cleanq3/pkg-descr | 5 |
10 files changed, 330 insertions, 0 deletions
diff --git a/games/cleanq3/Makefile b/games/cleanq3/Makefile new file mode 100644 index 0000000..1817242 --- /dev/null +++ b/games/cleanq3/Makefile @@ -0,0 +1,77 @@ +# New ports collection makefile for: CleanQ3 +# Date created: 17 Mar 2006 +# Whom: Alexey Dokuchaev <danfe@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= cleanq3 +PORTVERSION= 0.5.2 +CATEGORIES= games +MASTER_SITES= http://tremor.quakedev.com/ +DISTNAME= CleanQ3_v${PORTVERSION}-srcbin + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Cleaned up copy of the original Quake III Arena source code + +BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm + +USE_ZIP= yes +USE_PERL5_BUILD=yes +USE_DOS2UNIX= yes +USE_GCC= 3.2+ +USE_GL= yes + +WRKSRC= ${WRKDIR}/CleanQ3 +INSTDIR= ${WRKSRC}/code/install + +PLIST_FILES= bin/cleanq3 bin/cleanq3ded \ + lib/cleanq3/baseq3/cgame.so \ + lib/cleanq3/baseq3/qagame.so \ + lib/cleanq3/baseq3/ui.so \ + lib/cleanq3/missionpack/cgame.so \ + lib/cleanq3/missionpack/qagame.so \ + lib/cleanq3/missionpack/ui.so +PLIST_DIRS= lib/cleanq3/baseq3 lib/cleanq3/missionpack lib/cleanq3 + +OPTIONS= OPTIMIZED_CFLAGS "Build with extra optimization options" on + +.include <bsd.port.pre.mk> + +.if defined(WITH_OPTIMIZED_CFLAGS) +CFLAGS= -O6 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 \ + -falign-functions=2 -fno-strict-aliasing -fstrength-reduce +.endif + +post-patch: .SILENT + ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g ; \ + s|%%X11BASE%%|${X11BASE}|g ; s|%%CFLAGS%%|${CFLAGS}|' \ + ${WRKSRC}/code/Construct ${WRKSRC}/code/unix/Conscript-client + ${REINPLACE_CMD} -e 's|-ldl || ; s|i386\.so|\.so|' \ + ${WRKSRC}/code/cgame/Conscript \ + ${WRKSRC}/code/game/Conscript ${WRKSRC}/code/q3_ui/Conscript \ + ${WRKSRC}/code/unix/Conscript-dedicated \ + ${WRKSRC}/code/ui/Conscript + ${REINPLACE_CMD} -e 's|%%Q3DIR%%|"${Q3DIR}"|' \ + ${WRKSRC}/code/unix/unix_shared.c + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \ + ${WRKSRC}/code/unix/unix_main.c + ${REINPLACE_CMD} -e 's|botlib.log|/dev/null|' \ + ${WRKSRC}/code/botlib/be_interface.c + +do-build: + cd ${WRKSRC}/code && ${MAKE_ENV} ${PERL} unix/cons + +do-install: + ${INSTALL_PROGRAM} ${INSTDIR}/linuxquake3 ${PREFIX}/bin/cleanq3 + ${INSTALL_PROGRAM} ${INSTDIR}/linuxq3ded ${PREFIX}/bin/cleanq3ded +.for d in baseq3 missionpack + @${MKDIR} ${PREFIX}/lib/cleanq3/${d} + ${INSTALL_PROGRAM} ${INSTDIR}/${d}/cgame.so ${PREFIX}/lib/cleanq3/${d} + ${INSTALL_PROGRAM} ${INSTDIR}/${d}/qagame.so ${PREFIX}/lib/cleanq3/${d} + ${INSTALL_PROGRAM} ${INSTDIR}/${d}/ui.so ${PREFIX}/lib/cleanq3/${d} +.endfor + +.include "${.CURDIR}/../quake3-data/Makefile.include" + +.include <bsd.port.post.mk> diff --git a/games/cleanq3/distinfo b/games/cleanq3/distinfo new file mode 100644 index 0000000..07ae509 --- /dev/null +++ b/games/cleanq3/distinfo @@ -0,0 +1,3 @@ +MD5 (CleanQ3_v0.5.2-srcbin.zip) = 873e6e0b747bc6dc4f1819f1bdd5a92e +SHA256 (CleanQ3_v0.5.2-srcbin.zip) = f37224bc717f9c1beae9c3ae7eba71db6f32b713132bee36e517190c35d6cb5f +SIZE (CleanQ3_v0.5.2-srcbin.zip) = 8970916 diff --git a/games/cleanq3/files/patch-code-Construct b/games/cleanq3/files/patch-code-Construct new file mode 100644 index 0000000..9c8e786e --- /dev/null +++ b/games/cleanq3/files/patch-code-Construct @@ -0,0 +1,68 @@ +--- code/Construct.orig Mon Mar 20 18:19:09 2006 ++++ code/Construct Mon Mar 20 18:37:12 2006 +@@ -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; +@@ -30,10 +30,10 @@ + $do_pk3 = 0; + # those are exported + $DO_WIN32 = 0; +-$NO_VM = 0; ++$NO_VM = 1; + $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,6 @@ + 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); + } + + if ($DO_WIN32 eq 1) +@@ -227,7 +224,7 @@ + # build the config directory + $CONFIG_DIR = $config . '-' . $cpu . '-' . $OS . '-' . $libc; + +-$COMMON_CFLAGS = '-pipe -fsigned-char '; ++$COMMON_CFLAGS = '-pipe -fsigned-char -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -I%%X11BASE%%/include -L%%X11BASE%%/lib '; + + if ($config eq 'debug') + { +@@ -237,7 +234,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 %%CFLAGS%% '; + $BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp '; + } + +@@ -302,9 +299,9 @@ + } + + # build tools +-$env_tools = new cons(); +-Command $env_tools 'qvmtools/q3lcc', '[perl] &build_tools(\'q3lcc\')'; +-Command $env_tools 'qvmtools/q3asm', '[perl] &build_tools(\'q3asm\')'; ++#$env_tools = new cons(); ++#Command $env_tools 'qvmtools/q3lcc', '[perl] &build_tools(\'q3lcc\')'; ++#Command $env_tools 'qvmtools/q3asm', '[perl] &build_tools(\'q3asm\')'; + + if ($do_bspc eq 1) + { diff --git a/games/cleanq3/files/patch-code-game-q_shared.h b/games/cleanq3/files/patch-code-game-q_shared.h new file mode 100644 index 0000000..f09f3e3 --- /dev/null +++ b/games/cleanq3/files/patch-code-game-q_shared.h @@ -0,0 +1,16 @@ +--- code/game/q_shared.h.orig Tue Aug 16 02:10:07 2005 ++++ code/game/q_shared.h Tue Aug 23 14:16:34 2005 +@@ -452,13 +452,9 @@ + void *Hunk_Alloc( int size, ha_pref preference ); + #endif + +-#ifdef __linux__ + // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371 + // custom Snd_Memset implementation for glibc memset bug workaround + void Snd_Memset (void* dest, const int val, const size_t count); +-#else +-#define Snd_Memset Com_Memset +-#endif + + #if !( defined __VECTORC ) + void Com_Memset (void* dest, const int val, const size_t count); diff --git a/games/cleanq3/files/patch-code-qcommon-common.c b/games/cleanq3/files/patch-code-qcommon-common.c new file mode 100644 index 0000000..9db06e6 --- /dev/null +++ b/games/cleanq3/files/patch-code-qcommon-common.c @@ -0,0 +1,19 @@ +--- code/qcommon/common.c.orig Mon Aug 15 23:10:07 2005 ++++ code/qcommon/common.c Wed Nov 23 10:53:29 2005 +@@ -24,15 +24,8 @@ + #include "../game/q_shared.h" + #include "qcommon.h" + #include <setjmp.h> +-#ifdef __linux__ ++#include <sys/types.h> + #include <netinet/in.h> +-#else +-#if defined(MACOS_X) +-#include <netinet/in.h> +-#else +-#include <winsock.h> +-#endif +-#endif + + int demo_protocols[] = + { 66, 67, 68, 0 }; diff --git a/games/cleanq3/files/patch-code-unix-Conscript-client b/games/cleanq3/files/patch-code-unix-Conscript-client new file mode 100644 index 0000000..a54e6cc --- /dev/null +++ b/games/cleanq3/files/patch-code-unix-Conscript-client @@ -0,0 +1,26 @@ +--- code/unix/Conscript-client.orig Fri Mar 17 13:50:18 2006 ++++ code/unix/Conscript-client Fri Mar 17 13:50:40 2006 +@@ -147,13 +147,13 @@ + LINK => $LINK, + ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} }, + CFLAGS => $BASE_CFLAGS, +- LIBS => ' ' . $BUILD_DIR . '/unix/splines.a ' ++ LIBS => ' ' + . $BUILD_DIR . '/unix/botlib.a ' + . $BUILD_DIR . '/unix/jpeglib.a ' + . $BUILD_DIR . '/unix/asmlib.a ' + . $BUILD_DIR . '/unix/inlinelib.a ' + . $BASE_LDFLAGS +- . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm' ++ . '-L%%X11BASE%%/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/cleanq3/files/patch-code-unix-cons b/games/cleanq3/files/patch-code-unix-cons new file mode 100644 index 0000000..b2e41f5 --- /dev/null +++ b/games/cleanq3/files/patch-code-unix-cons @@ -0,0 +1,27 @@ +--- 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/cleanq3/files/patch-code-unix-unix_main.c b/games/cleanq3/files/patch-code-unix-unix_main.c new file mode 100644 index 0000000..61d3841 --- /dev/null +++ b/games/cleanq3/files/patch-code-unix-unix_main.c @@ -0,0 +1,44 @@ +--- code/unix/unix_main.c.orig Mon Mar 20 18:39:10 2006 ++++ code/unix/unix_main.c Mon Mar 20 20:24:22 2006 +@@ -722,17 +722,7 @@ + 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 +@@ -765,12 +755,22 @@ + + if ( !libHandle ) + { ++ Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror() ); ++ // FreeBSD package installation path ++ fn = FS_BuildOSPath( "%%PREFIX%%/lib/cleanq3", gamedir, fname ); ++ Com_Printf( "Sys_LoadDll(%s)... \n", fn ); ++ libHandle = dlopen( fn, Q_RTLD ); ++ ++ if ( !libHandle ) ++ { + #ifndef NDEBUG // bk001206 - in debug abort on failure + Com_Error ( ERR_FATAL, "Sys_LoadDll(%s) failed dlopen() completely!\n", name ); + #else + Com_Printf ( "Sys_LoadDll(%s) failed dlopen() completely!\n", name ); + #endif + return NULL; ++ } else ++ Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn ); + } else + Com_Printf ( "Sys_LoadDll(%s): succeeded ...\n", fn ); + } else diff --git a/games/cleanq3/files/patch-code-unix-unix_shared.c b/games/cleanq3/files/patch-code-unix-unix_shared.c new file mode 100644 index 0000000..013c39f --- /dev/null +++ b/games/cleanq3/files/patch-code-unix-unix_shared.c @@ -0,0 +1,45 @@ +--- 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 +@@ -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%%; + + // Used to determine where to store user-specific files + static char homePath[MAX_OSPATH]; +@@ -76,7 +76,7 @@ + return curtime; + } + +-#if defined(__linux__) && !defined(DEDICATED) ++// #if defined(__linux__) && !defined(DEDICATED) + /* + ================ + Sys_XTimeToSysTime +@@ -98,11 +98,15 @@ + { + int ret, time, test; + ++ /* ++ Let's try to comment out this and see what will happen :-) ++ + if (!in_subframe->value) + { + // if you don't want to do any event times corrections + return Sys_Milliseconds(); + } ++ */ + + // test the wrap issue + #if 0 +@@ -136,7 +140,7 @@ + + return ret; + } +-#endif ++// #endif + + //#if 0 // bk001215 - see snapvector.nasm for replacement + #if (defined __APPLE__) // rcg010206 - using this for PPC builds... diff --git a/games/cleanq3/pkg-descr b/games/cleanq3/pkg-descr new file mode 100644 index 0000000..986b042 --- /dev/null +++ b/games/cleanq3/pkg-descr @@ -0,0 +1,5 @@ +CleanQ3 is a Quake III Arena engine project intended to clean up the original +source code, and eliminate bugs. You won't find revolutionary features, just +a "better" Quake III. + +WWW: http://tremor.quakedev.com/cleanq3.html |