summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2003-06-28 08:02:23 +0000
committerfjoe <fjoe@FreeBSD.org>2003-06-28 08:02:23 +0000
commit5a237aeaf425722922495404e99c5b8c6e11b8e7 (patch)
tree901b48ca1367f5c4084378dc164ebbecad7e13d7 /games
parent1009e9ed660f53838e4f9d338b817b349546702d (diff)
downloadFreeBSD-ports-5a237aeaf425722922495404e99c5b8c6e11b8e7.zip
FreeBSD-ports-5a237aeaf425722922495404e99c5b8c6e11b8e7.tar.gz
Allow client to be run from any directory.
Submitted by: MAINTAINER
Diffstat (limited to 'games')
-rw-r--r--games/quake2lnx/Makefile6
-rw-r--r--games/quake2lnx/files/patch-qcommon::files.c14
-rw-r--r--games/quake2lnx/pkg-message15
3 files changed, 26 insertions, 9 deletions
diff --git a/games/quake2lnx/Makefile b/games/quake2lnx/Makefile
index 0d2bf56..ed42bc4 100644
--- a/games/quake2lnx/Makefile
+++ b/games/quake2lnx/Makefile
@@ -25,6 +25,7 @@ MAINTAINER= danfe@regency.nsu.ru
COMMENT= Cleaned up copy of the original Quake II source code
USE_GMAKE= yes
+USE_REINPLACE= yes
.include <bsd.port.pre.mk>
@@ -240,6 +241,9 @@ pre-everything::
TGTDIR= ${WRKSRC}/release${ARCH}
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%%%BASEDIR%%%%|${DATADIR}|' ${WRKSRC}/src/qcommon/files.c
+
do-build:
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} build_release)
@@ -274,6 +278,6 @@ do-install:
.endif
post-install:
- @${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${PKGMESSAGE}
+ @${SED} -e 's|$${DATADIR}|${DATADIR}|g' ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/games/quake2lnx/files/patch-qcommon::files.c b/games/quake2lnx/files/patch-qcommon::files.c
new file mode 100644
index 0000000..a9af2f9
--- /dev/null
+++ b/games/quake2lnx/files/patch-qcommon::files.c
@@ -0,0 +1,14 @@
+--- qcommon/files.c.orig Wed Oct 9 03:54:25 2002
++++ 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/pkg-message b/games/quake2lnx/pkg-message
index c9aed33..3b8e61e 100644
--- a/games/quake2lnx/pkg-message
+++ b/games/quake2lnx/pkg-message
@@ -1,13 +1,12 @@
===================================================
Install additional mission paks and mods in
- ${PREFIX}/share/quake2lnx/ directory and be
- sure to run executable binary from there as
- well (that is, [sdl]quake2). You also must
- own full registered version of Quake II, or
- rebuild the port with -DWITH_SHAREWARE_DATA
- defined to install demo version data files.
- Note that you don't need full version to be
- able to run dedicated server.
+ ${DATADIR}/ directory.
+
+ You must also own full (registered) version
+ of Quake II, or rebuild the port with "make
+ -DWITH_SHAREWARE_DATA" to install demo ver-
+ sion data files. Note that you do not need
+ full version to run dedicated server.
===================================================
OpenPOWER on IntegriCloud