diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2014-06-29 00:04:30 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2014-06-29 00:04:30 +0000 |
commit | d0c28e674e8a00a36a462875d7a200865a9ed91a (patch) | |
tree | 6ee6e73d67f6ee0ec8d7811d23c434ca85dfc18f /games | |
parent | 2716b101e42b56d00f93aeeda01b1f09014fae64 (diff) | |
download | ports-d0c28e674e8a00a36a462875d7a200865a9ed91a.tar.gz ports-d0c28e674e8a00a36a462875d7a200865a9ed91a.zip |
Notes
Diffstat (limited to 'games')
-rw-r--r-- | games/nethack32/Makefile | 16 | ||||
-rw-r--r-- | games/nethack32/files/patch-sys-unix-Makefile.doc | 14 | ||||
-rw-r--r-- | games/nethack32/files/patch-sys-unix-Makefile.top | 94 | ||||
-rw-r--r-- | games/nethack32/pkg-plist | 42 |
4 files changed, 109 insertions, 57 deletions
diff --git a/games/nethack32/Makefile b/games/nethack32/Makefile index 9f8b15e93021..0fa17dd50c28 100644 --- a/games/nethack32/Makefile +++ b/games/nethack32/Makefile @@ -24,9 +24,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?= 32 HACKNAME?= ${TRUEPORTNAME}${HACKEXT} HACKDIR?= share/${HACKNAME} @@ -36,7 +33,6 @@ DATADIR= ${PREFIX}/${HACKDIR} DOCSDIR= ${PREFIX}/share/doc/${HACKNAME} PKGDEINSTALL= ${WRKDIR}/pkg-deinstall -NO_STAGE= yes .include <bsd.port.pre.mk> .if !exists(${PREFIX}/bin/${HACKLINK}) && ${HACKNAME} != ${HACKLINK} @@ -45,7 +41,7 @@ PLIST_SUB+= HACKLINK="" PLIST_SUB+= HACKLINK="@comment " .endif -pre-configure: +post-patch: .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' \ @@ -58,6 +54,8 @@ pre-configure: -e 's|%%HACKEXT%%|${HACKEXT}|g' \ ${WRKSRC}/doc/${f} .endfor + +do-configure: @cd ${WRKSRC}/sys/unix && ${SH} setup.sh pre-install: @@ -66,12 +64,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/nethack32/files/patch-sys-unix-Makefile.doc b/games/nethack32/files/patch-sys-unix-Makefile.doc index bc8810153d3b..d1e20b0424b2 100644 --- a/games/nethack32/files/patch-sys-unix-Makefile.doc +++ b/games/nethack32/files/patch-sys-unix-Makefile.doc @@ -1,5 +1,5 @@ ---- sys/unix/Makefile.doc.orig Tue Dec 10 13:20:08 1996 -+++ sys/unix/Makefile.doc Sun Apr 11 23:08:20 2004 +--- sys/unix/Makefile.doc.orig 1996-12-10 12:20:08.000000000 -0800 ++++ sys/unix/Makefile.doc 2014-06-28 15:07:24.000000000 -0700 @@ -31,15 +31,15 @@ @@ -31,11 +31,11 @@ - -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) - -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) - -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) -+ -$(GAMEMANCREATE) $(MANDIR)/%%HACKNAME%%.$(MANEXT) -+ -$(LEVMANCREATE) $(MANDIR)/lev_comp%%HACKEXT%%.$(MANEXT) -+ -$(DGNMANCREATE) $(MANDIR)/dgn_comp%%HACKEXT%%.$(MANEXT) -+ -$(RCVRMANCREATE) $(MANDIR)/recover%%HACKEXT%%.$(MANEXT) -+ -$(DLBMANCREATE) $(MANDIR)/dlb%%HACKEXT%%.$(MANEXT) ++ -$(GAMEMANCREATE) ${DESTDIR}$(MANDIR)/%%HACKNAME%%.$(MANEXT) ++ -$(LEVMANCREATE) ${DESTDIR}$(MANDIR)/lev_comp%%HACKEXT%%.$(MANEXT) ++ -$(DGNMANCREATE) ${DESTDIR}$(MANDIR)/dgn_comp%%HACKEXT%%.$(MANEXT) ++ -$(RCVRMANCREATE) ${DESTDIR}$(MANDIR)/recover%%HACKEXT%%.$(MANEXT) ++ -$(DLBMANCREATE) ${DESTDIR}$(MANDIR)/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/nethack32/files/patch-sys-unix-Makefile.top b/games/nethack32/files/patch-sys-unix-Makefile.top index 099a2930f0cc..6c418474b7c3 100644 --- a/games/nethack32/files/patch-sys-unix-Makefile.top +++ b/games/nethack32/files/patch-sys-unix-Makefile.top @@ -1,5 +1,5 @@ ---- sys/unix/Makefile.top.orig Tue Dec 10 13:20:10 1996 -+++ sys/unix/Makefile.top Sun Apr 11 23:25:22 2004 +--- sys/unix/Makefile.top.orig 1996-12-10 12:20:10.000000000 -0800 ++++ sys/unix/Makefile.top 2014-06-28 16:26:54.000000000 -0700 @@ -14,16 +14,16 @@ # MAKE = make @@ -28,12 +28,12 @@ # instructions) -GAMEDIR = /usr/games/lib/$(GAME)dir -SHELLDIR = /usr/games -+GAMEDIR = %%HACKDIR%% ++GAMEDIR = ${PREFIX}/share/%%HACKNAME%% +SHELLDIR = ${PREFIX}/bin # per discussion in Install.X11 -VARDATND = -+# VARDATND = ++# VARDATND = # VARDATND = x11tiles pet_mark.xbm -# VARDATND = x11tiles pet_mark.xbm rip.xpm +VARDATND = x11tiles pet_mark.xbm rip.xpm @@ -58,47 +58,87 @@ dofiles: target=`sed -n \ -@@ -135,16 +137,18 @@ +@@ -135,66 +137,45 @@ -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) -@@ -164,7 +168,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 -@@ -180,10 +184,10 @@ + # (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 $(GAMEDIR)/bones* $(GAMEDIR)/?lock* $(GAMEDIR)/wizard* +- -touch -c $(GAMEDIR)/save/* +- touch $(GAMEDIR)/perm $(GAMEDIR)/record ++ -touch -c ${DESTDIR}$(GAMEDIR)/bones* ${DESTDIR}$(GAMEDIR)/?lock* ${DESTDIR}$(GAMEDIR)/wizard* ++ touch ${DESTDIR}$(GAMEDIR)/perm ${DESTDIR}$(GAMEDIR)/record # and a reminder @echo You may also want to install the man pages via the doc Makefile. -install: $(GAME) $(VARDAT) dungeon spec_levs +install: $(GAME) recover $(VARDAT) dungeon spec_levs # set up the directories - -mkdir $(SHELLDIR) +- -mkdir $(SHELLDIR) - -rm -rf $(GAMEDIR) -+ -rmdir $(GAMEDIR) - -mkdir $(GAMEDIR) $(GAMEDIR)/save - -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(GAMEDIR)/save - $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(GAMEDIR)/save +- -mkdir $(GAMEDIR) $(GAMEDIR)/save +- -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(GAMEDIR)/save +- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(GAMEDIR)/save +- chmod $(DIRPERM) $(GAMEDIR) $(GAMEDIR)/save ++ -mkdir ${DESTDIR}$(SHELLDIR) ++ -rmdir ${DESTDIR}$(GAMEDIR) ++ -mkdir ${DESTDIR}$(GAMEDIR) ${DESTDIR}$(GAMEDIR) + # set up the game files + ( $(MAKE) dofiles ) + # set up some additional files +- touch $(GAMEDIR)/perm $(GAMEDIR)/record $(GAMEDIR)/logfile +- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ +- $(CHGRP) $(GAMEGRP) perm record logfile ; \ +- chmod $(FILEPERM) perm record logfile ) ++ touch ${DESTDIR}$(GAMEDIR)/perm ${DESTDIR}$(GAMEDIR)/record ${DESTDIR}$(GAMEDIR)/logfile + # and a reminder + @echo You may also want to reinstall the man pages via the doc Makefile. + diff --git a/games/nethack32/pkg-plist b/games/nethack32/pkg-plist index 15025aac704f..a88fa11059c4 100644 --- a/games/nethack32/pkg-plist +++ b/games/nethack32/pkg-plist @@ -1,15 +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 -%%DATADIR%%/pet_mark.xbm -%%DATADIR%%/rip.xpm -%%DATADIR%%/x11tiles +@mode %%DATADIR%%/A-filla.lev %%DATADIR%%/A-fillb.lev %%DATADIR%%/A-goal.lev @@ -93,6 +89,9 @@ bin/%%HACKNAME%% %%DATADIR%%/juiblex.lev %%DATADIR%%/knox.lev %%DATADIR%%/license +@mode 664 +%%DATADIR%%/logfile +@mode %%DATADIR%%/medusa-1.lev %%DATADIR%%/medusa-2.lev %%DATADIR%%/minefill.lev @@ -105,8 +104,15 @@ bin/%%HACKNAME%% %%DATADIR%%/oracle.lev %%DATADIR%%/oracles %%DATADIR%%/orcus.lev +%%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 %%DATADIR%%/tower1.lev @@ -118,12 +124,20 @@ bin/%%HACKNAME%% %%DATADIR%%/wizard2.lev %%DATADIR%%/wizard3.lev %%DATADIR%%/wizhelp -@mode 664 +%%DATADIR%%/x11tiles %%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%% |