aboutsummaryrefslogtreecommitdiffstats
path: root/games/ioquake3
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2009-12-19 03:54:08 +0800
committerpav <pav@FreeBSD.org>2009-12-19 03:54:08 +0800
commitb2d04234b8ffdd1595045dfcca6f7d85ac0c7678 (patch)
tree4c0d87d979c9d88311ec8de0054f57ba6f63d8fc /games/ioquake3
parent1f0e2e9fbc68f0a3fa349a070501310e52ae9bca (diff)
downloadfreebsd-ports-gnome-b2d04234b8ffdd1595045dfcca6f7d85ac0c7678.tar.gz
freebsd-ports-gnome-b2d04234b8ffdd1595045dfcca6f7d85ac0c7678.tar.zst
freebsd-ports-gnome-b2d04234b8ffdd1595045dfcca6f7d85ac0c7678.zip
- Cleanup
- Update devel port to svn r1754 PR: ports/141453 Submitted by: Dominic Fandrey <kamikaze@bsdforen.de> (maintainer)
Diffstat (limited to 'games/ioquake3')
-rw-r--r--games/ioquake3/Makefile15
-rw-r--r--games/ioquake3/files/patch-Makefile153
-rw-r--r--games/ioquake3/files/patch-code-qcommon-files.c13
-rw-r--r--games/ioquake3/files/patch-code-qcommon-q_platform.h2
-rw-r--r--games/ioquake3/files/patch-code-qcommon-qcommon.h13
-rw-r--r--games/ioquake3/files/patch-code-sys-sys_main.c65
-rw-r--r--games/ioquake3/files/patch-code-sys-sys_unix.c22
-rw-r--r--games/ioquake3/pkg-descr12
-rw-r--r--games/ioquake3/pkg-message3
9 files changed, 141 insertions, 157 deletions
diff --git a/games/ioquake3/Makefile b/games/ioquake3/Makefile
index 7cde16cc4a99..0c86a277433e 100644
--- a/games/ioquake3/Makefile
+++ b/games/ioquake3/Makefile
@@ -21,29 +21,27 @@ USE_ZIP?= yes
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 <bsd.cpu.mk>
@@ -90,6 +88,7 @@ PLIST_SUB+= GAMELIBS=""
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 @@ PLIST_SUB+= SMP="@comment "
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 --git a/games/ioquake3/files/patch-Makefile b/games/ioquake3/files/patch-Makefile
index 1fff592d2b28..1c144a0948aa 100644
--- a/games/ioquake3/files/patch-Makefile
+++ b/games/ioquake3/files/patch-Makefile
@@ -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 --git a/games/ioquake3/files/patch-code-qcommon-files.c b/games/ioquake3/files/patch-code-qcommon-files.c
index 34bb2996f3b3..be48d4f46238 100644
--- a/games/ioquake3/files/patch-code-qcommon-files.c
+++ b/games/ioquake3/files/patch-code-qcommon-files.c
@@ -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 --git a/games/ioquake3/files/patch-code-qcommon-q_platform.h b/games/ioquake3/files/patch-code-qcommon-q_platform.h
index 5731b6a20362..a46ef085ea57 100644
--- a/games/ioquake3/files/patch-code-qcommon-q_platform.h
+++ b/games/ioquake3/files/patch-code-qcommon-q_platform.h
@@ -5,7 +5,7 @@
#ifdef __i386__
#define ARCH_STRING "i386"
+#elif defined __amd64__
-+#define ARCH_STRING "x86_64"
++#define ARCH_STRING "amd64"
#elif defined __axp__
#define ARCH_STRING "alpha"
#endif
diff --git a/games/ioquake3/files/patch-code-qcommon-qcommon.h b/games/ioquake3/files/patch-code-qcommon-qcommon.h
index 608e4e2f6686..e19e7f23b235 100644
--- a/games/ioquake3/files/patch-code-qcommon-qcommon.h
+++ b/games/ioquake3/files/patch-code-qcommon-qcommon.h
@@ -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 --git a/games/ioquake3/files/patch-code-sys-sys_main.c b/games/ioquake3/files/patch-code-sys-sys_main.c
index cdec5a52c318..0a936fdf9f2c 100644
--- a/games/ioquake3/files/patch-code-sys-sys_main.c
+++ b/games/ioquake3/files/patch-code-sys-sys_main.c
@@ -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 --git a/games/ioquake3/files/patch-code-sys-sys_unix.c b/games/ioquake3/files/patch-code-sys-sys_unix.c
index 43f98967bf51..278e50d47614 100644
--- a/games/ioquake3/files/patch-code-sys-sys_unix.c
+++ b/games/ioquake3/files/patch-code-sys-sys_unix.c
@@ -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 --git a/games/ioquake3/pkg-descr b/games/ioquake3/pkg-descr
index d49d4c07954b..1e21a579ceb5 100644
--- a/games/ioquake3/pkg-descr
+++ b/games/ioquake3/pkg-descr
@@ -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 --git a/games/ioquake3/pkg-message b/games/ioquake3/pkg-message
index 83d0497eafc4..118067a15b44 100644
--- a/games/ioquake3/pkg-message
+++ b/games/ioquake3/pkg-message
@@ -8,4 +8,7 @@ they have additional variables which would be removed if other engines
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.
+
==============================================================================