diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2005-11-17 10:51:28 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2005-11-17 10:51:28 +0000 |
commit | 8175bdc56ac0cdc7eaf5bc3f3a308e4722790544 (patch) | |
tree | 218115ab9bd09b05e3ac5e3b7df7fdf62225025a /games/quake2lnx/files | |
parent | 822f76591c3ba8df9e0580f31ded39c5b382fc9b (diff) | |
download | ports-8175bdc56ac0cdc7eaf5bc3f3a308e4722790544.tar.gz ports-8175bdc56ac0cdc7eaf5bc3f3a308e4722790544.zip |
Notes
Diffstat (limited to 'games/quake2lnx/files')
16 files changed, 174 insertions, 47 deletions
diff --git a/games/quake2lnx/files/extra-patch-src_rogue_g__local.h b/games/quake2lnx/files/extra-patch-src_rogue_g__local.h new file mode 100644 index 000000000000..6b43c988effc --- /dev/null +++ b/games/quake2lnx/files/extra-patch-src_rogue_g__local.h @@ -0,0 +1,10 @@ +--- src/rogue/g_local.h.orig Mon Nov 30 17:53:20 1998 ++++ src/rogue/g_local.h Tue Sep 27 20:20:27 2005 +@@ -22,7 +22,6 @@ + //================================================================== + + #ifndef _WIN32 +-#include <nan.h> + #define min(a,b) ((a) < (b) ? (a) : (b)) + #define max(a,b) ((a) > (b) ? (a) : (b)) + #ifdef __sun__ diff --git a/games/quake2lnx/files/extra-patch-src_rogue_q__shared.c b/games/quake2lnx/files/extra-patch-src_rogue_q__shared.c new file mode 100644 index 000000000000..25ffc42c24b4 --- /dev/null +++ b/games/quake2lnx/files/extra-patch-src_rogue_q__shared.c @@ -0,0 +1,11 @@ +--- src/rogue/q_shared.c.orig Mon Nov 30 17:53:34 1998 ++++ src/rogue/q_shared.c Tue Sep 27 20:03:24 2005 +@@ -329,7 +329,7 @@ + Returns 1, 2, or 1 + 2 + ================== + */ +-#if !id386 || defined __linux__ ++#if !id386 || defined __linux__ || defined __FreeBSD__ + int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p) + { + float dist1, dist2; diff --git a/games/quake2lnx/files/extra-patch-src_xatrix_q__shared.c b/games/quake2lnx/files/extra-patch-src_xatrix_q__shared.c new file mode 100644 index 000000000000..917934b400b9 --- /dev/null +++ b/games/quake2lnx/files/extra-patch-src_xatrix_q__shared.c @@ -0,0 +1,11 @@ +--- src/xatrix/q_shared.c.orig Mon Nov 30 17:55:36 1998 ++++ src/xatrix/q_shared.c Tue Sep 27 20:04:53 2005 +@@ -326,7 +326,7 @@ + Returns 1, 2, or 1 + 2 + ================== + */ +-#if !id386 || defined __linux__ ++#if !id386 || defined __linux__ || defined __FreeBSD__ + int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p) + { + float dist1, dist2; diff --git a/games/quake2lnx/files/patch-Makefile b/games/quake2lnx/files/patch-Makefile index 2c19abb064ea..bd7c4aab765e 100644 --- a/games/quake2lnx/files/patch-Makefile +++ b/games/quake2lnx/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig Thu Oct 10 01:08:21 2002 -+++ Makefile Tue Jun 17 22:23:11 2003 +--- Makefile.orig Fri Sep 24 19:06:52 2004 ++++ Makefile Fri Oct 7 17:37:25 2005 @@ -12,30 +12,30 @@ # (Note: not all options are available for all platforms). # quake2 (uses OSS for sound, cdrom ioctls for cd audio) is automatically built. @@ -51,7 +51,7 @@ # (hopefully) end of configurable options -@@ -52,55 +52,11 @@ +@@ -52,60 +52,16 @@ endif endif @@ -110,12 +110,19 @@ MOUNT_DIR=src +-BUILD_DEBUG_DIR=debug$(ARCH) +-BUILD_RELEASE_DIR=release$(ARCH) ++BUILD_DEBUG_DIR=debug ++BUILD_RELEASE_DIR=release + CLIENT_DIR=$(MOUNT_DIR)/client + SERVER_DIR=$(MOUNT_DIR)/server + REF_SOFT_DIR=$(MOUNT_DIR)/ref_soft @@ -118,7 +74,7 @@ ROGUE_DIR=$(MOUNT_DIR)/rogue NULL_DIR=$(MOUNT_DIR)/null -BASE_CFLAGS=-Wall -pipe -Dstricmp=strcasecmp -+BASE_CFLAGS=-Wall -pipe -Dstricmp=strcasecmp $(CFLAGS) ++BASE_CFLAGS=-pipe -Dstricmp=strcasecmp -DDATADIR='\"${DATADIR}\"' -DLIBDIR='\"${LIBDIR}\"' $(CFLAGS) ifeq ($(HAVE_IPV6),YES) BASE_CFLAGS+= -DHAVE_IPV6 ifeq ($(OSTYPE),FreeBSD) @@ -151,7 +158,7 @@ +AALDFLAGS=-L${PREFIX}/lib -laa -SDLCFLAGS=$(shell sdl-config --cflags) -+SDLCFLAGS=$(shell sdl11-config --cflags) ++SDLCFLAGS=$(shell ${SDL_CONFIG} --cflags) ifeq ($(strip $(STATICSDL)),YES) - SDLLDFLAGS += -L/usr/X11R6/lib$(_LIB) -Wl,-Bstatic $(SDLDIR)/libSDL.a + SDLLDFLAGS += -L${X11BASE}/lib$(_LIB) -Wl,-Bstatic $(SDLDIR)/libSDL.a @@ -160,7 +167,7 @@ -lXinerama else - SDLLDFLAGS=$(shell sdl-config --libs) -+ SDLLDFLAGS=$(shell sdl11-config --libs) ++ SDLLDFLAGS=$(shell ${SDL_CONFIG} --libs) endif ifeq ($(strip $(BUILD_JOYSTICK)),YES) @@ -194,7 +201,7 @@ DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< DO_SHLIB_AS=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< -@@ -224,10 +189,42 @@ +@@ -224,168 +189,54 @@ .PHONY : targets build_debug build_release clean clean-debug clean-release clean2 @@ -232,14 +239,22 @@ endif + +ifeq ($(strip $(BUILD_GAME)),YES) -+ TARGETS += $(BUILDDIR)/game$(ARCH).$(SHLIBEXT) ++ TARGETS += $(BUILDDIR)/game.$(SHLIBEXT) +endif + ifeq ($(strip $(BUILD_CTFDLL)),YES) - TARGETS += $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) +- TARGETS += $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) ++ TARGETS += $(BUILDDIR)/ctf/game.$(SHLIBEXT) endif -@@ -240,152 +237,6 @@ - TARGETS += $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT) + + ifeq ($(strip $(BUILD_XATRIX)),YES) +- TARGETS += $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) ++ TARGETS += $(BUILDDIR)/xatrix/game.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_ROGUE)),YES) +- TARGETS += $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT) ++ TARGETS += $(BUILDDIR)/rogue/game.$(SHLIBEXT) endif -ifeq ($(ARCH),axp) @@ -404,6 +419,42 @@ endif $(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS) +@@ -821,7 +673,7 @@ + $(BUILDDIR)/game/q_shared.o \ + $(BUILDDIR)/game/m_flash.o + +-$(BUILDDIR)/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS) ++$(BUILDDIR)/game.$(SHLIBEXT) : $(GAME_OBJS) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS) + + $(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c +@@ -1000,7 +852,7 @@ + $(BUILDDIR)/ctf/p_weapon.o \ + $(BUILDDIR)/ctf/q_shared.o + +-$(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS) ++$(BUILDDIR)/ctf/game.$(SHLIBEXT) : $(CTF_OBJS) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS) + + $(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c +@@ -1139,7 +991,7 @@ + $(BUILDDIR)/xatrix/p_weapon.o \ + $(BUILDDIR)/xatrix/q_shared.o + +-$(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS) ++$(BUILDDIR)/xatrix/game.$(SHLIBEXT) : $(XATRIX_OBJS) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS) + + $(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c +@@ -1367,7 +1219,7 @@ + $(BUILDDIR)/rogue/q_shared.o + + +-$(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT) : $(ROGUE_OBJS) ++$(BUILDDIR)/rogue/game.$(SHLIBEXT) : $(ROGUE_OBJS) + $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS) + + $(BUILDDIR)/rogue/dm_ball.o : $(ROGUE_DIR)/dm_ball.c @@ -1588,6 +1440,7 @@ endif diff --git a/games/quake2lnx/files/patch-src::linux::sys_linux.c b/games/quake2lnx/files/patch-src::linux::sys_linux.c deleted file mode 100644 index f8937490018d..000000000000 --- a/games/quake2lnx/files/patch-src::linux::sys_linux.c +++ /dev/null @@ -1,22 +0,0 @@ ---- src/linux/sys_linux.c.orig Sun Feb 1 19:06:29 2004 -+++ src/linux/sys_linux.c Sun Feb 1 19:18:07 2004 -@@ -217,14 +217,16 @@ - char *str_p; - #if defined __i386__ - const char *gamename = "gamei386.so"; --#elif defined __x86_64__ -- const char *gamename = "gamex86_64.so"; -+#elif defined __amd64__ -+ const char *gamename = "gameamd64.so"; - #elif defined __alpha__ -- const char *gamename = "gameaxp.so"; -+ const char *gamename = "gamealpha.so"; - #elif defined __powerpc__ - const char *gamename = "gameppc.so"; - #elif defined __sparc__ - const char *gamename = "gamesparc.so"; -+#elif defined __ia64__ -+ const char *gamename = "gameia64.so"; - #else - #error Unknown arch - #endif diff --git a/games/quake2lnx/files/patch-src::qcommon::files.c b/games/quake2lnx/files/patch-src::qcommon::files.c deleted file mode 100644 index db9829b74fba..000000000000 --- a/games/quake2lnx/files/patch-src::qcommon::files.c +++ /dev/null @@ -1,14 +0,0 @@ ---- src/qcommon/files.c.orig Wed Oct 9 03:54:25 2002 -+++ src/qcommon/files.c Sat Jun 28 12:30:57 2003 -@@ -898,7 +898,11 @@ - // basedir <path> - // allows the game to run from outside the data tree - // -+#ifdef DEDICATED_ONLY - fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET); -+#else -+ fs_basedir = Cvar_Get ("basedir", "%%%%BASEDIR%%%%", CVAR_NOSET); -+#endif - - // - // cddir <path> diff --git a/games/quake2lnx/files/patch-src::game::g_phys.c b/games/quake2lnx/files/patch-src_game_g__phys.c index d6684b01e770..d6684b01e770 100644 --- a/games/quake2lnx/files/patch-src::game::g_phys.c +++ b/games/quake2lnx/files/patch-src_game_g__phys.c diff --git a/games/quake2lnx/files/patch-src::linux::gl_glx.c b/games/quake2lnx/files/patch-src_linux_gl__glx.c index 16b252319b98..16b252319b98 100644 --- a/games/quake2lnx/files/patch-src::linux::gl_glx.c +++ b/games/quake2lnx/files/patch-src_linux_gl__glx.c diff --git a/games/quake2lnx/files/patch-src_linux_joystick.c b/games/quake2lnx/files/patch-src_linux_joystick.c new file mode 100644 index 000000000000..f06b903a5aef --- /dev/null +++ b/games/quake2lnx/files/patch-src_linux_joystick.c @@ -0,0 +1,11 @@ +--- src/linux/joystick.c.orig Thu Jan 27 19:35:20 2005 ++++ src/linux/joystick.c Tue Sep 27 20:21:45 2005 +@@ -75,7 +75,7 @@ + in_joystick = ri.Cvar_Get ("in_joystick", "1", CVAR_ARCHIVE); + if (in_joystick->value) { + joy_name = ri.Cvar_Get ("joy_name", "joystick", 0); +- joy_dev = ri.Cvar_Get ("joy_dev","/dev/js*",CVAR_ARCHIVE); ++ joy_dev = ri.Cvar_Get ("joy_dev","/dev/joy*",CVAR_ARCHIVE); + joy_advanced = ri.Cvar_Get ("joy_advanced","0",0); + joy_advaxisx = ri.Cvar_Get ("joy_advaxisx","4",0); + joy_advaxisy = ri.Cvar_Get ("joy_advaxisy","2",0); diff --git a/games/quake2lnx/files/patch-src::linux::rw_in_svgalib.c b/games/quake2lnx/files/patch-src_linux_rw__in__svgalib.c index f5502683e86f..f5502683e86f 100644 --- a/games/quake2lnx/files/patch-src::linux::rw_in_svgalib.c +++ b/games/quake2lnx/files/patch-src_linux_rw__in__svgalib.c diff --git a/games/quake2lnx/files/patch-src::linux::rw_linux.c b/games/quake2lnx/files/patch-src_linux_rw__linux.c index 2ad83894da85..2ad83894da85 100644 --- a/games/quake2lnx/files/patch-src::linux::rw_linux.c +++ b/games/quake2lnx/files/patch-src_linux_rw__linux.c diff --git a/games/quake2lnx/files/patch-src::linux::rw_svgalib.c b/games/quake2lnx/files/patch-src_linux_rw__svgalib.c index a9937ff476b3..a9937ff476b3 100644 --- a/games/quake2lnx/files/patch-src::linux::rw_svgalib.c +++ b/games/quake2lnx/files/patch-src_linux_rw__svgalib.c diff --git a/games/quake2lnx/files/patch-src::linux::rw_x11.c b/games/quake2lnx/files/patch-src_linux_rw__x11.c index 72144026f5a4..72144026f5a4 100644 --- a/games/quake2lnx/files/patch-src::linux::rw_x11.c +++ b/games/quake2lnx/files/patch-src_linux_rw__x11.c diff --git a/games/quake2lnx/files/patch-src_linux_sys__linux.c b/games/quake2lnx/files/patch-src_linux_sys__linux.c new file mode 100644 index 000000000000..ac0070d6388e --- /dev/null +++ b/games/quake2lnx/files/patch-src_linux_sys__linux.c @@ -0,0 +1,23 @@ +--- src/linux/sys_linux.c.orig Sun Sep 12 15:26:29 2004 ++++ src/linux/sys_linux.c Fri Oct 7 17:32:46 2005 +@@ -215,19 +215,7 @@ + char name[MAX_OSPATH]; + char *path; + char *str_p; +-#if defined __i386__ +- const char *gamename = "gamei386.so"; +-#elif defined __x86_64__ +- const char *gamename = "gamex86_64.so"; +-#elif defined __alpha__ +- const char *gamename = "gameaxp.so"; +-#elif defined __powerpc__ +- const char *gamename = "gameppc.so"; +-#elif defined __sparc__ +- const char *gamename = "gamesparc.so"; +-#else +-#error Unknown arch +-#endif ++ const char *gamename = "game.so"; + + setreuid(getuid(), getuid()); + setegid(getgid()); diff --git a/games/quake2lnx/files/patch-src_linux_vid_so.c b/games/quake2lnx/files/patch-src_linux_vid_so.c new file mode 100644 index 000000000000..deb9d57f9d48 --- /dev/null +++ b/games/quake2lnx/files/patch-src_linux_vid_so.c @@ -0,0 +1,34 @@ +--- src/linux/vid_so.c.orig Fri Sep 24 19:11:44 2004 ++++ src/linux/vid_so.c Tue Sep 27 19:28:29 2005 +@@ -216,7 +216,6 @@ + refimport_t ri; + GetRefAPI_t GetRefAPI; + char fn[MAX_OSPATH]; +- char *path; + struct stat st; + extern uid_t saved_euid; + +@@ -237,9 +236,7 @@ + //regain root + seteuid(saved_euid); + +- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string; +- +- snprintf (fn, MAX_OSPATH, "%s/%s", path, name ); ++ snprintf (fn, MAX_OSPATH, LIBDIR"/%s", name ); + + if (stat(fn, &st) == -1) { + Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno)); +@@ -490,11 +487,9 @@ + qboolean VID_CheckRefExists (const char *ref) + { + char fn[MAX_OSPATH]; +- char *path; + struct stat st; + +- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string; +- snprintf (fn, MAX_OSPATH, "%s/ref_%s.so", path, ref ); ++ snprintf (fn, MAX_OSPATH, LIBDIR"/ref_%s.so", ref ); + + if (stat(fn, &st) == 0) + return true; diff --git a/games/quake2lnx/files/patch-src_qcommon_files.c b/games/quake2lnx/files/patch-src_qcommon_files.c new file mode 100644 index 000000000000..dca3a05e2a6d --- /dev/null +++ b/games/quake2lnx/files/patch-src_qcommon_files.c @@ -0,0 +1,12 @@ +--- src/qcommon/files.c.orig Sun Jan 2 00:38:12 2005 ++++ src/qcommon/files.c Tue Sep 27 18:25:41 2005 +@@ -912,7 +912,8 @@ + // + // add baseq2 to search path + // +- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) ); ++ FS_AddGameDirectory(LIBDIR"/"BASEDIRNAME); ++ FS_AddGameDirectory(DATADIR"/"BASEDIRNAME); + + // + // then add a '.quake2/baseq2' directory in home directory by default |