aboutsummaryrefslogtreecommitdiff
path: root/games/quake2lnx/files
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2006-08-14 20:38:43 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2006-08-14 20:38:43 +0000
commit92050f281820e60c3ddee700c776d2ff1352de04 (patch)
tree59ef076202a22295faf7789b5005d3da4c7ed6ef /games/quake2lnx/files
parent0744dfbb6b6917c8ab8a25e5c9630bd005414693 (diff)
downloadports-92050f281820e60c3ddee700c776d2ff1352de04.tar.gz
ports-92050f281820e60c3ddee700c776d2ff1352de04.zip
Notes
Diffstat (limited to 'games/quake2lnx/files')
-rw-r--r--games/quake2lnx/files/patch-Makefile119
-rw-r--r--games/quake2lnx/files/patch-src_linux_gl__glx.c35
-rw-r--r--games/quake2lnx/files/patch-src_qcommon_files.c21
3 files changed, 104 insertions, 71 deletions
diff --git a/games/quake2lnx/files/patch-Makefile b/games/quake2lnx/files/patch-Makefile
index 39e224b05022..86435fa071eb 100644
--- a/games/quake2lnx/files/patch-Makefile
+++ b/games/quake2lnx/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Sat Sep 25 05:06:52 2004
-+++ Makefile Tue Mar 21 19:18:24 2006
+--- Makefile.orig Fri Sep 24 19:06:52 2004
++++ Makefile Thu Jul 27 16:16:06 2006
@@ -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.
@@ -59,8 +59,7 @@
-# this nice line comes from the linux kernel makefile
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/alpha/axp/)
-+RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPTIMIZED_CFLAGS)
-
+-
-ifneq ($(ARCH),x86_64)
-ifneq ($(ARCH),i386)
-ifneq ($(ARCH),axp)
@@ -104,7 +103,8 @@
-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing
-endif
--
++RELEASE_CFLAGS=$(BASE_CFLAGS) $(OPTIMIZED_CFLAGS)
+
-VERSION=3.21+r0.16
+VERSION=3.21+r0.16.2
@@ -201,60 +201,30 @@
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,168 +189,54 @@
+@@ -224,167 +189,53 @@
.PHONY : targets build_debug build_release clean clean-debug clean-release clean2
-TARGETS=$(BUILDDIR)/quake2 $(BUILDDIR)/game$(ARCH).$(SHLIBEXT)
+-ifeq ($(strip $(BUILD_DEDICATED)),YES)
+- TARGETS += $(BUILDDIR)/q2ded
+-endif
+-ifeq ($(strip $(BUILD_CTFDLL)),YES)
+- TARGETS += $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT)
+ifeq ($(strip $(BUILD_CLIENT)),YES)
+ TARGETS += $(BUILDDIR)/quake2
-+endif
-+
-+ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
-+ TARGETS += $(BUILDDIR)/sdlquake2
-+endif
-+
-+ifeq ($(strip $(BUILD_SVGA)),YES)
-+ TARGETS += $(BUILDDIR)/ref_soft.$(SHLIBEXT)
-+endif
-+
-+ifeq ($(strip $(BUILD_X11)),YES)
-+ TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
-+endif
-+
-+ifeq ($(strip $(BUILD_GLX)),YES)
-+ TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT)
-+endif
-+
-+ifeq ($(strip $(BUILD_SDL)),YES)
-+ TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT)
-+endif
-+
-+ifeq ($(strip $(BUILD_SDLGL)),YES)
-+ TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
-+endif
-+
- ifeq ($(strip $(BUILD_DEDICATED)),YES)
- TARGETS += $(BUILDDIR)/q2ded
- endif
-+
-+ifeq ($(strip $(BUILD_GAME)),YES)
-+ TARGETS += $(BUILDDIR)/game.$(SHLIBEXT)
-+endif
-+
- ifeq ($(strip $(BUILD_CTFDLL)),YES)
-- TARGETS += $(BUILDDIR)/ctf/game$(ARCH).$(SHLIBEXT)
-+ TARGETS += $(BUILDDIR)/ctf/game.$(SHLIBEXT)
endif
- ifeq ($(strip $(BUILD_XATRIX)),YES)
+-ifeq ($(strip $(BUILD_XATRIX)),YES)
- TARGETS += $(BUILDDIR)/xatrix/game$(ARCH).$(SHLIBEXT)
-+ TARGETS += $(BUILDDIR)/xatrix/game.$(SHLIBEXT)
++ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
++ TARGETS += $(BUILDDIR)/quake2-sdl
endif
- ifeq ($(strip $(BUILD_ROGUE)),YES)
+-ifeq ($(strip $(BUILD_ROGUE)),YES)
- TARGETS += $(BUILDDIR)/rogue/game$(ARCH).$(SHLIBEXT)
-+ TARGETS += $(BUILDDIR)/rogue/game.$(SHLIBEXT)
++ifeq ($(strip $(BUILD_SVGA)),YES)
++ TARGETS += $(BUILDDIR)/ref_soft.$(SHLIBEXT)
endif
-ifeq ($(ARCH),axp)
@@ -367,46 +337,72 @@
- ifeq ($(strip $(BUILD_FXGL)),YES)
- $(warning Warning: FXGL not currently supported for $(ARCH))
- endif
--
++ifeq ($(strip $(BUILD_X11)),YES)
++ TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
++endif
+
- ifeq ($(strip $(BUILD_SDLGL)),YES)
- TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
- endif
-endif # ARCH x86_64
--
++ifeq ($(strip $(BUILD_GLX)),YES)
++ TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT)
++endif
+
-ifeq ($(ARCH),i386)
- ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
- TARGETS += $(BUILDDIR)/sdlquake2
- endif
--
++ifeq ($(strip $(BUILD_SDL)),YES)
++ TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT)
++endif
+
- ifeq ($(strip $(BUILD_SVGA)),YES)
- TARGETS += $(BUILDDIR)/ref_soft.$(SHLIBEXT)
- endif
--
++ifeq ($(strip $(BUILD_SDLGL)),YES)
++ TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
++endif
+
- ifeq ($(strip $(BUILD_X11)),YES)
- TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
- endif
--
++ifeq ($(strip $(BUILD_DEDICATED)),YES)
++ TARGETS += $(BUILDDIR)/q2ded
++endif
+
- ifeq ($(strip $(BUILD_GLX)),YES)
- TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT)
- endif
--
++ifeq ($(strip $(BUILD_GAME)),YES)
++ TARGETS += $(BUILDDIR)/game.$(SHLIBEXT)
++endif
+
- ifeq ($(strip $(BUILD_FXGL)),YES)
- TARGETS += $(BUILDDIR)/ref_gl.$(SHLIBEXT)
- endif
--
++ifeq ($(strip $(BUILD_CTFDLL)),YES)
++ TARGETS += $(BUILDDIR)/ctf/game.$(SHLIBEXT)
++endif
+
- ifeq ($(strip $(BUILD_SDL)),YES)
- TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT)
- endif
--
++ifeq ($(strip $(BUILD_XATRIX)),YES)
++ TARGETS += $(BUILDDIR)/xatrix/game.$(SHLIBEXT)
++endif
+
- ifeq ($(strip $(BUILD_SDLGL)),YES)
- TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
- endif
-endif # ARCH i386
--
++ifeq ($(strip $(BUILD_ROGUE)),YES)
++ TARGETS += $(BUILDDIR)/rogue/game.$(SHLIBEXT)
++endif
+
ifeq ($(strip $(BUILD_AA)),YES)
TARGETS += $(BUILDDIR)/ref_softaa.$(SHLIBEXT)
- endif
-@@ -493,10 +344,11 @@
+@@ -493,16 +344,17 @@
$(BUILDDIR)/client/snd_sdl.o
ifeq ($(ARCH),i386)
@@ -419,6 +415,13 @@
endif
$(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS)
+ $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS)
+
+-$(BUILDDIR)/sdlquake2 : $(QUAKE2_OBJS) $(QUAKE2_SDL_OBJS) $(QUAKE2_AS_OBJS)
++$(BUILDDIR)/quake2-sdl : $(QUAKE2_OBJS) $(QUAKE2_SDL_OBJS) $(QUAKE2_AS_OBJS)
+ $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_SDL_OBJS) $(QUAKE2_AS_OBJS) $(LDFLAGS) $(SDLLDFLAGS)
+
+ $(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
@@ -719,7 +571,7 @@
$(DO_DED_CC)
diff --git a/games/quake2lnx/files/patch-src_linux_gl__glx.c b/games/quake2lnx/files/patch-src_linux_gl__glx.c
index 16b252319b98..0af126eb74da 100644
--- a/games/quake2lnx/files/patch-src_linux_gl__glx.c
+++ b/games/quake2lnx/files/patch-src_linux_gl__glx.c
@@ -1,6 +1,27 @@
---- src/linux/gl_glx.c.orig Thu Oct 10 01:29:47 2002
-+++ src/linux/gl_glx.c Mon Jun 16 23:19:21 2003
-@@ -475,6 +475,10 @@
+--- src/linux/gl_glx.c.orig Thu Jan 27 19:35:20 2005
++++ src/linux/gl_glx.c Wed Jul 26 22:32:32 2006
+@@ -428,7 +428,6 @@
+ while (XPending(dpy)) {
+ //ri.Con_Printf(PRINT_ALL,"Bar");
+ XNextEvent(dpy, &event);
+- mx = my = 0;
+ switch(event.type) {
+ case KeyPress:
+ myxtime = event.xkey.time;
+@@ -449,10 +448,8 @@
+ }
+ else
+ {
+- mx -= ((int)event.xmotion.x - mwx) * 2;
+- my -= ((int)event.xmotion.y - mwy) * 2;
+- mwx = event.xmotion.x;
+- mwy = event.xmotion.y;
++ mx += ((int)event.xmotion.x - mwx) * 2;
++ my += ((int)event.xmotion.y - mwy) * 2;
+
+ if (mx || my)
+ dowarp = true;
+@@ -475,6 +472,10 @@
in_state->Key_Event_fp (K_MWHEELUP, 1);
else if (event.xbutton.button == 5)
in_state->Key_Event_fp (K_MWHEELDOWN, 1);
@@ -11,7 +32,7 @@
if (b>=0 && in_state && in_state->Key_Event_fp)
in_state->Key_Event_fp (K_MOUSE1 + b, true);
if (b>=0)
-@@ -493,6 +497,10 @@
+@@ -493,6 +494,10 @@
in_state->Key_Event_fp (K_MWHEELUP, 0);
else if (event.xbutton.button == 5)
in_state->Key_Event_fp (K_MWHEELDOWN, 0);
@@ -22,7 +43,7 @@
if (b>=0 && in_state && in_state->Key_Event_fp)
in_state->Key_Event_fp (K_MOUSE1 + b, false);
if (b>=0)
-@@ -1015,7 +1023,7 @@
+@@ -1015,7 +1020,7 @@
qboolean OpenJoystick(cvar_t *joy_dev) {
int i, err;
glob_t pglob;
@@ -31,7 +52,7 @@
err = glob(joy_dev->string, 0, NULL, &pglob);
-@@ -1030,7 +1038,7 @@
+@@ -1030,7 +1035,7 @@
default:
ri.Con_Printf(PRINT_ALL, "Error #%d while looking for joysticks\n",err);
}
@@ -40,7 +61,7 @@
}
for (i=0;i<pglob.gl_pathc;i++) {
-@@ -1039,38 +1047,36 @@
+@@ -1039,38 +1044,36 @@
if (joy_fd == -1) {
ri.Con_Printf(PRINT_ALL, "Error opening joystick dev %s\n",
pglob.gl_pathv[i]);
diff --git a/games/quake2lnx/files/patch-src_qcommon_files.c b/games/quake2lnx/files/patch-src_qcommon_files.c
index a93235c61ea9..0d07f0575a63 100644
--- a/games/quake2lnx/files/patch-src_qcommon_files.c
+++ b/games/quake2lnx/files/patch-src_qcommon_files.c
@@ -1,11 +1,20 @@
---- src/qcommon/files.c.orig Tue Mar 21 19:36:01 2006
-+++ src/qcommon/files.c Tue Mar 21 19:41:27 2006
-@@ -913,6 +913,8 @@
+--- src/qcommon/files.c.orig Sun Jan 2 00:38:12 2005
++++ src/qcommon/files.c Thu Jul 27 17:07:25 2006
+@@ -680,6 +680,8 @@
+ Cvar_FullSet ("gamedir", dir, CVAR_SERVERINFO|CVAR_NOSET);
+ if (fs_cddir->string[0])
+ FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) );
++ FS_AddGameDirectory (va("%%DATADIR%%/%s", dir));
++ FS_AddGameDirectory (va("%%LIBDIR%%/%s", dir));
+ FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) );
+ FS_AddHomeAsGameDirectory(dir);
+ }
+@@ -912,6 +914,8 @@
+ //
// add baseq2 to search path
//
- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
-+ FS_AddGameDirectory ("%%LIBDIR%%/"BASEDIRNAME);
+ FS_AddGameDirectory ("%%DATADIR%%/"BASEDIRNAME);
++ FS_AddGameDirectory ("%%LIBDIR%%/"BASEDIRNAME);
+ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
//
- // then add a '.quake2/baseq2' directory in home directory by default