aboutsummaryrefslogtreecommitdiffstats
path: root/games/nethack34/Makefile
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2002-08-13 05:20:29 +0800
committerknu <knu@FreeBSD.org>2002-08-13 05:20:29 +0800
commita5b8f9cf1a45b7d3c891623b24627eac3683feb8 (patch)
tree1fe32339ed4f1dfef8fa624509ed24afd7de9c31 /games/nethack34/Makefile
parent60a4fce3d8ba33e97b032fd9b29b944c60894380 (diff)
downloadfreebsd-ports-gnome-a5b8f9cf1a45b7d3c891623b24627eac3683feb8.tar.gz
freebsd-ports-gnome-a5b8f9cf1a45b7d3c891623b24627eac3683feb8.tar.zst
freebsd-ports-gnome-a5b8f9cf1a45b7d3c891623b24627eac3683feb8.zip
- Define USE_REINPLACE and use REINPLACE_CMD instead of perl.
- Make the install directory and the program name configurable. We'll change the defaults in future so one can install multiple versions of nethack at a time. - Do not mercilessly remove non-empty logfile and record on deinstallation.
Diffstat (limited to 'games/nethack34/Makefile')
-rw-r--r--games/nethack34/Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/games/nethack34/Makefile b/games/nethack34/Makefile
index 06f91c14c1d6..e8a01e21f571 100644
--- a/games/nethack34/Makefile
+++ b/games/nethack34/Makefile
@@ -16,11 +16,19 @@ MAINTAINER?= dscheidt@enteract.com
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_REINPLACE= yes
USE_GMAKE= yes
MAKE_ENV= CXX="${CXX}" GRAPHICS="${GRAPHICS}"
+PLIST_SUB= HACKNAME="${HACKNAME}" \
+ HACKDIR="${HACKDIR}" \
+ HACKDOCSDIR="${HACKDOCSDIR}"
MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+HACKNAME?= nethack
+HACKDIR?= lib/${HACKNAME}
+HACKDOCSDIR?= share/doc/${HACKNAME}
+
.if defined(WITH_GNOME_GRAPHICS)
CATEGORIES= games gnome
PKGNAMESUFFIX= -gnome
@@ -62,9 +70,11 @@ pre-everything::
.endif
post-patch:
- @${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/include/config.h
- @${PERL} -pi -e 's|<regex.h>|<gnuregex.h>|g' ${WRKSRC}/src/sounds.c
- @${PERL} -pi -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
+.for f in include/config.h sys/unix/Makefile.src sys/unix/Makefile.top
+ ${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g;s|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' ${WRKSRC}/${f}
+.endfor
+ ${REINPLACE_CMD} -e 's|<regex.h>|<gnuregex.h>|g' ${WRKSRC}/src/sounds.c
+ ${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
pre-configure:
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
@@ -72,8 +82,8 @@ pre-configure:
post-install:
@cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} manpages
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${DOCSDIR}
+ @${MKDIR} ${PREFIX}/${HACKDOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/${HACKDOCSDIR}
.endif
.include <bsd.port.mk>