aboutsummaryrefslogtreecommitdiff
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
parent0744dfbb6b6917c8ab8a25e5c9630bd005414693 (diff)
downloadports-92050f281820e60c3ddee700c776d2ff1352de04.tar.gz
ports-92050f281820e60c3ddee700c776d2ff1352de04.zip
Notes
-rw-r--r--games/quake2lnx/Makefile70
-rw-r--r--games/quake2lnx/distinfo30
-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
-rw-r--r--games/quake2lnx/pkg-plist18
6 files changed, 114 insertions, 179 deletions
diff --git a/games/quake2lnx/Makefile b/games/quake2lnx/Makefile
index 89cca9827abb..50452eeb3141 100644
--- a/games/quake2lnx/Makefile
+++ b/games/quake2lnx/Makefile
@@ -7,11 +7,10 @@
PORTNAME= quake2lnx
PORTVERSION= 0.16.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= http://offload1.icculus.org/quake2/files/:icc \
- http://www.icculus.org/quake2/files/:icc \
- ${MASTER_SITE_IDSOFTWARE:S|$|quake2/source/:id|}
+ http://www.icculus.org/quake2/files/:icc
DISTNAME= quake2-r${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:icc
DIST_SUBDIR= ${PORTNAME}
@@ -35,8 +34,6 @@ OPTIONS= X11 "Build X11 software driver" on \
SERVER "Build dedicated server executable" on \
GAME "Build a main game .so file" on \
CTF "Build Capture The Flag mod" off \
- ROGUE "Build Ground Zero (Rogue) mission pack" off \
- XATRIX "Build The Reckoning (Xatrix) mission pack" off \
RETEXTURE "Enable support of retextured graphics" off \
JOYSTICK "Enable joystick support" off \
REDBLUE "Enable 3D glasses rendering" off \
@@ -45,8 +42,6 @@ OPTIONS= X11 "Build X11 software driver" on \
OPTIMIZED_CFLAGS "Enable extra optimization options" off \
X86_ASM "Enable use of x86 assembly code" on
-DATADIR= ${Q2DIR}
-
ALL_TARGET= build_release
PLIST_SUB+= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
@@ -106,7 +101,7 @@ PLIST_SUB+= SDLGL="@comment "
.if defined(WITH_SDLCLIENT) && (defined(WITH_SDL) || ${HAVE_SDL:Msdl} != "")
MAKE_ARGS+= BUILD_SDLQUAKE2=YES
-EXE_TARGETS+= sdlquake2
+EXE_TARGETS+= quake2-sdl
PLIST_SUB+= SDLCLIENT=""
.else
PLIST_SUB+= SDLCLIENT="@comment "
@@ -164,38 +159,13 @@ PLIST_SUB+= CTF=""
PLIST_SUB+= CTF="@comment "
.endif
-.if defined(WITH_ROGUE)
-DISTFILES+= roguesrc320.shar.Z:id
-MAKE_ARGS+= BUILD_ROGUE=YES
-Q2MP+= rogue
-ROGUE_OFF= 454
-PLIST_SUB+= ROGUE=""
-.else
-PLIST_SUB+= ROGUE="@comment "
-.endif
-
-.if defined(WITH_XATRIX)
-DISTFILES+= xatrixsrc320.shar.Z:id
-MAKE_ARGS+= BUILD_XATRIX=YES
-Q2MP+= xatrix
-XATRIX_OFF= 441
-PLIST_SUB+= XATRIX=""
-.else
-PLIST_SUB+= XATRIX="@comment "
-.endif
-
### #
## MISCELLANEOUS TUNABLES ##
# ###
.if defined(WITH_RETEXTURE)
-. for i in 10 11 12 13 14 16 17 19
-DISTFILES+= pak${i}.pak:icc
-. endfor
MAKE_ARGS+= BUILD_RETEXTURE=YES
-PLIST_SUB+= RETEX=""
-.else
-PLIST_SUB+= RETEX="@comment "
+RUN_DEPENDS+= ${Q2DIR}/baseq2/pak10.pak:${PORTSDIR}/games/quake2-retexture
.endif
.if defined(WITH_JOYSTICK)
@@ -227,35 +197,19 @@ MAKE_ARGS+= NO_X86_ASM=YES
## END OF CONFIGURATION KNOBS ##
# ###
-post-extract: .SILENT
-.for mp in ${Q2MP}
- ${MKDIR} ${WRKSRC}/src/${mp}
- cd ${WRKSRC}/src/${mp} && ${GUNZIP_CMD} -c \
- ${DISTDIR}/${DIST_SUBDIR}/${mp}src320.shar.Z > \
- ${mp}src320.shar && \
- ${TAIL} +${${mp:U}_OFF} ${mp}src320.shar | ${SH} > /dev/null
-. if defined(WITH_XATRIX) || defined(WITH_ROGUE)
- ${REINPLACE_CMD} -e 's/__ $$/&|| defined __FreeBSD__/' \
- ${WRKSRC}/src/${mp}/q_shared.c
-. endif
-.endfor
-
post-patch: .SILENT
- ${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}| ; \
+ ${REINPLACE_CMD} -e 's|%%DATADIR%%|${Q2DIR}| ; \
s|%%LIBDIR%%|${LIBDIR}|' ${WRKSRC}/src/qcommon/files.c \
${WRKSRC}/src/linux/vid_so.c
${REINPLACE_CMD} -e 's|dllname, RTLD_LAZY|& \| RTLD_GLOBAL|' \
${WRKSRC}/src/linux/qgl_linux.c
-.if defined(WITH_ROGUE)
- ${REINPLACE_CMD} -e '/^#include <nan.h>/d' ${WRKSRC}/src/rogue/g_local.h
-.endif
${REINPLACE_CMD} -e 's|/dev/js|/dev/joy|' ${WRKSRC}/src/linux/joystick.c
do-install:
.for tgt in ${EXE_TARGETS}
${INSTALL_PROGRAM} ${TGTDIR}/${tgt} ${PREFIX}/bin
.endfor
- @${MKDIR} ${LIBDIR}
+ @${MKDIR} ${LIBDIR}/baseq2
.for tgt in ${REF_TARGETS}
${INSTALL_PROGRAM} ${TGTDIR}/ref_${tgt}.so ${LIBDIR}
.endfor
@@ -264,21 +218,11 @@ do-install:
${INSTALL_PROGRAM} ${TGTDIR}/ctf/game.so ${LIBDIR}/ctf
.endif
.if defined(WITH_EYECANDY)
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/maxpak.pak ${DATADIR}/baseq2
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/maxpak.pak ${LIBDIR}/baseq2
.endif
.if defined(WITH_GAME)
- @${MKDIR} ${LIBDIR}/baseq2
${INSTALL_PROGRAM} ${TGTDIR}/game.so ${LIBDIR}/baseq2
.endif
-.if defined(WITH_RETEXTURE)
-. for i in 10 11 12 13 14 16 17 19
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/pak${i}.pak ${DATADIR}/baseq2
-. endfor
-.endif
-.for mp in ${Q2MP}
- @${MKDIR} ${LIBDIR}/${mp}
- ${INSTALL_PROGRAM} ${TGTDIR}/${mp}/game.so ${LIBDIR}/${mp}
-.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
diff --git a/games/quake2lnx/distinfo b/games/quake2lnx/distinfo
index 08c85b125211..408acee5e934 100644
--- a/games/quake2lnx/distinfo
+++ b/games/quake2lnx/distinfo
@@ -4,33 +4,3 @@ SIZE (quake2lnx/quake2-r0.16.2.tar.gz) = 1496377
MD5 (quake2lnx/maxpak.pak) = 04d3f1fb7fb4dada7175a41f4595c7eb
SHA256 (quake2lnx/maxpak.pak) = 653569fe880f1ed5f7529483ac961b22078482e6ff0e83f4d9d1bc503c866770
SIZE (quake2lnx/maxpak.pak) = 3282742
-MD5 (quake2lnx/pak10.pak) = fc2de3c33c23cca5f0e6fcec068ce616
-SHA256 (quake2lnx/pak10.pak) = 196dc096c1f4fd620c19a09593e5b770ddbeed7d864ca3a95383f7bf9538fbc3
-SIZE (quake2lnx/pak10.pak) = 16315845
-MD5 (quake2lnx/pak11.pak) = 221019679613a13c6d7e5f9e21701d85
-SHA256 (quake2lnx/pak11.pak) = dcddd989b568cb28aa6c2a877d81df50a71fd9a649ce6dd44f454efe13e26a73
-SIZE (quake2lnx/pak11.pak) = 1702702
-MD5 (quake2lnx/pak12.pak) = 0c8b49c303014e535394168aed9b668a
-SHA256 (quake2lnx/pak12.pak) = 170af42c090940c89f1bf16e8518733bc39dac070e0d42e4eacad727b37de256
-SIZE (quake2lnx/pak12.pak) = 3629554
-MD5 (quake2lnx/pak13.pak) = 9628c82566535e48c59caaee5281b963
-SHA256 (quake2lnx/pak13.pak) = 085b22e5a9f23299e6f0519e402711725cdac51fc399ce577d0d701df0a72681
-SIZE (quake2lnx/pak13.pak) = 2198193
-MD5 (quake2lnx/pak14.pak) = 5d47605de09c458c7f1c69d8e6fea6a7
-SHA256 (quake2lnx/pak14.pak) = 78d3b02d20f856b3a0680035b0d67a80a16bede372eef3330b58c755387ff1ff
-SIZE (quake2lnx/pak14.pak) = 2397651
-MD5 (quake2lnx/pak16.pak) = 94b18e1f2d76fb7e7d0c5bd0ae8d7c69
-SHA256 (quake2lnx/pak16.pak) = eb21fbc6d0bcd69fb1d3768bcb7f0bbff03e28c18c67f239497d15749913ded3
-SIZE (quake2lnx/pak16.pak) = 2675893
-MD5 (quake2lnx/pak17.pak) = e24d79286ba3c1f3da1f9642a78c49af
-SHA256 (quake2lnx/pak17.pak) = e9585c18ec1f53b95dad833f76ac2df54586d3171e0f3a93ba7c2acce8d915be
-SIZE (quake2lnx/pak17.pak) = 1431798
-MD5 (quake2lnx/pak19.pak) = 070a4d00b93a2a427ca92adee2736000
-SHA256 (quake2lnx/pak19.pak) = ee7d5aaee977a8dd198c61a2bcca446b2ab421ee6eaa3a18159671dd742a9540
-SIZE (quake2lnx/pak19.pak) = 648896
-MD5 (quake2lnx/roguesrc320.shar.Z) = 7d5e052839c9e629bad0a6570aa70554
-SHA256 (quake2lnx/roguesrc320.shar.Z) = ceefb2fd748961cb0bc3244220f3eb09d8f7b8ca2eb32cdf9b284727a2fdc919
-SIZE (quake2lnx/roguesrc320.shar.Z) = 626769
-MD5 (quake2lnx/xatrixsrc320.shar.Z) = 41fc4ecc4f25c068e7d1f488bd4a1e1a
-SHA256 (quake2lnx/xatrixsrc320.shar.Z) = 94bf596cd85d38ea294b99ccb0ebb5e4b9776cca335001b3803e2d8407395589
-SIZE (quake2lnx/xatrixsrc320.shar.Z) = 455917
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
diff --git a/games/quake2lnx/pkg-plist b/games/quake2lnx/pkg-plist
index b84c9adf22f9..2d82a0528aca 100644
--- a/games/quake2lnx/pkg-plist
+++ b/games/quake2lnx/pkg-plist
@@ -1,12 +1,10 @@
@comment === EXECUTABLES ===
%%SERVER%%bin/q2ded
%%CLIENT%%bin/quake2
-%%SDLCLIENT%%bin/sdlquake2
+%%SDLCLIENT%%bin/quake2-sdl
@comment === RENDERERS ===
%%GAME%%%%LIBDIR%%/baseq2/game.so
%%CTF%%%%LIBDIR%%/ctf/game.so
-%%ROGUE%%%%LIBDIR%%/rogue/game.so
-%%XATRIX%%%%LIBDIR%%/xatrix/game.so
%%GLX%%%%LIBDIR%%/ref_glx.so
%%SDLGL%%%%LIBDIR%%/ref_sdlgl.so
%%SVGA%%%%LIBDIR%%/ref_soft.so
@@ -19,19 +17,9 @@
%%PORTDOCS%%%%DOCSDIR%%/joystick.txt
%%PORTDOCS%%%%DOCSDIR%%/quake2.3dfxgl
@comment === DATA ===
-%%QMAX%%%%DATADIR%%/baseq2/maxpak.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak10.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak11.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak12.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak13.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak14.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak16.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak17.pak
-%%RETEX%%%%DATADIR%%/baseq2/pak19.pak
+%%QMAX%%%%LIBDIR%%/baseq2/maxpak.pak
@comment === CLEANUP ===
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%CTF%%@dirrm %%LIBDIR%%/ctf
-%%GAME%%@dirrm %%LIBDIR%%/baseq2
-%%ROGUE%%@dirrm %%LIBDIR%%/rogue
-%%XATRIX%%@dirrm %%LIBDIR%%/xatrix
+@dirrm %%LIBDIR%%/baseq2
@dirrm %%LIBDIR%%