summaryrefslogtreecommitdiff
path: root/games/nethack-lib
diff options
context:
space:
mode:
authoragc <agc>2000-07-17 14:31:12 +0000
committeragc <agc>2000-07-17 14:31:12 +0000
commit08d99f22b95cbcc6ecd7bb5dff7e4f3bbcaa2200 (patch)
tree8da39c94316b1cde90f4da897a035d1fd1fc4573 /games/nethack-lib
parent3c4467c66f35f625e6cee5f6df936ca4fb666c71 (diff)
downloadpkgsrc-08d99f22b95cbcc6ecd7bb5dff7e4f3bbcaa2200.tar.gz
Find out the installed location of the gzip binary in a different
manner - use the first word of the ${GZIP_CMD} definition from bsd.pkg.mk, and substitute this value in the same manner that the PREFIX is set. This is useful on systems other than NetBSD, where gzip may not be installed in /usr/bin. Use a descriptive name for the input of the pre-processed file. Make sure that gcc is used when compiling on Solaris.
Diffstat (limited to 'games/nethack-lib')
-rw-r--r--games/nethack-lib/Makefile19
-rw-r--r--games/nethack-lib/files/patch-sum4
-rw-r--r--games/nethack-lib/patches/patch-aa4
3 files changed, 17 insertions, 10 deletions
diff --git a/games/nethack-lib/Makefile b/games/nethack-lib/Makefile
index 9c94c1aedb8..fe05b1c47f8 100644
--- a/games/nethack-lib/Makefile
+++ b/games/nethack-lib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2000/04/14 14:06:52 pooka Exp $
+# $NetBSD: Makefile,v 1.7 2000/07/17 14:31:12 agc Exp $
#
DISTNAME= nethack-3.3.0
@@ -16,16 +16,23 @@ INSTALL_TARGET= manpages install-dat
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+MAKE_FLAGS+= CC=gcc
+.endif
+
pre-configure:
@${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh
post-patch:
- @${MV} ${WRKSRC}/include/config.h ${WRKSRC}/foo
- @${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' <${WRKSRC}/foo> ${WRKSRC}/include/config.h
- @${RM} -f ${WRKSRC}/foo
+ @${MV} ${WRKSRC}/include/config.h ${WRKSRC}/config.h-pre
+ @${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' \
+ -e 's|@GZIP_PROGRAM@|'`${ECHO} ${GZIP_CMD} | ${AWK} '{ print $$1 }'`'|g' \
+ ${WRKSRC}/config.h-pre > ${WRKSRC}/include/config.h
+ @${RM} -f ${WRKSRC}/config.h-pre
post-build:
- @cd ${PKGDIR} ; \
- ${SED} -e 's#@PREFIX@#${PREFIX}#' < DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} -e 's|@PREFIX@|${PREFIX}|' ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
.include "../../mk/bsd.pkg.mk"
diff --git a/games/nethack-lib/files/patch-sum b/games/nethack-lib/files/patch-sum
index b0ecfafd957..fd0eb035dbb 100644
--- a/games/nethack-lib/files/patch-sum
+++ b/games/nethack-lib/files/patch-sum
@@ -1,6 +1,6 @@
-$NetBSD: patch-sum,v 1.4 2000/07/16 12:40:55 pooka Exp $
+$NetBSD: patch-sum,v 1.5 2000/07/17 14:31:13 agc Exp $
-MD5 (patch-aa) = b46c8c49e1e6ceb933a9bbef0efa3fc7
+MD5 (patch-aa) = 4d561cc88b548ab8fcc7953c18660d31
MD5 (patch-ab) = 39341410ce990a7eb55beeef4af75855
MD5 (patch-ac) = 4f89ee35a5901b7b8a8e376216c227ba
MD5 (patch-ad) = 1c894f6943c2b5edfcca5e36a6f43c4d
diff --git a/games/nethack-lib/patches/patch-aa b/games/nethack-lib/patches/patch-aa
index 7ac949f6f3f..6ce5e484e3c 100644
--- a/games/nethack-lib/patches/patch-aa
+++ b/games/nethack-lib/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.3 2000/07/16 12:40:55 pooka Exp $
+$NetBSD: patch-aa,v 1.4 2000/07/17 14:31:13 agc Exp $
--- include/config.h.orig Sat Dec 11 07:20:49 1999
+++ include/config.h Fri Dec 17 13:51:24 1999
@@ -13,7 +13,7 @@ $NetBSD: patch-aa,v 1.3 2000/07/16 12:40:55 pooka Exp $
/* An example of one alternative you might want to use: */
-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
-/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */
-+#define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
++#define COMPRESS "@GZIP_PROGRAM@" /* FSF gzip compression */
+#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
#endif