diff -Nur ports/games/ioquake3.orig/Makefile ports/games/ioquake3/Makefile --- ports/games/ioquake3.orig/Makefile 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/Makefile 2009-12-08 12:11:46.000000000 +0100 @@ -21,29 +21,27 @@ USE_GMAKE= yes OPTIONS= CLIENT "Build client" on \ - GAMELIBS "Build game libraries (when not mandatory)" on \ + GAMELIBS "Build game libraries (when not mandatory)" off \ DEDICATED "Build dedicated server" on \ - SMP "Build SMP (threaded) client" on \ VORBIS "Enable Ogg Vorbis support" on MAKE_ARGS+= DEFAULT_BASEDIR="${Q3DIR}" \ DEFAULT_LIBDIR="${LIBDIR}" \ HOMEPATH="/.${PORTNAME}" \ - ARCH="${LINUX_ARCH}" + ARCH="${ARCH}" PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" \ - ARCH="${LINUX_ARCH}" \ + ARCH="${ARCH}" \ BINSUFFIX="${BINSUFFIX}" ALL_TARGET= release MAKE_JOBS_SAFE= yes LIBDIR= ${PREFIX}/lib/${PORTNAME} -BUILDDIR= ${WRKSRC}/build/release-${OPSYS:L}-${LINUX_ARCH} -LINUX_ARCH= ${ARCH:C/amd64/x86_64/:C/i386/x86/} +BUILDDIR= ${WRKSRC}/build/release-${OPSYS:L}-${ARCH} BINSUFFIX?= ONLY_FOR_ARCHS= amd64 i386 -# Make sure TARGET and CFLAGS fit together. +# Make sure TARGET and CFLAGS fit together for cross-compiling. MACHINE_ARCH= ${ARCH} .include @@ -90,6 +88,7 @@ PLIST_SUB+= GAMELIBS="@comment " .endif +# Note that SMP is only supported on OS-X, hence the option has been removed. .if defined(WITH_SMP) MAKE_ARGS+= BUILD_CLIENT_SMP=1 PLIST_SUB+= SMP="" @@ -100,7 +99,7 @@ do-install: .for bin in ${Q3BIN} - ${INSTALL_PROGRAM} ${BUILDDIR}/${bin}.${LINUX_ARCH} \ + ${INSTALL_PROGRAM} ${BUILDDIR}/${bin}.${ARCH} \ ${PREFIX}/bin/${bin}${BINSUFFIX} .endfor .if defined(WITH_GAMELIBS) diff -Nur ports/games/ioquake3.orig/files/patch-Makefile ports/games/ioquake3/files/patch-Makefile --- ports/games/ioquake3.orig/files/patch-Makefile 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/files/patch-Makefile 2009-12-08 11:38:26.000000000 +0100 @@ -1,22 +1,6 @@ ---- Makefile.orig 2009-08-30 19:33:49.000000000 +0200 -+++ Makefile 2009-09-01 23:28:34.000000000 +0200 -@@ -17,6 +17,15 @@ - COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/i386/) - endif - -+ifeq ($(COMPILE_PLATFORM),freebsd) -+ ifeq ($(COMPILE_ARCH),amd64) -+ COMPILE_ARCH=x86_64 -+ endif -+ ifeq ($(COMPILE_ARCH),i386) -+ COMPILE_ARCH=x86 -+ endif -+endif -+ - ifeq ($(COMPILE_PLATFORM),mingw32) - ifeq ($(COMPILE_ARCH),i386) - COMPILE_ARCH=x86 -@@ -521,15 +530,35 @@ +--- Makefile.orig 2009-04-22 20:54:48.000000000 +0200 ++++ Makefile 2009-12-08 11:38:10.000000000 +0100 +@@ -521,15 +521,22 @@ ifeq ($(PLATFORM),freebsd) @@ -25,70 +9,99 @@ - else #default to i386 - ARCH=i386 - endif #alpha test -+ FREEBSD_ARCH = $(ARCH) -+ ifeq ($(ARCH),amd64) -+ ARCH = x86_64 -+ endif -+ ifeq ($(ARCH),i386) -+ ARCH = x86 -+ endif -+ -+ ifeq ($(FREEBSD_ARCH),x86_64) -+ FREEBSD_ARCH = amd64 -+ endif -+ ifeq ($(FREEBSD_ARCH),x86) -+ FREEBSD_ARCH = i386 -+ endif - -+ ifndef HOMEPATH -+ HOMEPATH = /.ioquake3 -+ endif -+ -+ ifndef DEFAULT_LIBDIR -+ DEFAULT_LIBDIR = /usr/local/lib/ioquake3 -+ endif - - BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ +- +- +- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ - -DUSE_ICON $(shell sdl-config --cflags) -+ -DUSE_ICON $(shell sdl-config --cflags) -DMAP_ANONYMOUS=MAP_ANON \ -+ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ -+ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \ -+ $(shell make -f /dev/null -VCFLAGS MACHINE_ARCH=$(FREEBSD_ARCH)) -+ ++ ifndef HOMEPATH ++ HOMEPATH = /.ioquake3 ++ endif ++ ++ ifndef DEFAULT_LIBDIR ++ DEFAULT_LIBDIR = /usr/local/lib/ioquake3 ++ endif ++ ++ BASE_CFLAGS = $(shell env MACHINE_ARCH=$(ARCH) make -f /dev/null -VCFLAGS) \ ++ -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ ++ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON \ ++ -DHOMEPATH=\\\"$(HOMEPATH)\\\" \ ++ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" ++ CLIENT_CFLAGS = $(SDL_CFLAGS) ++ SERVER_CFLAGS = ++ HAVE_VM_COMPILED = true ifeq ($(USE_OPENAL),1) BASE_CFLAGS += -DUSE_OPENAL -@@ -547,9 +576,22 @@ - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations - else +@@ -542,24 +549,6 @@ + BASE_CFLAGS += -DUSE_CODEC_VORBIS + endif + +- ifeq ($(ARCH),axp) +- BASE_CFLAGS += -DNO_VM_COMPILED +- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ +- -fomit-frame-pointer -fexpensive-optimizations +- else - ifeq ($(ARCH),i386) - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \ - -march=pentium -fomit-frame-pointer -pipe -ffast-math \ -+ ifeq ($(ARCH),x86) +- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ +- -funroll-loops -fstrength-reduce +- HAVE_VM_COMPILED=true +- else +- BASE_CFLAGS += -DNO_VM_COMPILED +- endif +- endif +- +- DEBUG_CFLAGS=$(BASE_CFLAGS) -g +- + SHLIBEXT=so + SHLIBCFLAGS=-fPIC + SHLIBLDFLAGS=-shared $(LDFLAGS) +@@ -582,6 +571,27 @@ + CLIENT_LIBS += -lvorbisfile -lvorbis -logg + endif + ++ ifeq ($(ARCH),i386) + ifeq ($(CROSS_COMPILING),1) + BASE_CFLAGS += -m32 + endif -+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 \ -+ -fomit-frame-pointer -pipe -ffast-math \ -+ -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ -+ -funroll-loops -fstrength-reduce -+ HAVE_VM_COMPILED=true -+ else -+ ifeq ($(ARCH),x86_64) ++ endif ++ ifeq ($(ARCH),amd64) + ifeq ($(CROSS_COMPILING),1) + BASE_CFLAGS += -m64 + endif -+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 \ -+ -fomit-frame-pointer -pipe -ffast-math \ - -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ - -funroll-loops -fstrength-reduce - HAVE_VM_COMPILED=true -@@ -557,6 +599,7 @@ - BASE_CFLAGS += -DNO_VM_COMPILED ++ endif ++ ++ ifeq ($(BUILD_CLIENT),1) ++ BASE_CFLAGS += $(CLIENT_CFLAGS) ++ endif ++ ++ RELEASE_CFLAGS = $(BASE_CFLAGS) -DNDEBUG -O3 -fomit-frame-pointer \ ++ -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ ++ -funroll-loops -fstrength-reduce ++ ++ DEBUG_CFLAGS = $(BASE_CFLAGS) -g ++ + else # ifeq freebsd + + ############################################################################# +@@ -1442,6 +1452,9 @@ + ifeq ($(ARCH),x86_64) + Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o + endif ++ ifeq ($(ARCH),amd64) ++ Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o ++ endif + ifeq ($(ARCH),ppc) + Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o endif +@@ -1591,6 +1604,9 @@ + ifeq ($(ARCH),x86_64) + Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o endif ++ ifeq ($(ARCH),amd64) ++ Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o + endif - - DEBUG_CFLAGS=$(BASE_CFLAGS) -g - + ifeq ($(ARCH),ppc) + Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o + endif diff -Nur ports/games/ioquake3.orig/files/patch-code-qcommon-files.c ports/games/ioquake3/files/patch-code-qcommon-files.c --- ports/games/ioquake3.orig/files/patch-code-qcommon-files.c 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/files/patch-code-qcommon-files.c 2009-12-08 11:09:10.000000000 +0100 @@ -1,23 +1,18 @@ ---- code/qcommon/files.c.orig 2009-08-30 22:58:50.000000000 +0200 -+++ code/qcommon/files.c 2009-08-30 23:10:53.000000000 +0200 -@@ -241,6 +241,9 @@ +--- code/qcommon/files.c.orig 2009-12-08 11:07:08.000000000 +0100 ++++ code/qcommon/files.c 2009-12-08 11:08:41.000000000 +0100 +@@ -241,6 +241,7 @@ #endif static cvar_t *fs_basepath; -+#ifdef __FreeBSD__ +static cvar_t *fs_libpath; -+#endif static cvar_t *fs_basegame; static cvar_t *fs_gamedirvar; static searchpath_t *fs_searchpaths; -@@ -2761,6 +2764,10 @@ +@@ -2761,6 +2762,7 @@ fs_debug = Cvar_Get( "fs_debug", "0", 0 ); fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT ); fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); -+ #ifdef __FreeBSD__ + fs_libpath = Cvar_Get ("fs_libpath", Sys_DefaultLibPath(), CVAR_INIT ); -+ #endif -+ homePath = Sys_DefaultHomePath(); if (!homePath || !homePath[0]) { homePath = fs_basepath->string; diff -Nur ports/games/ioquake3.orig/files/patch-code-qcommon-qcommon.h ports/games/ioquake3/files/patch-code-qcommon-qcommon.h --- ports/games/ioquake3.orig/files/patch-code-qcommon-qcommon.h 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/files/patch-code-qcommon-qcommon.h 2009-12-08 11:11:08.000000000 +0100 @@ -1,13 +1,12 @@ ---- code/qcommon/qcommon.h.orig 2009-08-30 23:12:19.000000000 +0200 -+++ code/qcommon/qcommon.h 2009-08-30 23:26:12.000000000 +0200 -@@ -1068,6 +1068,10 @@ - #ifdef MACOS_X +--- code/qcommon/qcommon.h.orig 2009-12-08 11:09:48.000000000 +0100 ++++ code/qcommon/qcommon.h 2009-12-08 11:10:43.000000000 +0100 +@@ -1069,6 +1069,9 @@ char *Sys_DefaultAppPath(void); #endif -+#ifdef __FreeBSD__ + +void Sys_SetDefaultLibPath(const char *path); +char *Sys_DefaultLibPath(void); -+#endif - ++ void Sys_SetDefaultHomePath(const char *path); char *Sys_DefaultHomePath(void); + const char *Sys_Dirname( char *path ); diff -Nur ports/games/ioquake3.orig/files/patch-code-sys-sys_main.c ports/games/ioquake3/files/patch-code-sys-sys_main.c --- ports/games/ioquake3.orig/files/patch-code-sys-sys_main.c 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/files/patch-code-sys-sys_main.c 2009-12-08 11:31:35.000000000 +0100 @@ -1,22 +1,17 @@ ---- code/sys/sys_main.c.orig 2009-08-30 22:32:59.000000000 +0200 -+++ code/sys/sys_main.c 2009-08-30 23:21:12.000000000 +0200 -@@ -49,6 +49,9 @@ +--- code/sys/sys_main.c.orig 2009-03-02 23:26:36.000000000 +0100 ++++ code/sys/sys_main.c 2009-12-08 11:31:12.000000000 +0100 +@@ -49,6 +49,7 @@ static char binaryPath[ MAX_OSPATH ] = { 0 }; static char installPath[ MAX_OSPATH ] = { 0 }; -+#ifdef __FreeBSD__ +static char libPath[ MAX_OSPATH ] = { 0 }; -+#endif /* ================= -@@ -93,6 +96,31 @@ - return Sys_Cwd(); - } +@@ -95,6 +96,30 @@ -+#ifdef __FreeBSD__ -+/* -+================= + /* + ================= +Sys_SetDefaultLibPath +================= +*/ @@ -37,75 +32,63 @@ + else + return Sys_Cwd(); +} -+#endif + - /* - ================= ++ ++/* ++================= Sys_DefaultAppPath -@@ -384,6 +412,7 @@ + ================= + */ +@@ -384,6 +409,7 @@ #1 look down current path #2 look in fs_homepath #3 look in fs_basepath -+#4 look in fs_libpath under FreeBSD ++#4 look in fs_libpath ================= */ void *Sys_LoadDll( const char *name, char *fqpath , -@@ -394,6 +423,9 @@ +@@ -394,6 +420,7 @@ void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); char fname[MAX_OSPATH]; char *basepath; -+ #ifdef __FreeBSD__ + char *libpath; -+ #endif char *homepath; char *pwdpath; char *gamedir; -@@ -405,6 +437,9 @@ +@@ -405,6 +432,7 @@ // TODO: use fs_searchpaths from files.c pwdpath = Sys_Cwd(); basepath = Cvar_VariableString( "fs_basepath" ); -+ #ifdef __FreeBSD__ + libpath = Cvar_VariableString( "fs_libpath" ); -+ #endif homepath = Cvar_VariableString( "fs_homepath" ); gamedir = Cvar_VariableString( "fs_game" ); -@@ -416,6 +451,11 @@ - if(!libHandle && basepath) - libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); +@@ -413,6 +441,9 @@ + if(!libHandle && homepath) + libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath); -+ #ifdef __FreeBSD__ + if(!libHandle && libpath) + libHandle = Sys_TryLibraryLoad(libpath, gamedir, fname, fqpath); -+ #endif + - if(!libHandle) { - Com_Printf ( "Sys_LoadDll(%s) failed to load library\n", name ); - return NULL; -@@ -469,6 +509,16 @@ + if(!libHandle && basepath) + libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); + +@@ -469,6 +500,10 @@ # endif #endif -+#ifdef __FreeBSD__ +#ifndef DEFAULT_LIBDIR -+# ifdef MACOS_X -+# define DEFAULT_LIBDIR Sys_StripAppBundle(Sys_BinaryPath()) -+# else -+# define DEFAULT_LIBDIR Sys_BinaryPath() -+# endif -+#endif ++# define DEFAULT_LIBDIR DEFAULT_BASEDIR +#endif + /* ================= Sys_SigHandler -@@ -540,6 +590,9 @@ +@@ -540,6 +575,7 @@ Sys_ParseArgs( argc, argv ); Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); -+ #ifdef __FreeBSD__ + Sys_SetDefaultLibPath( DEFAULT_LIBDIR ); -+ #endif // Concatenate the command line for passing to Com_Init for( i = 1; i < argc; i++ ) diff -Nur ports/games/ioquake3.orig/files/patch-code-sys-sys_unix.c ports/games/ioquake3/files/patch-code-sys-sys_unix.c --- ports/games/ioquake3.orig/files/patch-code-sys-sys_unix.c 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/files/patch-code-sys-sys_unix.c 2009-12-08 10:54:53.000000000 +0100 @@ -1,15 +1,13 @@ ---- code/sys/sys_unix.c.orig 2009-08-30 21:54:20.000000000 +0200 -+++ code/sys/sys_unix.c 2009-08-30 22:10:31.000000000 +0200 -@@ -56,8 +56,12 @@ - #ifdef MACOS_X +--- code/sys/sys_unix.c.orig 2008-11-11 00:55:22.000000000 +0100 ++++ code/sys/sys_unix.c 2009-12-08 10:54:22.000000000 +0100 +@@ -53,7 +53,9 @@ + if( ( p = getenv( "HOME" ) ) != NULL ) + { + Q_strncpyz( homePath, p, sizeof( homePath ) ); +-#ifdef MACOS_X ++#ifdef HOMEPATH ++ Q_strcat( homePath, sizeof( homePath ), HOMEPATH ); ++#elif defined MACOS_X Q_strcat( homePath, sizeof( homePath ), "/Library/Application Support/Quake3" ); #else -+#ifdef __FreeBSD__ -+ Q_strcat( homePath, sizeof( homePath ), HOMEPATH ); -+#else Q_strcat( homePath, sizeof( homePath ), "/.q3a" ); - #endif -+#endif - if( mkdir( homePath, 0777 ) ) - { - if( errno != EEXIST ) diff -Nur ports/games/ioquake3.orig/pkg-message ports/games/ioquake3/pkg-message --- ports/games/ioquake3.orig/pkg-message 2009-10-25 17:51:15.000000000 +0100 +++ ports/games/ioquake3/pkg-message 2009-12-08 11:41:50.000000000 +0100 @@ -8,4 +8,7 @@ overwrite them. But you can safely copy the original directory to the new one for the first time. +Should you encounter freezes when playing a demo or single player game, +rebuild without client libraries. + ============================================================================== diff -Nur ports/games/ioquake3-devel.orig/Makefile ports/games/ioquake3-devel/Makefile --- ports/games/ioquake3-devel.orig/Makefile 2009-10-25 17:51:31.000000000 +0100 +++ ports/games/ioquake3-devel/Makefile 2009-12-08 11:50:31.000000000 +0100 @@ -18,7 +18,7 @@ PLIST= ${.CURDIR}/../ioquake3/pkg-plist PATCHDIR= ${WRKDIR}/freebsd-patchset/ -SVNREVISION= 1583 +SVNREVISION= 1753 BINSUFFIX= -devel .include "${.CURDIR}/../ioquake3/Makefile" diff -Nur ports/games/ioquake3-devel.orig/distinfo ports/games/ioquake3-devel/distinfo --- ports/games/ioquake3-devel.orig/distinfo 2009-10-25 17:51:31.000000000 +0100 +++ ports/games/ioquake3-devel/distinfo 2009-12-08 11:57:31.000000000 +0100 @@ -1,3 +1,3 @@ -MD5 (ioquake3-devel-1.36_SVN1583.zip) = 5a59062ce5779fe1985c40ece41c2722 -SHA256 (ioquake3-devel-1.36_SVN1583.zip) = 353f5bddbaed46323d4078e6907fcd602c771bd41fe641fc5b3ae67a187c1a88 -SIZE (ioquake3-devel-1.36_SVN1583.zip) = 5057370 +MD5 (ioquake3-devel-1.36_SVN1753.zip) = 9bc44569c086009ab42bf2b5f0485ad3 +SHA256 (ioquake3-devel-1.36_SVN1753.zip) = 6f7b563a225afa6b8d0988f1bae527129e23013ae6f656ca873deef7040c7c0f +SIZE (ioquake3-devel-1.36_SVN1753.zip) = 5016296 diff -Nur ports/games/ioquake3-devel.orig/pkg-descr ports/games/ioquake3-devel/pkg-descr --- ports/games/ioquake3-devel.orig/pkg-descr 2009-10-25 17:51:31.000000000 +0100 +++ ports/games/ioquake3-devel/pkg-descr 2009-12-08 11:54:26.000000000 +0100 @@ -1,11 +1,5 @@ -This project, icculus.org/quake3 (sometimes referred to ioquake3, or ioq3 for -short) aims to build upon id Software's Quake 3 source code release. The -source code was released on August 20, 2005 under the GPL. Since then, we have -been cleaning up, fixing bugs, and adding features. Our permanent goal is to -create the open source Quake 3 distribution upon which people base their games -and projects. We also seek to have the perfect version of the engine for -playing Quake 3: Arena, Team Arena, and all popular mods. This distribution of -the engine has been ported to many new platforms and has had a slew of new -features added, along with massive bug extermination. +This port creates development snapshots of icculus.org/quake3. The project is +known to seldomly produce releases. Due to the conservative development goals +of the project, development snapshots are generally considered reliable. WWW: http://ioquake3.org/ diff -Nur ports/games/ioquake3-devel.orig/pkg-message ports/games/ioquake3-devel/pkg-message --- ports/games/ioquake3-devel.orig/pkg-message 2009-10-25 17:51:31.000000000 +0100 +++ ports/games/ioquake3-devel/pkg-message 2009-12-08 11:55:01.000000000 +0100 @@ -1,10 +1,6 @@ ============================================================================== -The input devices are now handled by SDL. Some mouse buttons will have -different aliases and the mouse speed needs to be readjusted. - -The configuration files are saved to ~/.ioquake3-devel instead of ~/.ioquake3 -if you prefer both versions to share the configurations files create a -symlink. +Should you encounter freezes when playing a demo or single player game, +rebuild without client libraries. ==============================================================================