aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2006-03-22 00:24:32 +0800
committerdanfe <danfe@FreeBSD.org>2006-03-22 00:24:32 +0800
commit57d4c6530df87034d20861081f386847fe353c43 (patch)
treecebbb3cac85737281d22dbffba884cfae87645b0 /games
parent3f77d7286de3f5b92b64497f11a66c31a83f71ef (diff)
downloadfreebsd-ports-gnome-57d4c6530df87034d20861081f386847fe353c43.tar.gz
freebsd-ports-gnome-57d4c6530df87034d20861081f386847fe353c43.tar.zst
freebsd-ports-gnome-57d4c6530df87034d20861081f386847fe353c43.zip
Further work on my beloved port:
- Rework the way we handle BASEDIR/LIBDIR, keeping ability to set basedir from command line. Only ref_*.so files path left hardcoded - Tiny fix for dedicated server build (Makefile typo) - Most importantly, help Quake II always find libGL.so (no more LD_PRELOAD magic). Bump PORTREVISION for that [*] - Restore my nifty comments in pkg-plist References: http://utah-glx.sourceforge.net/faq.html#AEN262 [*]
Diffstat (limited to 'games')
-rw-r--r--games/quake2lnx/Makefile10
-rw-r--r--games/quake2lnx/files/patch-Makefile15
-rw-r--r--games/quake2lnx/files/patch-src_linux_vid_so.c8
-rw-r--r--games/quake2lnx/files/patch-src_qcommon_files.c13
-rw-r--r--games/quake2lnx/pkg-plist5
5 files changed, 35 insertions, 16 deletions
diff --git a/games/quake2lnx/Makefile b/games/quake2lnx/Makefile
index 371b5fc7e0d0..42da4da8446f 100644
--- a/games/quake2lnx/Makefile
+++ b/games/quake2lnx/Makefile
@@ -7,7 +7,7 @@
PORTNAME= quake2lnx
PORTVERSION= 0.16.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= http://offload1.icculus.org/quake2/files/:icc \
http://www.icculus.org/quake2/files/:icc \
@@ -48,7 +48,6 @@ OPTIONS= X11 "Build X11 software driver" on \
DATADIR= ${Q2DIR}
ALL_TARGET= build_release
-MAKE_ENV= LIBDIR="${LIBDIR}"
PLIST_SUB+= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
@@ -240,6 +239,13 @@ post-extract:
${TAIL} +${${mp:U}_OFF} ${mp}src320.shar | ${SH})
.endfor
+post-patch: .SILENT
+ ${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}| ; \
+ 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
+
do-install:
.for tgt in ${EXE_TARGETS}
${INSTALL_PROGRAM} ${TGTDIR}/${tgt} ${PREFIX}/bin
diff --git a/games/quake2lnx/files/patch-Makefile b/games/quake2lnx/files/patch-Makefile
index bd7c4aab765e..39e224b05022 100644
--- a/games/quake2lnx/files/patch-Makefile
+++ b/games/quake2lnx/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Fri Sep 24 19:06:52 2004
-+++ Makefile Fri Oct 7 17:37:25 2005
+--- Makefile.orig Sat Sep 25 05:06:52 2004
++++ Makefile Tue Mar 21 19:18:24 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.
@@ -122,7 +122,7 @@
NULL_DIR=$(MOUNT_DIR)/null
-BASE_CFLAGS=-Wall -pipe -Dstricmp=strcasecmp
-+BASE_CFLAGS=-pipe -Dstricmp=strcasecmp -DDATADIR='\"${DATADIR}\"' -DLIBDIR='\"${LIBDIR}\"' $(CFLAGS)
++BASE_CFLAGS=-pipe -Dstricmp=strcasecmp $(CFLAGS)
ifeq ($(HAVE_IPV6),YES)
BASE_CFLAGS+= -DHAVE_IPV6
ifeq ($(OSTYPE),FreeBSD)
@@ -419,6 +419,15 @@
endif
$(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS)
+@@ -719,7 +571,7 @@
+ $(DO_DED_CC)
+
+ $(BUILDDIR)/ded/q_shared.o : $(GAME_DIR)/q_shared.c
+- $(DO_DED_DEBUG_CC)
++ $(DO_DED_CC)
+
+ $(BUILDDIR)/ded/pmove.o : $(COMMON_DIR)/pmove.c
+ $(DO_DED_CC)
@@ -821,7 +673,7 @@
$(BUILDDIR)/game/q_shared.o \
$(BUILDDIR)/game/m_flash.o
diff --git a/games/quake2lnx/files/patch-src_linux_vid_so.c b/games/quake2lnx/files/patch-src_linux_vid_so.c
index deb9d57f9d48..9c8e80cba5d4 100644
--- a/games/quake2lnx/files/patch-src_linux_vid_so.c
+++ b/games/quake2lnx/files/patch-src_linux_vid_so.c
@@ -1,5 +1,5 @@
---- 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
+--- src/linux/vid_so.c.orig Tue Mar 21 19:43:33 2006
++++ src/linux/vid_so.c Tue Mar 21 19:47:12 2006
@@ -216,7 +216,6 @@
refimport_t ri;
GetRefAPI_t GetRefAPI;
@@ -15,7 +15,7 @@
- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
-
- snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
-+ snprintf (fn, MAX_OSPATH, LIBDIR"/%s", name );
++ snprintf (fn, MAX_OSPATH, "%%LIBDIR%%/%s", name );
if (stat(fn, &st) == -1) {
Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
@@ -28,7 +28,7 @@
- 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 );
++ 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
index dca3a05e2a6d..a93235c61ea9 100644
--- a/games/quake2lnx/files/patch-src_qcommon_files.c
+++ b/games/quake2lnx/files/patch-src_qcommon_files.c
@@ -1,12 +1,11 @@
---- 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 @@
- //
+--- 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 @@
// add baseq2 to search path
//
-- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
-+ FS_AddGameDirectory(LIBDIR"/"BASEDIRNAME);
-+ FS_AddGameDirectory(DATADIR"/"BASEDIRNAME);
+ 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
diff --git a/games/quake2lnx/pkg-plist b/games/quake2lnx/pkg-plist
index ba73c229cfe1..b84c9adf22f9 100644
--- a/games/quake2lnx/pkg-plist
+++ b/games/quake2lnx/pkg-plist
@@ -1,6 +1,8 @@
+@comment === EXECUTABLES ===
%%SERVER%%bin/q2ded
%%CLIENT%%bin/quake2
%%SDLCLIENT%%bin/sdlquake2
+@comment === RENDERERS ===
%%GAME%%%%LIBDIR%%/baseq2/game.so
%%CTF%%%%LIBDIR%%/ctf/game.so
%%ROGUE%%%%LIBDIR%%/rogue/game.so
@@ -11,10 +13,12 @@
%%AA%%%%LIBDIR%%/ref_softaa.so
%%SDL%%%%LIBDIR%%/ref_softsdl.so
%%X11%%%%LIBDIR%%/ref_softx.so
+@comment === DOCS ===
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.320
%%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
@@ -24,6 +28,7 @@
%%RETEX%%%%DATADIR%%/baseq2/pak16.pak
%%RETEX%%%%DATADIR%%/baseq2/pak17.pak
%%RETEX%%%%DATADIR%%/baseq2/pak19.pak
+@comment === CLEANUP ===
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%CTF%%@dirrm %%LIBDIR%%/ctf
%%GAME%%@dirrm %%LIBDIR%%/baseq2