aboutsummaryrefslogtreecommitdiff
path: root/games/nethack34
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2002-08-12 21:20:29 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2002-08-12 21:20:29 +0000
commit556ffa2aa9da82df1020f29b85bcb6fdf44940c6 (patch)
treefd3812ee0168e8d56fbb54f4376e670e2d6d11dc /games/nethack34
parentadeb2b50d815ad47390bbceab84d86c5df36d8f9 (diff)
downloadports-556ffa2aa9da82df1020f29b85bcb6fdf44940c6.tar.gz
ports-556ffa2aa9da82df1020f29b85bcb6fdf44940c6.zip
Notes
Diffstat (limited to 'games/nethack34')
-rw-r--r--games/nethack34/Makefile20
-rw-r--r--games/nethack34/files/patch-aa6
-rw-r--r--games/nethack34/files/patch-ad11
-rw-r--r--games/nethack34/files/patch-ae9
-rw-r--r--games/nethack34/pkg-plist288
5 files changed, 178 insertions, 156 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>
diff --git a/games/nethack34/files/patch-aa b/games/nethack34/files/patch-aa
index 02d7fda4f77f..d045f10d2789 100644
--- a/games/nethack34/files/patch-aa
+++ b/games/nethack34/files/patch-aa
@@ -1,5 +1,5 @@
---- include/config.h.orig Fri Mar 22 20:22:26 2002
-+++ include/config.h Fri Mar 22 20:28:13 2002
+--- include/config.h.orig Thu Mar 21 08:42:43 2002
++++ include/config.h Tue Aug 13 05:41:47 2002
@@ -122,7 +122,7 @@
* would allow:
* xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
@@ -30,7 +30,7 @@
# define HACKDIR "nethackdir" /* nethack directory */
# else
-# define HACKDIR "/usr/games/lib/nethackdir"
-+# define HACKDIR "%%PREFIX%%/lib/nethack"
++# define HACKDIR "%%HACKDIR%%"
# endif
# endif
diff --git a/games/nethack34/files/patch-ad b/games/nethack34/files/patch-ad
index aed85203e4f2..306b844ff437 100644
--- a/games/nethack34/files/patch-ad
+++ b/games/nethack34/files/patch-ad
@@ -1,5 +1,5 @@
--- sys/unix/Makefile.src.orig Thu Mar 21 08:43:54 2002
-+++ sys/unix/Makefile.src Sat Mar 23 04:08:06 2002
++++ sys/unix/Makefile.src Tue Aug 13 05:44:28 2002
@@ -139,19 +139,28 @@
# directories. The ones given below is the usual spot for linux systems.
# The paths are for glibconfig.h and gnomesupport.h respectively.
@@ -99,6 +99,15 @@
# any other strange libraries your system needs (for Sysunix only -- the more
# specialized targets should already be right)
+@@ -274,7 +311,7 @@
+ LIBS =
+
+ # make NetHack
+-GAME = nethack
++GAME = %%HACKNAME%%
+ # GAME = nethack.prg
+
+ # if you defined RANDOM in unixconf.h/tosconf.h since your system did not come
@@ -450,13 +487,13 @@
# Qt windowport meta-object-compiler output
diff --git a/games/nethack34/files/patch-ae b/games/nethack34/files/patch-ae
index 42d88c741d3f..7c37cb83b952 100644
--- a/games/nethack34/files/patch-ae
+++ b/games/nethack34/files/patch-ae
@@ -1,11 +1,12 @@
---- sys/unix/Makefile.top.orig Tue Jul 4 09:42:05 2000
-+++ sys/unix/Makefile.top Tue Oct 9 22:21:45 2001
+--- sys/unix/Makefile.top.orig Thu Mar 21 08:43:54 2002
++++ sys/unix/Makefile.top Tue Aug 13 05:45:03 2002
@@ -14,18 +14,17 @@
# MAKE = make
# make NetHack
-PREFIX = /usr
- GAME = nethack
+-GAME = nethack
++GAME = %%HACKNAME%%
# GAME = nethack.prg
GAMEUID = games
-GAMEGRP = bin
@@ -28,7 +29,7 @@
# (if there is, you'll have to do the installation by hand or modify the
# instructions)
-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir
-+GAMEDIR = $(PREFIX)/lib/$(GAME)
++GAMEDIR = %%HACKDIR%%
VARDIR = $(GAMEDIR)
-SHELLDIR = $(PREFIX)/games
+SHELLDIR = $(PREFIX)/bin
diff --git a/games/nethack34/pkg-plist b/games/nethack34/pkg-plist
index 59380fdc1278..9ec9339de199 100644
--- a/games/nethack34/pkg-plist
+++ b/games/nethack34/pkg-plist
@@ -1,145 +1,147 @@
-bin/nethack
-lib/nethack/nethack
-@exec mkdir %D/lib/nethack/save
-@exec chmod -R 775 %D/lib/nethack
-@exec chmod 2755 %D/lib/nethack/nethack
-@exec chown games:games %D/lib/nethack/save
-@unexec rm -rf %D/lib/nethack/save
-lib/nethack/Arc-fila.lev
-lib/nethack/Arc-filb.lev
-lib/nethack/Arc-goal.lev
-lib/nethack/Arc-loca.lev
-lib/nethack/Arc-strt.lev
-lib/nethack/Bar-fila.lev
-lib/nethack/Bar-filb.lev
-lib/nethack/Bar-goal.lev
-lib/nethack/Bar-loca.lev
-lib/nethack/Bar-strt.lev
-lib/nethack/Cav-fila.lev
-lib/nethack/Cav-filb.lev
-lib/nethack/Cav-goal.lev
-lib/nethack/Cav-loca.lev
-lib/nethack/Cav-strt.lev
-lib/nethack/Hea-fila.lev
-lib/nethack/Hea-filb.lev
-lib/nethack/Hea-goal.lev
-lib/nethack/Hea-loca.lev
-lib/nethack/Hea-strt.lev
-lib/nethack/Kni-fila.lev
-lib/nethack/Kni-filb.lev
-lib/nethack/Kni-goal.lev
-lib/nethack/Kni-loca.lev
-lib/nethack/Kni-strt.lev
-lib/nethack/Mon-fila.lev
-lib/nethack/Mon-filb.lev
-lib/nethack/Mon-goal.lev
-lib/nethack/Mon-loca.lev
-lib/nethack/Mon-strt.lev
-lib/nethack/Pri-fila.lev
-lib/nethack/Pri-filb.lev
-lib/nethack/Pri-goal.lev
-lib/nethack/Pri-loca.lev
-lib/nethack/Pri-strt.lev
-lib/nethack/Ran-fila.lev
-lib/nethack/Ran-filb.lev
-lib/nethack/Ran-goal.lev
-lib/nethack/Ran-loca.lev
-lib/nethack/Ran-strt.lev
-lib/nethack/Rog-fila.lev
-lib/nethack/Rog-filb.lev
-lib/nethack/Rog-goal.lev
-lib/nethack/Rog-loca.lev
-lib/nethack/Rog-strt.lev
-lib/nethack/Sam-fila.lev
-lib/nethack/Sam-filb.lev
-lib/nethack/Sam-goal.lev
-lib/nethack/Sam-loca.lev
-lib/nethack/Sam-strt.lev
-lib/nethack/Tou-fila.lev
-lib/nethack/Tou-filb.lev
-lib/nethack/Tou-goal.lev
-lib/nethack/Tou-loca.lev
-lib/nethack/Tou-strt.lev
-lib/nethack/Val-fila.lev
-lib/nethack/Val-filb.lev
-lib/nethack/Val-goal.lev
-lib/nethack/Val-loca.lev
-lib/nethack/Val-strt.lev
-lib/nethack/Wiz-fila.lev
-lib/nethack/Wiz-filb.lev
-lib/nethack/Wiz-goal.lev
-lib/nethack/Wiz-loca.lev
-lib/nethack/Wiz-strt.lev
-lib/nethack/air.lev
-lib/nethack/asmodeus.lev
-lib/nethack/astral.lev
-lib/nethack/baalz.lev
-lib/nethack/bigrm-1.lev
-lib/nethack/bigrm-2.lev
-lib/nethack/bigrm-3.lev
-lib/nethack/bigrm-4.lev
-lib/nethack/bigrm-5.lev
-lib/nethack/castle.lev
-lib/nethack/cmdhelp
-lib/nethack/data
-lib/nethack/dungeon
-lib/nethack/earth.lev
-lib/nethack/fakewiz1.lev
-lib/nethack/fakewiz2.lev
-lib/nethack/fire.lev
-lib/nethack/help
-lib/nethack/hh
-lib/nethack/history
-lib/nethack/juiblex.lev
-lib/nethack/knox.lev
-lib/nethack/license
-lib/nethack/mapbg.xpm
-lib/nethack/medusa-1.lev
-lib/nethack/medusa-2.lev
-lib/nethack/minefill.lev
-lib/nethack/minend-1.lev
-lib/nethack/minend-2.lev
-lib/nethack/minend-3.lev
-lib/nethack/minetn-1.lev
-lib/nethack/minetn-2.lev
-lib/nethack/minetn-3.lev
-lib/nethack/minetn-4.lev
-lib/nethack/minetn-5.lev
-lib/nethack/minetn-6.lev
-lib/nethack/minetn-7.lev
-lib/nethack/opthelp
-lib/nethack/options
-lib/nethack/oracle.lev
-lib/nethack/oracles
-lib/nethack/orcus.lev
-lib/nethack/pet_mark.xbm
-lib/nethack/quest.dat
-lib/nethack/rip.xpm
-lib/nethack/rumors
-lib/nethack/sanctum.lev
-lib/nethack/soko1-1.lev
-lib/nethack/soko1-2.lev
-lib/nethack/soko2-1.lev
-lib/nethack/soko2-2.lev
-lib/nethack/soko3-1.lev
-lib/nethack/soko3-2.lev
-lib/nethack/soko4-1.lev
-lib/nethack/soko4-2.lev
-lib/nethack/tower1.lev
-lib/nethack/tower2.lev
-lib/nethack/tower3.lev
-lib/nethack/valley.lev
-lib/nethack/water.lev
-lib/nethack/wizard1.lev
-lib/nethack/wizard2.lev
-lib/nethack/wizard3.lev
-lib/nethack/wizhelp
-lib/nethack/x11tiles
+bin/%%HACKNAME%%
+%%HACKDIR%%/%%HACKNAME%%
+@exec mkdir %D/%%HACKDIR%%/save
+@exec chmod -R 775 %D/%%HACKDIR%%
+@exec chmod 2755 %D/%%HACKDIR%%/%%HACKNAME%%
+@exec chown games:games %D/%%HACKDIR%%/save
+@unexec rmdir %D/%%HACKDIR%%/save 2>/dev/null || true
+%%HACKDIR%%/Arc-fila.lev
+%%HACKDIR%%/Arc-filb.lev
+%%HACKDIR%%/Arc-goal.lev
+%%HACKDIR%%/Arc-loca.lev
+%%HACKDIR%%/Arc-strt.lev
+%%HACKDIR%%/Bar-fila.lev
+%%HACKDIR%%/Bar-filb.lev
+%%HACKDIR%%/Bar-goal.lev
+%%HACKDIR%%/Bar-loca.lev
+%%HACKDIR%%/Bar-strt.lev
+%%HACKDIR%%/Cav-fila.lev
+%%HACKDIR%%/Cav-filb.lev
+%%HACKDIR%%/Cav-goal.lev
+%%HACKDIR%%/Cav-loca.lev
+%%HACKDIR%%/Cav-strt.lev
+%%HACKDIR%%/Hea-fila.lev
+%%HACKDIR%%/Hea-filb.lev
+%%HACKDIR%%/Hea-goal.lev
+%%HACKDIR%%/Hea-loca.lev
+%%HACKDIR%%/Hea-strt.lev
+%%HACKDIR%%/Kni-fila.lev
+%%HACKDIR%%/Kni-filb.lev
+%%HACKDIR%%/Kni-goal.lev
+%%HACKDIR%%/Kni-loca.lev
+%%HACKDIR%%/Kni-strt.lev
+%%HACKDIR%%/Mon-fila.lev
+%%HACKDIR%%/Mon-filb.lev
+%%HACKDIR%%/Mon-goal.lev
+%%HACKDIR%%/Mon-loca.lev
+%%HACKDIR%%/Mon-strt.lev
+%%HACKDIR%%/Pri-fila.lev
+%%HACKDIR%%/Pri-filb.lev
+%%HACKDIR%%/Pri-goal.lev
+%%HACKDIR%%/Pri-loca.lev
+%%HACKDIR%%/Pri-strt.lev
+%%HACKDIR%%/Ran-fila.lev
+%%HACKDIR%%/Ran-filb.lev
+%%HACKDIR%%/Ran-goal.lev
+%%HACKDIR%%/Ran-loca.lev
+%%HACKDIR%%/Ran-strt.lev
+%%HACKDIR%%/Rog-fila.lev
+%%HACKDIR%%/Rog-filb.lev
+%%HACKDIR%%/Rog-goal.lev
+%%HACKDIR%%/Rog-loca.lev
+%%HACKDIR%%/Rog-strt.lev
+%%HACKDIR%%/Sam-fila.lev
+%%HACKDIR%%/Sam-filb.lev
+%%HACKDIR%%/Sam-goal.lev
+%%HACKDIR%%/Sam-loca.lev
+%%HACKDIR%%/Sam-strt.lev
+%%HACKDIR%%/Tou-fila.lev
+%%HACKDIR%%/Tou-filb.lev
+%%HACKDIR%%/Tou-goal.lev
+%%HACKDIR%%/Tou-loca.lev
+%%HACKDIR%%/Tou-strt.lev
+%%HACKDIR%%/Val-fila.lev
+%%HACKDIR%%/Val-filb.lev
+%%HACKDIR%%/Val-goal.lev
+%%HACKDIR%%/Val-loca.lev
+%%HACKDIR%%/Val-strt.lev
+%%HACKDIR%%/Wiz-fila.lev
+%%HACKDIR%%/Wiz-filb.lev
+%%HACKDIR%%/Wiz-goal.lev
+%%HACKDIR%%/Wiz-loca.lev
+%%HACKDIR%%/Wiz-strt.lev
+%%HACKDIR%%/air.lev
+%%HACKDIR%%/asmodeus.lev
+%%HACKDIR%%/astral.lev
+%%HACKDIR%%/baalz.lev
+%%HACKDIR%%/bigrm-1.lev
+%%HACKDIR%%/bigrm-2.lev
+%%HACKDIR%%/bigrm-3.lev
+%%HACKDIR%%/bigrm-4.lev
+%%HACKDIR%%/bigrm-5.lev
+%%HACKDIR%%/castle.lev
+%%HACKDIR%%/cmdhelp
+%%HACKDIR%%/data
+%%HACKDIR%%/dungeon
+%%HACKDIR%%/earth.lev
+%%HACKDIR%%/fakewiz1.lev
+%%HACKDIR%%/fakewiz2.lev
+%%HACKDIR%%/fire.lev
+%%HACKDIR%%/help
+%%HACKDIR%%/hh
+%%HACKDIR%%/history
+%%HACKDIR%%/juiblex.lev
+%%HACKDIR%%/knox.lev
+%%HACKDIR%%/license
+%%HACKDIR%%/mapbg.xpm
+%%HACKDIR%%/medusa-1.lev
+%%HACKDIR%%/medusa-2.lev
+%%HACKDIR%%/minefill.lev
+%%HACKDIR%%/minend-1.lev
+%%HACKDIR%%/minend-2.lev
+%%HACKDIR%%/minend-3.lev
+%%HACKDIR%%/minetn-1.lev
+%%HACKDIR%%/minetn-2.lev
+%%HACKDIR%%/minetn-3.lev
+%%HACKDIR%%/minetn-4.lev
+%%HACKDIR%%/minetn-5.lev
+%%HACKDIR%%/minetn-6.lev
+%%HACKDIR%%/minetn-7.lev
+%%HACKDIR%%/opthelp
+%%HACKDIR%%/options
+%%HACKDIR%%/oracle.lev
+%%HACKDIR%%/oracles
+%%HACKDIR%%/orcus.lev
+%%HACKDIR%%/pet_mark.xbm
+%%HACKDIR%%/quest.dat
+%%HACKDIR%%/rip.xpm
+%%HACKDIR%%/rumors
+%%HACKDIR%%/sanctum.lev
+%%HACKDIR%%/soko1-1.lev
+%%HACKDIR%%/soko1-2.lev
+%%HACKDIR%%/soko2-1.lev
+%%HACKDIR%%/soko2-2.lev
+%%HACKDIR%%/soko3-1.lev
+%%HACKDIR%%/soko3-2.lev
+%%HACKDIR%%/soko4-1.lev
+%%HACKDIR%%/soko4-2.lev
+%%HACKDIR%%/tower1.lev
+%%HACKDIR%%/tower2.lev
+%%HACKDIR%%/tower3.lev
+%%HACKDIR%%/valley.lev
+%%HACKDIR%%/water.lev
+%%HACKDIR%%/wizard1.lev
+%%HACKDIR%%/wizard2.lev
+%%HACKDIR%%/wizard3.lev
+%%HACKDIR%%/wizhelp
+%%HACKDIR%%/x11tiles
@mode 664
-lib/nethack/logfile
-lib/nethack/record
-lib/nethack/perm
+%%HACKDIR%%/perm
@mode
-%%PORTDOCS%%share/doc/nethack/Guidebook.txt
-%%PORTDOCS%%@dirrm share/doc/nethack
-@dirrm lib/nethack
+@unexec [ -s %D/%%HACKDIR%%/logfile ] || rm -f %D/%%HACKDIR%%/logfile
+@exec touch %D/%%HACKDIR%%/logfile && chmod 664 %D/%%HACKDIR%%/logfile
+@unexec [ -s %D/%%HACKDIR%%/record ] || rm -f %D/%%HACKDIR%%/record
+@exec touch %D/%%HACKDIR%%/record && chmod 664 %D/%%HACKDIR%%/record
+@dirrm %%HACKDIR%%
+%%PORTDOCS%%%%HACKDOCSDIR%%/Guidebook.txt
+%%PORTDOCS%%@dirrm %%HACKDOCSDIR%%