You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-fps/red-blue-quake2/files/0.1-gentoo.patch

64 lines
1.7 KiB

diff -ur Makefile.old Makefile
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -54,7 +54,7 @@
RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations
else
-RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
+RELEASE_CFLAGS=$(BASE_CFLAGS) -g $(GENTOO_CFLAGS) -DGENTOO_DATADIR=\\\"$(GENTOO_DATADIR)\\\" -O6 -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations
endif
diff -ur sys_linux.c.old sys_linux.c
--- a/linux/sys_linux.c
+++ b/linux/sys_linux.c
@@ -220,7 +220,7 @@
char curpath[MAX_OSPATH];
char *path;
#ifdef __i386__
- const char *gamename = "gamei386.so";
+ const char *gamename = "GENTOO_DIR/gamei386.so";
#elif defined __alpha__
const char *gamename = "gameaxp.so";
#else
@@ -250,6 +250,14 @@
{
Com_Printf ("LoadLibrary (%s)\n",name);
break;
+ } else {
+ sprintf (name, "%s", gamename);
+ game_library = dlopen (name, RTLD_LAZY );
+ if (game_library)
+ {
+ Com_Printf ("LoadLibrary (%s)\n",name);
+ break;
+ }
}
}
diff -ur ../qcommon/files.c ../qcommon/files.c
--- a/qcommon/files.c
+++ b/qcommon/files.c
@@ -865,7 +865,7 @@
//
// start up with baseq2 by default
//
- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
+ FS_AddGameDirectory (va(BASEDIRNAME) );
// any set gamedirs will be freed up to here
fs_base_searchpaths = fs_searchpaths;
diff -ur ../qcommon/qcommon.h ../qcommon/qcommon.h
--- a/qcommon/qcommon.h
+++ b/qcommon/qcommon.h
@@ -25,7 +25,7 @@
#define VERSION 3.21
-#define BASEDIRNAME "baseq2"
+#define BASEDIRNAME GENTOO_DATADIR
#ifdef WIN32