summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch')
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch213
1 files changed, 213 insertions, 0 deletions
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
new file mode 100644
index 000000000000..61f0bb2286e5
--- /dev/null
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
@@ -0,0 +1,213 @@
+--- Makefile
++++ Makefile
+@@ -74,35 +74,46 @@ endif
+
+ CC=gcc
+
++ifndef OPT_CFLAGS
+ ifeq ($(ARCH),axp)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
++OPT_CFLAGS=-ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ ifeq ($(ARCH),ppc)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
++OPT_CFLAGS=-O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ ifeq ($(ARCH),sparc)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \
++OPT_CFLAGS=-ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ ifeq ($(ARCH),i386)
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -falign-loops=2 \
++OPT_CFLAGS=-O2 -ffast-math -funroll-loops -falign-loops=2 \
+ -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing
+ # compiler bugs with gcc 2.96 and 3.0.1 can cause bad builds with heavy opts.
+-#RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -m486 -ffast-math -funroll-loops \
++#OPT_CFLAGS=-O6 -m486 -ffast-math -funroll-loops \
+ # -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
+ # -malign-jumps=2 -malign-functions=2
+ endif
+
+ ifeq ($(ARCH),x86_64)
+ _LIB := 64
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
++OPT_CFLAGS=-O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing
+ endif
++endif
++RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPT_CFLAGS)
++
++ifeq ($(ADDCFLAGS),debug)
++CFLAGS=$(DEBUG_CFLAGS) -DLINUX_VERSION=\"$(VERSION) Debug\"
++endif
++
++ifeq ($(ADDCFLAGS),release)
++CFLAGS=$(RELEASE_CFLAGS) -DLINUX_VERSION=\"$(VERSION)\"
++endif
+
+ VERSION=3.21+r0.16
+
+@@ -133,6 +136,13 @@ else
+ NET_UDP=net_udp
+ endif
+
++ifdef DEFAULT_BASEDIR
++BASE_CFLAGS += -DDEFAULT_BASEDIR=\"$(DEFAULT_BASEDIR)\"
++endif
++ifdef DEFAULT_LIBDIR
++BASE_CFLAGS += -DDEFAULT_LIBDIR=\"$(DEFAULT_LIBDIR)\"
++endif
++
+ ifeq ($(strip $(BUILD_QMAX)),YES)
+ BASE_CFLAGS+=-DQMAX
+ endif
+@@ -406,7 +424,7 @@
+ $(BUILD_DEBUG_DIR)/ctf \
+ $(BUILD_DEBUG_DIR)/xatrix \
+ $(BUILD_DEBUG_DIR)/rogue
+- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS) -DLINUX_VERSION='\"$(VERSION) Debug\"'"
++ $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) ADDCFLAGS=debug
+
+ build_release:
+ @-mkdir -p $(BUILD_RELEASE_DIR) \
+@@ -418,7 +436,7 @@
+ $(BUILD_RELEASE_DIR)/ctf \
+ $(BUILD_RELEASE_DIR)/xatrix \
+ $(BUILD_RELEASE_DIR)/rogue
+- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS) -DLINUX_VERSION='\"$(VERSION)\"'"
++ $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) ADDCFLAGS=release
+
+ targets: $(TARGETS)
+
+--- src/linux/qgl_linux.c
++++ src/linux/qgl_linux.c
+@@ -3006,13 +3006,17 @@ qboolean QGL_Init( const char *dllname )
+ // dllname, dlerror());
+
+ // try basedir next
+- path = ri.Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = ri.Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET)->string;
+
+ snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname );
+
+ if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
+- ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() );
+- return false;
++ path = ri.Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET)->string;
++ snprintf (fn, MAX_OSPATH, "%s/%s", path, dllname );
++ if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
++ ri.Con_Printf( PRINT_ALL, "%s\n", dlerror() );
++ return false;
++ }
+ }
+ Com_Printf ("Using %s for OpenGL...", fn);
+ } else {
+--- src/linux/vid_so.c
++++ src/linux/vid_so.c
+@@ -237,13 +237,17 @@ qboolean VID_LoadRefresh( char *name )
+ //regain root
+ seteuid(saved_euid);
+
+- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET)->string;
+
+ snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
+
+ if (stat(fn, &st) == -1) {
+- Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
+- return false;
++ path = Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET)->string;
++ snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
++ if (stat(fn, &st) == -1) {
++ Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
++ return false;
++ }
+ }
+
+ // permission checking
+@@ -493,13 +497,19 @@ qboolean VID_CheckRefExists (const char
+ char *path;
+ struct stat st;
+
+- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET)->string;
+ snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref );
+
+ if (stat(fn, &st) == 0)
+ return true;
+- else
+- return false;
++ else {
++ path = Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET)->string;
++ snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref );
++ if (stat(fn, &st) == 0)
++ return true;
++ else
++ return false;
++ }
+ }
+
+ /*****************************************************************************/
+--- src/qcommon/files.c
++++ src/qcommon/files.c
+@@ -60,6 +60,7 @@ typedef struct pack_s
+
+ char fs_gamedir[MAX_OSPATH];
+ cvar_t *fs_basedir;
++cvar_t *fs_libdir;
+ cvar_t *fs_cddir;
+ cvar_t *fs_gamedirvar;
+
+@@ -681,6 +682,7 @@ void FS_SetGamedir (char *dir)
+ if (fs_cddir->string[0])
+ FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) );
+ FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) );
++ FS_AddGameDirectory (va("%s/%s", fs_libdir->string, dir) );
+ FS_AddHomeAsGameDirectory(dir);
+ }
+ }
+@@ -898,7 +900,13 @@ void FS_InitFilesystem (void)
+ // basedir <path>
+ // allows the game to run from outside the data tree
+ //
+- fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET);
++ fs_basedir = Cvar_Get ("basedir", DEFAULT_BASEDIR, CVAR_NOSET);
++
++ //
++ // libdir <path>
++ // allows the game to store binary files (not data) in a sep tree
++ //
++ fs_libdir = Cvar_Get ("libdir", DEFAULT_LIBDIR, CVAR_NOSET);
+
+ //
+ // cddir <path>
+@@ -913,6 +921,7 @@ void FS_InitFilesystem (void)
+ // add baseq2 to search path
+ //
+ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
++ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_libdir->string) );
+
+ //
+ // then add a '.quake2/baseq2' directory in home directory by default
+--- src/qcommon/qcommon.h
++++ src/qcommon/qcommon.h
+@@ -74,6 +74,13 @@ Foundation, Inc., 59 Temple Place - Suit
+
+ #endif
+
++#ifndef DEFAULT_BASEDIR
++# define DEFAULT_BASEDIR "."
++#endif
++#ifndef DEFAULT_LIBDIR
++# define DEFAULT_LIBDIR DEFAULT_BASEDIR
++#endif
++
+ //============================================================================
+
+ typedef struct sizebuf_s