summaryrefslogtreecommitdiffstats
path: root/games/bsdgames
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2003-11-20 19:10:51 +0000
committerglewis <glewis@FreeBSD.org>2003-11-20 19:10:51 +0000
commita259da5aca802d00411d8fa5db238b58eb4fa156 (patch)
treec162b5d4386c755b24c6f020c02cd587586a4a11 /games/bsdgames
parent9cb4490f8d54a104ca0d6791ea616bfcc84a2ce3 (diff)
downloadFreeBSD-ports-a259da5aca802d00411d8fa5db238b58eb4fa156.zip
FreeBSD-ports-a259da5aca802d00411d8fa5db238b58eb4fa156.tar.gz
. Have hack look in the correct location for itself. Fixes the
"Can't get status of hack" error and exit. PR: 59443 Submitted by: Mark Laws <mdl@60hz.org>
Diffstat (limited to 'games/bsdgames')
-rw-r--r--games/bsdgames/Makefile4
-rw-r--r--games/bsdgames/files/patch-hack::hack.unix.c13
2 files changed, 16 insertions, 1 deletions
diff --git a/games/bsdgames/Makefile b/games/bsdgames/Makefile
index f650b68..a7eaf18 100644
--- a/games/bsdgames/Makefile
+++ b/games/bsdgames/Makefile
@@ -54,6 +54,8 @@ post-extract:
post-patch:
@${FIND} ${WRKSRC} -name '*.c' -or -name '*.h' -or -name '*.6' -or \
-name 'index' | ${XARGS} ${REINPLACE_CMD} -e \
- 's|share/games|local/share/games|g' \
+ 's|share/games|local/share/games|g'
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
+ "${WRKSRC}/hack/hack.unix.c"
.include <bsd.port.mk>
diff --git a/games/bsdgames/files/patch-hack::hack.unix.c b/games/bsdgames/files/patch-hack::hack.unix.c
new file mode 100644
index 0000000..8143eda
--- /dev/null
+++ b/games/bsdgames/files/patch-hack::hack.unix.c
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- hack/hack.unix.c.orig Thu Nov 20 10:17:36 2003
++++ hack/hack.unix.c Thu Nov 20 10:18:09 2003
+@@ -86,7 +86,7 @@
+ /* old version - for people short of space */
+ char *np;
+
+- name = "/usr/games/hide/hack";
++ name = "%%PREFIX%%/bin/hack";
+ if(stat(name, &hbuf))
+ error("Cannot get status of %s.",
+ (np = rindex(name, '/')) ? np+1 : name);
OpenPOWER on IntegriCloud