aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2014-06-29 14:36:15 +0800
committerglewis <glewis@FreeBSD.org>2014-06-29 14:36:15 +0800
commitbcd1fafbf2440a7a6b0584c15577ebd984618aa5 (patch)
tree197d5887b871736df749c1d940d62db244c117ed
parenta7a48642d9813d55c1ad9c4e1f8be94b5550fa2c (diff)
downloadfreebsd-ports-gnome-bcd1fafbf2440a7a6b0584c15577ebd984618aa5.tar.gz
freebsd-ports-gnome-bcd1fafbf2440a7a6b0584c15577ebd984618aa5.tar.zst
freebsd-ports-gnome-bcd1fafbf2440a7a6b0584c15577ebd984618aa5.zip
. Support staging.
-rw-r--r--games/nethack33/Makefile22
-rw-r--r--games/nethack33/files/patch-sys-unix-Makefile.doc16
-rw-r--r--games/nethack33/files/patch-sys-unix-Makefile.top97
-rw-r--r--games/nethack33/pkg-plist38
4 files changed, 110 insertions, 63 deletions
diff --git a/games/nethack33/Makefile b/games/nethack33/Makefile
index cdc2197b3066..6ee467d5eadb 100644
--- a/games/nethack33/Makefile
+++ b/games/nethack33/Makefile
@@ -4,13 +4,13 @@
PORTNAME= nethack33
PORTVERSION= 3.3.1
PORTREVISION= 10
-CATEGORIES?= games
+CATEGORIES= games
MASTER_SITES= SF
DISTNAME= ${TRUEPORTNAME}-${PORTVERSION:S/.//g}
EXTRACT_SUFX= .tgz
MAINTAINER= glewis@FreeBSD.org
-COMMENT= Dungeon explorin', slashin', hackin' game
+COMMENT= Dungeon explorin', slashin', hackin\' game
WRKSRC= ${WRKDIR}/${TRUEPORTNAME}-${PORTVERSION}
LATEST_LINK= ${TRUEPORTNAME}33${PKGNAMESUFFIX}
@@ -22,9 +22,6 @@ PLIST_SUB= HACKNAME="${HACKNAME}" \
MAKE_JOBS_UNSAFE= yes
TRUEPORTNAME= nethack
-MAN6= dgn_comp${HACKEXT}.6 dlb${HACKEXT}.6 lev_comp${HACKEXT}.6 \
- ${HACKNAME}.6 recover${HACKEXT}.6
-
HACKEXT?= 33
HACKNAME?= ${TRUEPORTNAME}${HACKEXT}
HACKDIR?= share/${HACKNAME}
@@ -43,7 +40,6 @@ GRAPHICS= # none
.endif
.endif
-NO_STAGE= yes
.include <bsd.port.pre.mk>
OPTIONS_DEFINE= DOCS
@@ -60,7 +56,7 @@ pre-everything::
.if defined(WITH_TTY_GRAPHICS) || defined(WITHOUT_X11)
@${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@${ECHO_MSG} " You cannot install nethack and ${PKGBASE} in parallel "
- @${ECHO_MSG} " But ${PKGBASE} read your prior nethack scores "
+ @${ECHO_MSG} " But ${PKGBASE} reads your prior nethack scores "
@${ECHO_MSG} " Don't forget to backup your nethack libdir if it's "
@${ECHO_MSG} " important for you "
@${ECHO_MSG} "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@@ -79,8 +75,6 @@ post-patch:
's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/include/config.h
@${REINPLACE_CMD} -e \
's|<malloc.h>|<stdlib.h>|g' ${WRKSRC}/win/Qt/qt_win.cpp
-
-pre-configure:
.for f in include/config.h sys/unix/Makefile.top sys/unix/Makefile.doc
@${REINPLACE_CMD} -e 's|%%HACKNAME%%|${HACKNAME}|g' \
-e 's|%%HACKDIR%%|${PREFIX}/${HACKDIR}|g' \
@@ -93,6 +87,8 @@ pre-configure:
-e 's|%%HACKEXT%%|${HACKEXT}|g' \
${WRKSRC}/doc/${f}
.endfor
+
+do-configure:
@cd ${WRKSRC}/sys/unix; ${SH} setup.sh
pre-install:
@@ -101,12 +97,12 @@ pre-install:
post-install:
.if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK}
- @${LN} -s -f ${PREFIX}/bin/${HACKNAME} ${PREFIX}/bin/${HACKLINK}
+ @${LN} -s -f ${PREFIX}/bin/${HACKNAME} ${STAGEDIR}${PREFIX}/bin/${HACKLINK}
.endif
- @cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} manpages
+ @cd ${WRKSRC}/doc; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages
.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/Guidebook.txt ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.post.mk>
diff --git a/games/nethack33/files/patch-sys-unix-Makefile.doc b/games/nethack33/files/patch-sys-unix-Makefile.doc
index 5f73341ce0b2..f1064c2f1a74 100644
--- a/games/nethack33/files/patch-sys-unix-Makefile.doc
+++ b/games/nethack33/files/patch-sys-unix-Makefile.doc
@@ -1,7 +1,5 @@
-$FreeBSD$
-
---- sys/unix/Makefile.doc.orig Fri Jan 14 13:49:48 2000
-+++ sys/unix/Makefile.doc Mon Apr 19 14:29:46 2004
+--- sys/unix/Makefile.doc.orig 2000-01-14 12:49:48.000000000 -0800
++++ sys/unix/Makefile.doc 2014-06-28 23:11:38.000000000 -0700
@@ -34,15 +34,15 @@
@@ -33,11 +31,11 @@ $FreeBSD$
- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
-+ -$(GAMEMANCREATE) $(MANDIR)$(MANEXT)/%%HACKNAME%%.$(MANEXT)
-+ -$(LEVMANCREATE) $(MANDIR)$(MANEXT)/lev_comp%%HACKEXT%%.$(MANEXT)
-+ -$(DGNMANCREATE) $(MANDIR)$(MANEXT)/dgn_comp%%HACKEXT%%.$(MANEXT)
-+ -$(RCVRMANCREATE) $(MANDIR)$(MANEXT)/recover%%HACKEXT%%.$(MANEXT)
-+ -$(DLBMANCREATE) $(MANDIR)$(MANEXT)/dlb%%HACKEXT%%.$(MANEXT)
++ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/%%HACKNAME%%.$(MANEXT)
++ -$(LEVMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/lev_comp%%HACKEXT%%.$(MANEXT)
++ -$(DGNMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dgn_comp%%HACKEXT%%.$(MANEXT)
++ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/recover%%HACKEXT%%.$(MANEXT)
++ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)$(MANEXT)/dlb%%HACKEXT%%.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
diff --git a/games/nethack33/files/patch-sys-unix-Makefile.top b/games/nethack33/files/patch-sys-unix-Makefile.top
index 08997a245f91..d75af50d783b 100644
--- a/games/nethack33/files/patch-sys-unix-Makefile.top
+++ b/games/nethack33/files/patch-sys-unix-Makefile.top
@@ -1,7 +1,5 @@
-$FreeBSD$
-
---- sys/unix/Makefile.top.orig Mon Jul 3 18:42:05 2000
-+++ sys/unix/Makefile.top Mon Apr 19 14:42:45 2004
+--- sys/unix/Makefile.top.orig 2000-07-03 17:42:05.000000000 -0700
++++ sys/unix/Makefile.top 2014-06-28 23:11:14.000000000 -0700
@@ -14,18 +14,17 @@
# MAKE = make
@@ -31,10 +29,10 @@ $FreeBSD$
# (if there is, you'll have to do the installation by hand or modify the
# instructions)
-GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir
-+GAMEDIR = %%HACKDIR%%
++GAMEDIR = ${PREFIX}/share/%%HACKNAME%%
VARDIR = $(GAMEDIR)
-SHELLDIR = $(PREFIX)/games
-+SHELLDIR = $(PREFIX)/bin
++SHELLDIR = ${PREFIX}/bin
# per discussion in Install.X11 and Install.Qt
-VARDATND =
@@ -69,38 +67,64 @@ $FreeBSD$
dofiles:
target=`sed -n \
-@@ -165,16 +166,18 @@
+@@ -165,68 +166,48 @@
-e '}' \
-e '$$s/.*/nodlb/p' < dat/options` ; \
$(MAKE) dofiles-$${target-nodlb}
- cp src/$(GAME) $(GAMEDIR)
-+ cp src/nethack $(GAMEDIR)/$(GAME)
-+ cp util/recover $(GAMEDIR)
- -rm -f $(SHELLDIR)/$(GAME)
+- -rm -f $(SHELLDIR)/$(GAME)
++ cp src/nethack ${DESTDIR}$(GAMEDIR)/$(GAME)
++ cp util/recover ${DESTDIR}$(GAMEDIR)
++ -rm -f ${DESTDIR}$(SHELLDIR)/$(GAME)
sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
< sys/unix/nethack.sh \
- > $(SHELLDIR)/$(GAME)
- # set up their permissions
+- > $(SHELLDIR)/$(GAME)
+-# set up their permissions
- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) ; \
- $(CHGRP) $(GAMEGRP) $(GAME) )
-+ -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \
-+ $(CHGRP) $(GAMEGRP) $(GAME) recover )
- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
-+ chmod $(GAMEPERM) $(GAMEDIR)/recover
- -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
- chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
-@@ -194,7 +197,7 @@
- $(CHGRP) $(GAMEGRP) $(DAT) ; \
- chmod $(FILEPERM) $(DAT) )
+- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME)
+- -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)
+- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)
+- chmod $(EXEPERM) $(SHELLDIR)/$(GAME)
++ > ${DESTDIR}$(SHELLDIR)/$(GAME)
+
+ dofiles-dlb: check-dlb
+- ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) )
+-# set up their permissions
+- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \
+- $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \
+- chmod $(FILEPERM) nhdat $(DATNODLB) )
++ ( cd dat ; cp nhdat $(DATNODLB) ${DESTDIR}$(GAMEDIR) )
+
+ dofiles-nodlb:
+ # copy over the game files
+- ( cd dat ; cp $(DAT) $(GAMEDIR) )
+-# set up their permissions
+- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \
+- $(CHGRP) $(GAMEGRP) $(DAT) ; \
+- chmod $(FILEPERM) $(DAT) )
++ ( cd dat ; cp $(DAT) ${DESTDIR}$(GAMEDIR) )
-update: $(GAME) $(VARDAT) dungeon spec_levs
+update: $(GAME) recover $(VARDAT) dungeon spec_levs
# (don't yank the old version out from under people who're playing it)
- -mv $(GAMEDIR)/$(GAME) $(GAMEDIR)/$(GAME).old
+- -mv $(GAMEDIR)/$(GAME) $(GAMEDIR)/$(GAME).old
++ -mv ${DESTDIR}$(GAMEDIR)/$(GAME) ${DESTDIR}$(GAMEDIR)/$(GAME).old
# quest.dat is also kept open and has the same problems over NFS
-@@ -210,11 +213,12 @@
+ # (quest.dat may be inside nhdat if dlb is in use)
+- -mv $(GAMEDIR)/quest.dat $(GAMEDIR)/quest.dat.old
+- -mv $(GAMEDIR)/nhdat $(GAMEDIR)/nhdat.old
++ -mv ${DESTDIR}$(GAMEDIR)/quest.dat ${DESTDIR}$(GAMEDIR)/quest.dat.old
++ -mv ${DESTDIR}$(GAMEDIR)/nhdat ${DESTDIR}$(GAMEDIR)/nhdat.old
+ # set up new versions of the game files
+ ( $(MAKE) dofiles )
+ # touch time-sensitive files
+- -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard*
+- -touch -c $(VARDIR)/save/*
+- touch $(VARDIR)/perm $(VARDIR)/record
++ -touch -c ${DESTDIR}$(VARDIR)/bones* ${DESTDIR}$(VARDIR)/?lock* ${DESTDIR}$(VARDIR)/wizard*
++ touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record
# and a reminder
@echo You may also want to install the man pages via the doc Makefile.
@@ -108,10 +132,25 @@ $FreeBSD$
+install: $(GAME) recover $(VARDAT) dungeon spec_levs
# set up the directories
# not all mkdirs have -p; those that don't will create a -p directory
- -mkdir -p $(SHELLDIR)
+- -mkdir -p $(SHELLDIR)
- -rm -rf $(GAMEDIR) $(VARDIR)
-+ -rmdir $(GAMEDIR)
-+ -rmdir $(VARDIR)
- -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+- -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save
++ -mkdir -p ${DESTDIR}$(SHELLDIR)
++ -rmdir ${DESTDIR}$(GAMEDIR)
++ -rmdir ${DESTDIR}$(VARDIR)
++ -mkdir -p ${DESTDIR}$(GAMEDIR) ${DESTDIR}$(VARDIR)
-rmdir ./-p
- -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+- -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save
+ # set up the game files
+ ( $(MAKE) dofiles )
+ # set up some additional files
+- touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
+- -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
+- $(CHGRP) $(GAMEGRP) perm record logfile ; \
+- chmod $(FILEPERM) perm record logfile )
++ touch ${DESTDIR}$(VARDIR)/perm ${DESTDIR}$(VARDIR)/record ${DESTDIR}$(VARDIR)/logfile
+ # and a reminder
+ @echo You may also want to reinstall the man pages via the doc Makefile.
+
diff --git a/games/nethack33/pkg-plist b/games/nethack33/pkg-plist
index 4d661be32e45..7bd358c2d657 100644
--- a/games/nethack33/pkg-plist
+++ b/games/nethack33/pkg-plist
@@ -1,12 +1,11 @@
%%HACKLINK%%bin/nethack
+@mode 555
bin/%%HACKNAME%%
+@owner games
+@group games
+@mode 02755
%%DATADIR%%/%%HACKNAME%%
-@exec mkdir %D/%%DATADIR%%/save
-@exec chmod -R 775 %D/%%DATADIR%%
-@exec chmod 2755 %D/%%DATADIR%%/%%HACKNAME%%
-@exec chown games:games %D/%%DATADIR%%/save
-@dirrmtry %%DATADIR%%/save
-%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
+@mode
%%DATADIR%%/Arc-fila.lev
%%DATADIR%%/Arc-filb.lev
%%DATADIR%%/Arc-goal.lev
@@ -94,6 +93,9 @@ bin/%%HACKNAME%%
%%DATADIR%%/history
%%DATADIR%%/juiblex.lev
%%DATADIR%%/knox.lev
+@mode 664
+%%DATADIR%%/logfile
+@mode
%%DATADIR%%/license
%%DATADIR%%/mapbg.xpm
%%DATADIR%%/medusa-1.lev
@@ -108,9 +110,15 @@ bin/%%HACKNAME%%
%%DATADIR%%/oracle.lev
%%DATADIR%%/oracles
%%DATADIR%%/orcus.lev
+%%DATADIR%%/perm
%%DATADIR%%/pet_mark.xbm
%%DATADIR%%/quest.dat
+@mode 664
+%%DATADIR%%/record
+@mode
+@mode 02755
%%DATADIR%%/recover
+@mode
%%DATADIR%%/rip.xpm
%%DATADIR%%/rumors
%%DATADIR%%/sanctum.lev
@@ -132,12 +140,18 @@ bin/%%HACKNAME%%
%%DATADIR%%/wizard3.lev
%%DATADIR%%/wizhelp
%%DATADIR%%/x11tiles
-@mode 664
-%%DATADIR%%/perm
@mode
-@unexec [ -s %D/%%DATADIR%%/logfile ] || rm -f %D/%%DATADIR%%/logfile
-@exec touch %D/%%DATADIR%%/logfile && chmod 664 %D/%%DATADIR%%/logfile
-@unexec [ -s %D/%%DATADIR%%/record ] || rm -f %D/%%DATADIR%%/record
-@exec touch %D/%%DATADIR%%/record && chmod 664 %D/%%DATADIR%%/record
+@owner
+@group
+man/man6/dgn_comp%%HACKEXT%%.6.gz
+man/man6/dlb%%HACKEXT%%.6.gz
+man/man6/lev_comp%%HACKEXT%%.6.gz
+man/man6/%%HACKNAME%%.6.gz
+man/man6/recover%%HACKEXT%%.6.gz
+%%PORTDOCS%%%%DOCSDIR%%/Guidebook.txt
+@exec mkdir %D/%%DATADIR%%/save
+@exec chown games:games %D/%%DATADIR%%/save
+@exec chmod 0775 %D/%%DATADIR%%/save
+@unexec rmdir %D/%%DATADIR%%/save
@dirrmtry %%DATADIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%