diff options
author | wiz <wiz> | 2011-06-01 11:20:29 +0000 |
---|---|---|
committer | wiz <wiz> | 2011-06-01 11:20:29 +0000 |
commit | 5d524e8420c43f9854d48e1da61e76eed3d8072e (patch) | |
tree | 7818fa37c04883655fe9407a8458e376432a8538 | |
parent | 93e0c49c9089bcf4362c31ccbb2ac316b359012c (diff) | |
download | pkgsrc-5d524e8420c43f9854d48e1da61e76eed3d8072e.tar.gz |
DESTDIRify nethack. Merge patches and distinfo. Some other improvements.
From Rhialto in PR 45010.
38 files changed, 493 insertions, 868 deletions
diff --git a/games/nethack-lib/Makefile b/games/nethack-lib/Makefile index 9dd55430aed..622aeb27c88 100644 --- a/games/nethack-lib/Makefile +++ b/games/nethack-lib/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.26 2008/09/25 14:02:09 wiz Exp $ +# $NetBSD: Makefile,v 1.27 2011/06/01 11:20:29 wiz Exp $ # .include "../../games/nethack-lib/Makefile.common" PKGNAME= nethack-lib-${NETHACK_VERSION} -PKGREVISION= 2 +PKGREVISION= 3 COMMENT= Data files for Nethack @@ -20,17 +20,20 @@ INSTALLATION_DIRS= ${PKGMANDIR}/man6 # These should eventually migrate to a better location, but keep them # here for now until we lose backward compatibility because of changes # to the fileformat. -CONF_FILES_PERMS+= /dev/null ${PREFIX}/share/${NETHACK_DIR}/record \ - ${ROOT_USER} ${NETHACK_GROUP} 664 -CONF_FILES_PERMS+= /dev/null ${PREFIX}/share/${NETHACK_DIR}/logfile \ - ${ROOT_USER} ${NETHACK_GROUP} 664 - -REQD_DIRS_PERMS+= ${PREFIX}/share/${NETHACK_DIR} \ - ${ROOT_USER} ${NETHACK_GROUP} 775 -REQD_DIRS_PERMS+= ${PREFIX}/share/${NETHACK_DIR}/save \ - ${ROOT_USER} ${NETHACK_GROUP} 770 - -CHECK_FILES_SKIP+= ${PREFIX}/share/${NETHACK_DIR}/logfile \ - ${PREFIX}/share/${NETHACK_DIR}/record +CONF_FILES_PERMS+= /dev/null ${VARDIR}/logfile \ + ${NETHACK_USER} ${NETHACK_GROUP} 664 +CONF_FILES_PERMS+= /dev/null ${VARDIR}/perm \ + ${NETHACK_USER} ${NETHACK_GROUP} 664 +CONF_FILES_PERMS+= /dev/null ${VARDIR}/record \ + ${NETHACK_USER} ${NETHACK_GROUP} 664 + +REQD_DIRS_PERMS+= ${VARDIR} \ + ${NETHACK_USER} ${NETHACK_GROUP} 775 +REQD_DIRS_PERMS+= ${VARDIR}/save \ + ${NETHACK_USER} ${NETHACK_GROUP} 770 + +CHECK_FILES_SKIP+= ${VARDIR}/logfile \ + ${VARDIR}/perm \ + ${VARDIR}/record .include "../../mk/bsd.pkg.mk" diff --git a/games/nethack-lib/Makefile.common b/games/nethack-lib/Makefile.common index 5a2f7ba57cd..59a38e96ab3 100644 --- a/games/nethack-lib/Makefile.common +++ b/games/nethack-lib/Makefile.common @@ -1,5 +1,10 @@ -# $NetBSD: Makefile.common,v 1.26 2009/08/04 13:58:57 joerg Exp $ +# $NetBSD: Makefile.common,v 1.27 2011/06/01 11:20:29 wiz Exp $ # +# used by games/nethack/Makefile +# used by games/nethack-lib/Makefile +# used by games/nethack-x11/Makefile +# used by games/nethack-tty/Makefile +# used by games/nethack-qt/Makefile NETHACK_BASEVER= 3.4.3 NETHACK_VERSION= ${NETHACK_BASEVER} @@ -13,15 +18,17 @@ EXTRACT_SUFX= .tgz MAINTAINER= pooka@NetBSD.org HOMEPAGE= http://www.nethack.org/ +LICENSE= nethack-license MAKE_JOBS_SAFE= no +PKG_DESTDIR_SUPPORT= user-destdir .if !defined(META_PACKAGE) WRKSRC= ${WRKDIR}/nethack-${NETHACK_BASEVER} HAS_CONFIGURE= yes CONFIGURE_SCRIPT= ./sys/unix/setup.sh -USE_TOOLS+= gzip yacc lex +USE_TOOLS+= gzip yacc lex awk .include "../../mk/bsd.prefs.mk" @@ -40,20 +47,28 @@ NETHACK_OS= SYSV NETHACK_OS?= BSD SUBST_CLASSES+= os -SUBST_MESSAGE.os= Configuring for $(NETHACK_OS) +SUBST_MESSAGE.os= Configuring for ${NETHACK_OS} SUBST_STAGE.os= post-patch SUBST_FILES.os= include/unixconf.h SUBST_SED.os= -e 's,__NETHACK_OS__,${NETHACK_OS},' -NETHACK_GROUP= games -PKG_GROUPS= ${NETHACK_GROUP} +USE_GAMESGROUP= yes +NETHACK_USER= ${GAMES_USER} +NETHACK_GROUP= ${GAMES_GROUP} +BUILD_DEFS+= GAMES_USER GAMES_GROUP +GAMEPERM= ${NETHACK_USER} ${NETHACK_GROUP} 2555 + +GAMEDIR= ${PREFIX}/share/${NETHACK_DIR} +VARDIR= /var/games/nethack340 +MAKE_ENV+= GAMEDIR=${GAMEDIR:Q} +MAKE_ENV+= VARDIR=${VARDIR:Q} pre-configure: @${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh post-patch: @${MV} ${WRKSRC}/include/config.h ${WRKSRC}/config.h-pre - @${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' \ + @${SED} -e 's|@PREFIX@|${PREFIX}|g' \ -e 's|@GZIP_PROGRAM@|'`${ECHO} ${GZIP_CMD} \ | ${AWK} '{ print $$1 }'`'|g' \ < ${WRKSRC}/config.h-pre > ${WRKSRC}/include/config.h diff --git a/games/nethack-lib/PLIST b/games/nethack-lib/PLIST index f99e7b446b0..4a84728ac6f 100644 --- a/games/nethack-lib/PLIST +++ b/games/nethack-lib/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.7 2009/06/14 17:56:52 joerg Exp $ +@comment $NetBSD: PLIST,v 1.8 2011/06/01 11:20:29 wiz Exp $ bin/nethack bin/recover man/man6/dgn_comp.6 @@ -113,7 +113,6 @@ share/nethackdir340/options share/nethackdir340/oracle.lev share/nethackdir340/oracles share/nethackdir340/orcus.lev -share/nethackdir340/perm share/nethackdir340/pet_mark.xbm share/nethackdir340/quest.dat share/nethackdir340/rip.xpm diff --git a/games/nethack-lib/distinfo b/games/nethack-lib/distinfo index 65ffa09729d..fd1f97b2eb2 100644 --- a/games/nethack-lib/distinfo +++ b/games/nethack-lib/distinfo @@ -1,12 +1,15 @@ -$NetBSD: distinfo,v 1.16 2008/05/20 19:47:16 tnn Exp $ +$NetBSD: distinfo,v 1.17 2011/06/01 11:20:29 wiz Exp $ SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95 Size (nethack-343-src.tgz) = 3497458 bytes -SHA1 (patch-aa) = ed5c55651acf81c459867c99026e13a6c5ed34a0 -SHA1 (patch-ab) = 73a1ac287ded70f371bb38c82cdbcd36182ce3a5 -SHA1 (patch-ac) = e447b4c60ef7db7cfcd35a9be8b8d2f86fc0c27b -SHA1 (patch-ad) = 05bb391eb0e4382c906251bc8b8627124873a7a0 -SHA1 (patch-ae) = ff98bb6b76795b7ae69c3602f70a1a597c28633c -SHA1 (patch-af) = e4723716f326df242279953b6091e528eb7e0007 -SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674 +SHA1 (patch-aa) = 31d89b27e52189de9a51fbb04f1ed390c5377b2b +SHA1 (patch-ab) = 49947b960f2b7871fc798398d1c1ceab8d462ec9 +SHA1 (patch-ac) = 50cac811281c629edf2a72e523b62b51f8c3c840 +SHA1 (patch-ad) = be56ef8459f3273a0b316bb94e0ae7397a53c37f +SHA1 (patch-ae) = 8530c1e033f2522e05b699db36d84f77ecf886be +SHA1 (patch-af) = a567c4c664f135ad24f3f0069ddc29bf5b950b21 +SHA1 (patch-ag) = 5bf322fb92a3cd9df9559e56265f0477d9e92487 +SHA1 (patch-ai) = 73c5b2ea1227531089474705f2f18bc411366365 +SHA1 (patch-sys_unix_Makefile.src) = 003f16fba997ac61efc92adecc13b883135a86bc +SHA1 (patch-sys_unix_Makefile.utl) = 409e1f8b58c7e2709d224f42c19fdfd162d9cea7 diff --git a/games/nethack-lib/patches/patch-aa b/games/nethack-lib/patches/patch-aa index da8d8abf4a1..782f697f093 100644 --- a/games/nethack-lib/patches/patch-aa +++ b/games/nethack-lib/patches/patch-aa @@ -1,8 +1,45 @@ -$NetBSD: patch-aa,v 1.9 2004/03/05 15:21:01 pooka Exp $ +$NetBSD: patch-aa,v 1.10 2011/06/01 11:20:29 wiz Exp $ ---- include/config.h.old 2004-03-05 15:39:59.000000000 +0200 -+++ include/config.h 2004-03-05 15:40:05.000000000 +0200 -@@ -169,11 +169,11 @@ +Make configurable. + +--- include/config.h.orig 2003-12-07 23:39:13.000000000 +0000 ++++ include/config.h +@@ -42,6 +42,16 @@ + * Define all of those you want supported in your binary. + * Some combinations make no sense. See the installation document. + */ ++#if defined(GTYPE_TTY) ++# define DEFAULT_WINDOW_SYS "tty" ++#elif defined(GTYPE_X11) ++# define X11_GRAPHICS ++# define DEFAULT_WINDOW_SYS "x11" ++#elif defined(GTYPE_QT) ++# define QT_GRAPHICS ++# define DEFAULT_WINDOW_SYS "Qt" ++#endif ++ + #define TTY_GRAPHICS /* good old tty based graphics */ + /* #define X11_GRAPHICS */ /* X11 interface */ + /* #define QT_GRAPHICS */ /* Qt interface */ +@@ -86,7 +96,7 @@ + # define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */ + # define USER_SOUNDS /* Use sounds */ + # ifndef __APPLE__ +-# define USER_SOUNDS_REGEX ++/*# define USER_SOUNDS_REGEX */ + # endif + # define USE_XPM /* Use XPM format for images (required) */ + # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ +@@ -126,7 +136,7 @@ + * would allow: + * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm + */ +-/* # define USE_XPM */ /* Disable if you do not have the XPM library */ ++# define USE_XPM /* Disable if you do not have the XPM library */ + # ifdef USE_XPM + # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ + # endif +@@ -169,11 +179,11 @@ #ifdef UNIX /* path and file name extension for compression program */ @@ -18,16 +55,16 @@ $NetBSD: patch-aa,v 1.9 2004/03/05 15:21:01 pooka Exp $ #endif #ifndef COMPRESS -@@ -204,7 +204,7 @@ +@@ -204,7 +214,7 @@ * otherwise it will be the current directory. */ # ifndef HACKDIR -# define HACKDIR "/usr/games/lib/nethackdir" -+# define HACKDIR "XXXPREFIXXXX/share/nethackdir340" ++# define HACKDIR "@PREFIX@/share/nethackdir340" # endif /* -@@ -300,7 +300,7 @@ +@@ -300,7 +310,7 @@ typedef unsigned char uchar; * functions that have been macroized. */ diff --git a/games/nethack-lib/patches/patch-ab b/games/nethack-lib/patches/patch-ab index c2aa0916c81..39e76428a1c 100644 --- a/games/nethack-lib/patches/patch-ab +++ b/games/nethack-lib/patches/patch-ab @@ -1,8 +1,10 @@ -$NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ +$NetBSD: patch-ab,v 1.12 2011/06/01 11:20:29 wiz Exp $ ---- sys/unix/Makefile.top.orig 2003-12-08 01:39:13.000000000 +0200 -+++ sys/unix/Makefile.top 2004-03-05 15:40:57.000000000 +0200 -@@ -14,18 +14,17 @@ +Make configurable. + +--- sys/unix/Makefile.top.orig 2003-12-07 23:39:13.000000000 +0000 ++++ sys/unix/Makefile.top +@@ -14,18 +14,18 @@ # MAKE = make # make NetHack @@ -17,23 +19,24 @@ $NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ # Permissions - some places use setgid instead of setuid, for instance # See also the option "SECURE" in include/config.h -GAMEPERM = 04755 --FILEPERM = 0644 +GAMEPERM = 2755 -+FILEPERM = 0664 + FILEPERM = 0644 ++VARFILEPERM = 0664 EXEPERM = 0755 -DIRPERM = 0755 +DIRPERM = 0775 # GAMEDIR also appears in config.h as "HACKDIR". # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR -@@ -35,12 +34,12 @@ +@@ -35,12 +35,12 @@ DIRPERM = 0755 # therefore there should not be anything in GAMEDIR that you want to keep # (if there is, you'll have to do the installation by hand or modify the # instructions) -GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir -+GAMEDIR = $(PREFIX)/share/$(GAME)dir340 - VARDIR = $(GAMEDIR) +-VARDIR = $(GAMEDIR) -SHELLDIR = $(PREFIX)/games ++GAMEDIR ?= $(PREFIX)/share/$(GAME)dir340 ++VARDIR ?= /var/games/nethack340 +SHELLDIR = $(PREFIX)/bin # per discussion in Install.X11 and Install.Qt @@ -42,7 +45,18 @@ $NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ # VARDATND = x11tiles NetHack.ad pet_mark.xbm # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm # for Atari/Gem -@@ -87,9 +86,12 @@ +@@ -64,8 +64,8 @@ VARDAT = $(VARDATD) $(VARDATND) + # other permission-related reasons. If that happens, you may want to set the + # command to "true", which is a no-op. Note that disabling chown or chgrp + # will only work if setuid (or setgid) behavior is not desired or required. +-CHOWN = chown +-CHGRP = chgrp ++CHOWN = : # chown ++CHGRP = : # chgrp + + # + # end of configuration +@@ -87,9 +87,12 @@ DAT = $(DATNODLB) $(DATDLB) $(GAME): ( cd src ; $(MAKE) ) @@ -56,29 +70,127 @@ $NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ # Note: many of the dependencies below are here to allow parallel make # to generate valid output -@@ -183,18 +185,15 @@ +@@ -99,20 +102,20 @@ Guidebook: + manpages: + ( cd doc ; $(MAKE) manpages ) + +-data: $(GAME) ++data: # $(GAME) + ( cd dat ; $(MAKE) data ) + +-rumors: $(GAME) ++rumors: # $(GAME) + ( cd dat ; $(MAKE) rumors ) + +-oracles: $(GAME) ++oracles: # $(GAME) + ( cd dat ; $(MAKE) oracles ) + + # Note: options should have already been made with make, but... +-options: $(GAME) ++options: # $(GAME) + ( cd dat ; $(MAKE) options ) + +-quest.dat: $(GAME) ++quest.dat: # $(GAME) + ( cd dat ; $(MAKE) quest.dat ) + + spec_levs: dungeon +@@ -120,22 +123,22 @@ spec_levs: dungeon + ( cd dat ; $(MAKE) spec_levs ) + ( cd dat ; $(MAKE) quest_levs ) + +-dungeon: $(GAME) ++dungeon: # $(GAME) + ( cd util ; $(MAKE) dgn_comp ) + ( cd dat ; $(MAKE) dungeon ) + +-nhtiles.bmp: $(GAME) ++nhtiles.bmp: # $(GAME) + ( cd dat ; $(MAKE) nhtiles.bmp ) + +-x11tiles: $(GAME) ++x11tiles: # $(GAME) + ( cd util ; $(MAKE) tile2x11 ) + ( cd dat ; $(MAKE) x11tiles ) + +-beostiles: $(GAME) ++beostiles: # $(GAME) + ( cd util ; $(MAKE) tile2beos ) + ( cd dat ; $(MAKE) beostiles ) + +-NetHack.ad: $(GAME) ++NetHack.ad: # $(GAME) + ( cd dat ; $(MAKE) NetHack.ad ) + + pet_mark.xbm: +@@ -150,7 +153,7 @@ mapbg.xpm: + nhsplash.xpm: + ( cd dat ; $(MAKE) nhsplash.xpm ) + +-nh16.img: $(GAME) ++nh16.img: # $(GAME) + ( cd util ; $(MAKE) tile2img.ttp ) + ( cd dat ; $(MAKE) nh16.img ) + +@@ -172,7 +175,7 @@ dlb: + + # recover can be used when INSURANCE is defined in include/config.h + # and the checkpoint option is true +-recover: $(GAME) ++recover: # $(GAME) + ( cd util ; $(MAKE) recover ) + + dofiles: +@@ -183,34 +186,31 @@ dofiles: -e '}' \ -e '$$s/.*/nodlb/p' < dat/options` ; \ $(MAKE) dofiles-$${target-nodlb} - cp src/$(GAME) $(GAMEDIR) - cp util/recover $(GAMEDIR) -+ cp util/recover $(PREFIX)/bin - -rm -f $(SHELLDIR)/$(GAME) - sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ +- -rm -f $(SHELLDIR)/$(GAME) +- sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ ++ cp util/recover $(DESTDIR)$(PREFIX)/bin ++ -rm -f $(DESTDIR)$(SHELLDIR)/$(GAME) ++ sed -e 's;@GAMEDIR@;$(GAMEDIR);' \ -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ -+ -e 's;XXXPREFIXXXX;$(PREFIX);' \ ++ -e 's;@PREFIX@;$(PREFIX);' \ < sys/unix/nethack.sh \ - > $(SHELLDIR)/$(GAME) +- > $(SHELLDIR)/$(GAME) ++ > $(DESTDIR)$(SHELLDIR)/$(GAME) # set up their permissions - -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ - $(CHGRP) $(GAMEGRP) $(GAME) recover ) - chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) - chmod $(EXEPERM) $(GAMEDIR)/recover -+ chmod $(EXEPERM) $(PREFIX)/bin/recover - -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) - $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) - chmod $(EXEPERM) $(SHELLDIR)/$(GAME) -@@ -230,16 +229,16 @@ +- -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) +- $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) +- chmod $(EXEPERM) $(SHELLDIR)/$(GAME) ++ chmod $(EXEPERM) $(DESTDIR)$(PREFIX)/bin/recover ++ -$(CHOWN) $(GAMEUID) $(DESTDIR)$(SHELLDIR)/$(GAME) ++ $(CHGRP) $(GAMEGRP) $(DESTDIR)$(SHELLDIR)/$(GAME) ++ chmod $(EXEPERM) $(DESTDIR)$(SHELLDIR)/$(GAME) + + dofiles-dlb: check-dlb +- ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) ) ++ ( cd dat ; cp nhdat $(DATNODLB) $(DESTDIR)$(GAMEDIR) ) + # set up their permissions +- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ ++ -( cd $(DESTDIR)$(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ + $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \ + chmod $(FILEPERM) nhdat $(DATNODLB) ) + + dofiles-nodlb: + # copy over the game files +- ( cd dat ; cp $(DAT) $(GAMEDIR) ) ++ ( cd dat ; cp $(DAT) $(DESTDIR)$(GAMEDIR) ) + # set up their permissions +- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ ++ -( cd $(DESTDIR)$(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ + $(CHGRP) $(GAMEGRP) $(DAT) ; \ + chmod $(FILEPERM) $(DAT) ) + +@@ -230,26 +230,39 @@ update: $(GAME) recover $(VARDAT) dungeo # and a reminder @echo You may also want to install the man pages via the doc Makefile. @@ -86,36 +198,45 @@ $NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ +install-dat: 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) - -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save ++ -mkdir -p $(DESTDIR)$(SHELLDIR) ++ -mkdir -p $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(VARDIR)/save -rmdir ./-p - -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save - $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save +- $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save - chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save -+ chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) -+ chmod 770 $(VARDIR)/save ++ -$(CHOWN) $(GAMEUID) $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(VARDIR)/save ++ $(CHGRP) $(DESTDIR)$(GAMEGRP) $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(VARDIR)/save ++ chmod $(DIRPERM) $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) ++ chmod 770 $(DESTDIR)$(VARDIR)/save # set up the game files ( $(MAKE) dofiles ) # set up some additional files -@@ -247,9 +246,20 @@ - -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ +- touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile +- -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ ++ touch $(DESTDIR)$(VARDIR)/perm $(DESTDIR)$(VARDIR)/record $(DESTDIR)$(VARDIR)/logfile ++ -( cd $(DESTDIR)$(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ $(CHGRP) $(GAMEGRP) perm record logfile ; \ - chmod $(FILEPERM) perm record logfile ) -+ -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard* -+ -touch -c $(VARDIR)/save/* -+ -mkdir -p $(PREFIX)/share/doc/nethack -+ cp doc/Guidebook $(PREFIX)/share/doc/nethack -+ chown $(GAMEUID):$(GAMEGRP) $(PREFIX)/share/doc/nethack/Guidebook -+ chmod $(FILEPERM) $(PREFIX)/share/doc/nethack/Guidebook +- chmod $(FILEPERM) perm record logfile ) ++ chmod $(VARFILEPERM) perm record logfile ) ++ -touch -c $(DESTDIR)$(VARDIR)/bones* $(DESTDIR)$(VARDIR)/?lock* $(DESTDIR)$(VARDIR)/wizard* ++ -touch -c $(DESTDIR)$(VARDIR)/save/* ++ -mkdir -p $(DESTDIR)$(PREFIX)/share/doc/nethack ++ cp doc/Guidebook $(DESTDIR)$(PREFIX)/share/doc/nethack ++ $(CHOWN) $(GAMEUID):$(GAMEGRP) $(DESTDIR)$(PREFIX)/share/doc/nethack/Guidebook ++ chmod $(FILEPERM) $(DESTDIR)$(PREFIX)/share/doc/nethack/Guidebook # and a reminder @echo You may also want to reinstall the man pages via the doc Makefile. +binfiles: $(GAME) -+ cp src/$(GAME) $(SHELLDIR)/$(GAME)$(GTYPE) -+ -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)$(GTYPE) ; \ -+ $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)$(GTYPE) ) -+ chmod $(GAMEPERM) $(SHELLDIR)/$(GAME)$(GTYPE) ++ mkdir -p $(DESTDIR)$(SHELLDIR) ++ mkdir -p $(DESTDIR)$(GAMEDIR) ++ cp src/$(GAME) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) ++ -( cd $(DESTDIR)$(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) ; \ ++ $(CHGRP) $(GAMEGRP) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) ) ++ #chmod $(GAMEPERM) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) # 'make clean' removes all the .o files, but leaves around all the executables # and compiled data files diff --git a/games/nethack-lib/patches/patch-ac b/games/nethack-lib/patches/patch-ac index 2500ed72317..58a5d8f7a94 100644 --- a/games/nethack-lib/patches/patch-ac +++ b/games/nethack-lib/patches/patch-ac @@ -1,4 +1,6 @@ -$NetBSD: patch-ac,v 1.9 2006/06/19 17:07:45 minskim Exp $ +$NetBSD: patch-ac,v 1.10 2011/06/01 11:20:29 wiz Exp $ + +Fix for NetBSD. --- include/system.h.orig 2003-12-07 15:39:13.000000000 -0800 +++ include/system.h diff --git a/games/nethack-lib/patches/patch-ad b/games/nethack-lib/patches/patch-ad index fcbca1083dd..048e8e202f1 100644 --- a/games/nethack-lib/patches/patch-ad +++ b/games/nethack-lib/patches/patch-ad @@ -1,7 +1,9 @@ -$NetBSD: patch-ad,v 1.7 2007/10/27 18:26:34 pooka Exp $ +$NetBSD: patch-ad,v 1.8 2011/06/01 11:20:29 wiz Exp $ ---- sys/unix/nethack.sh.orig 2003-12-08 00:39:13.000000000 +0100 -+++ sys/unix/nethack.sh 2007-10-27 20:18:37.000000000 +0200 +Make configurable. + +--- sys/unix/nethack.sh.orig 2003-12-07 23:39:13.000000000 +0000 ++++ sys/unix/nethack.sh @@ -1,9 +1,31 @@ #!/bin/sh # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 @@ -11,7 +13,7 @@ $NetBSD: patch-ad,v 1.7 2007/10/27 18:26:34 pooka Exp $ +findbin () +{ + for x in $UILIST; do -+ if [ -x XXXPREFIXXXX/bin/nethack-$x ]; then ++ if [ -x @PREFIX@/bin/nethack-$x ]; then + echo $x + return + fi @@ -29,10 +31,10 @@ $NetBSD: patch-ad,v 1.7 2007/10/27 18:26:34 pooka Exp $ + exit 1 +fi + -+HACKDIR=XXXPREFIXXXX/share/nethackdir340 ++HACKDIR=@GAMEDIR@ export HACKDIR -HACK=$HACKDIR/nethack -+HACK=XXXPREFIXXXX/bin/nethack-$TTY ++HACK=@PREFIX@/bin/nethack-$TTY MAXNROFPLAYERS=4 # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH diff --git a/games/nethack-lib/patches/patch-ae b/games/nethack-lib/patches/patch-ae index 82f8b75674d..172a7b37ca7 100644 --- a/games/nethack-lib/patches/patch-ae +++ b/games/nethack-lib/patches/patch-ae @@ -1,6 +1,8 @@ -$NetBSD: patch-ae,v 1.5 2008/05/20 19:47:16 tnn Exp $ +$NetBSD: patch-ae,v 1.6 2011/06/01 11:20:29 wiz Exp $ ---- sys/unix/Makefile.doc.orig 2003-12-08 00:39:13.000000000 +0100 +Make configurable. + +--- sys/unix/Makefile.doc.orig 2003-12-07 23:39:13.000000000 +0000 +++ sys/unix/Makefile.doc @@ -41,7 +41,7 @@ Guidebook.dvi: Guidebook.tex @@ -11,3 +13,20 @@ $NetBSD: patch-ae,v 1.5 2008/05/20 19:47:16 tnn Exp $ MANEXT = 6 # manual installation for most BSD-style systems +@@ -58,11 +58,11 @@ DLBMANCREATE = cp dlb.6 + # DLBMANCREATE = nroff -man dlb.6 > + + manpages: +- -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) +- -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT) +- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) +- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) +- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) ++ -$(GAMEMANCREATE) $(DESTDIR)$(MANDIR)/$(GAME).$(MANEXT) ++ -$(LEVMANCREATE) $(DESTDIR)$(MANDIR)/lev_comp.$(MANEXT) ++ -$(DGNMANCREATE) $(DESTDIR)$(MANDIR)/dgn_comp.$(MANEXT) ++ -$(RCVRMANCREATE) $(DESTDIR)$(MANDIR)/recover.$(MANEXT) ++ -$(DLBMANCREATE) $(DESTDIR)$(MANDIR)/dlb.$(MANEXT) + + # manual creation for distribution + DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt diff --git a/games/nethack-lib/patches/patch-af b/games/nethack-lib/patches/patch-af index f115607979b..c009e80eccd 100644 --- a/games/nethack-lib/patches/patch-af +++ b/games/nethack-lib/patches/patch-af @@ -1,6 +1,9 @@ -$NetBSD: patch-af,v 1.6 2006/10/09 02:06:58 ben Exp $ +$NetBSD: patch-af,v 1.7 2011/06/01 11:20:29 wiz Exp $ ---- include/unixconf.h.orig 2003-12-07 18:39:13.000000000 -0500 +Make configurable. +Fix for BSD. + +--- include/unixconf.h.orig 2003-12-07 23:39:13.000000000 +0000 +++ include/unixconf.h @@ -19,20 +19,21 @@ */ @@ -36,7 +39,15 @@ $NetBSD: patch-af,v 1.6 2006/10/09 02:06:58 ben Exp $ /* Should be defined for most SYSV, SVR4 (including * Solaris 2+), HPUX, and Linux systems. In * particular, it should NOT be defined for the UNIXPC -@@ -171,7 +172,7 @@ +@@ -103,6 +104,7 @@ + * system, define VAR_PLAYGROUND to be where the variable parts are kept. + */ + /* #define VAR_PLAYGROUND "/var/lib/games/nethack" */ ++#define VAR_PLAYGROUND "/var/games/nethack340" + + + /* +@@ -171,7 +173,7 @@ # ifdef AMS #define AMS_MAILBOX "/Mailbox" # else @@ -45,3 +56,12 @@ $NetBSD: patch-af,v 1.6 2006/10/09 02:06:58 ben Exp $ #define DEF_MAILREADER "/usr/bin/mail" # else #define DEF_MAILREADER "/usr/ucb/Mail" +@@ -284,7 +286,7 @@ + #endif + + #if defined(BSD) || defined(ULTRIX) +-# if !defined(DGUX) && !defined(SUNOS4) ++# if !defined(DGUX) && !defined(SUNOS4) && !defined(BSD) + #define memcpy(d, s, n) bcopy(s, d, n) + #define memcmp(s1, s2, n) bcmp(s2, s1, n) + # endif diff --git a/games/nethack-lib/patches/patch-ag b/games/nethack-lib/patches/patch-ag index 88fe200433e..24b50be53f7 100644 --- a/games/nethack-lib/patches/patch-ag +++ b/games/nethack-lib/patches/patch-ag @@ -1,4 +1,6 @@ -$NetBSD: patch-ag,v 1.2 2000/08/10 17:50:07 pooka Exp $ +$NetBSD: patch-ag,v 1.3 2011/06/01 11:20:29 wiz Exp $ + +Fix for NetBSD. --- src/mail.c.orig Wed Aug 9 21:02:04 2000 +++ src/mail.c Thu Aug 10 18:32:30 2000 diff --git a/games/nethack-qt/patches/patch-ai b/games/nethack-lib/patches/patch-ai index 45c7a59cddc..517405d2aa7 100644 --- a/games/nethack-qt/patches/patch-ai +++ b/games/nethack-lib/patches/patch-ai @@ -1,4 +1,6 @@ -$NetBSD: patch-ai,v 1.3 2007/08/08 20:30:27 joerg Exp $ +$NetBSD: patch-ai,v 1.1 2011/06/01 11:20:29 wiz Exp $ + +Fix header file and image file. --- win/Qt/qt_win.cpp.orig 2003-12-07 23:39:13.000000000 +0000 +++ win/Qt/qt_win.cpp diff --git a/games/nethack-lib/patches/patch-sys_unix_Makefile.src b/games/nethack-lib/patches/patch-sys_unix_Makefile.src new file mode 100644 index 00000000000..c5b41f2ad64 --- /dev/null +++ b/games/nethack-lib/patches/patch-sys_unix_Makefile.src @@ -0,0 +1,91 @@ +$NetBSD: patch-sys_unix_Makefile.src,v 1.1 2011/06/01 11:20:29 wiz Exp $ + +Make configurable. + +--- sys/unix/Makefile.src.orig 2003-12-07 23:39:13.000000000 +0000 ++++ sys/unix/Makefile.src +@@ -36,7 +36,11 @@ SHELL=/bin/sh + # SHELL=E:/GEMINI2/MUPFEL.TTP + + # Normally, the C compiler driver is used for linking: ++.if "${GTYPE}" == "-qt" ++LINK=$(CXX) ++.else + LINK=$(CC) ++.endif + + # Pick the SYSSRC and SYSOBJ lines corresponding to your desired operating + # system. +@@ -154,12 +158,24 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/ + CFLAGS = -O -I../include + LFLAGS = + ++.if "${GTYPE}" == "-x11" || "${GTYPE}" == "-qt" ++CFLAGS += -I${X11BASE}/include ++LFLAGS += ${LDFLAGS} ++.endif ++ ++.if "${GTYPE}" == "-tty" ++CFLAGS += -DGTYPE_TTY ++.elif "${GTYPE}" == "-x11" ++CFLAGS += -DGTYPE_X11 ++.elif "${GTYPE}" == "-qt" ++CFLAGS += -DGTYPE_QT ++.endif ++ + # The Qt and Be window systems are written in C++, while the rest of + # NetHack is standard C. If using Qt, uncomment the LINK line here to get + # the C++ libraries linked in. + CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include +-CXX=g++ +-#LINK=g++ ++#CXX=g++ + # For cross-compiling, eg. with gcc on Linux (see also CC further up): + #CXX=arm-linux-g++ + #LINK=arm-linux-gcc +@@ -217,6 +233,15 @@ WINBEOBJ = + WINSRC = $(WINTTYSRC) + WINOBJ = $(WINTTYOBJ) + ++.if "${GTYPE}" == "-tty" ++.elif "${GTYPE}" == "-x11" ++WINSRC += $(WINX11SRC) ++WINOBJ += $(WINX11OBJ) ++.elif "${GTYPE}" == "-qt" ++WINSRC += $(WINQTSRC) ++WINOBJ += $(WINQTOBJ) ++.endif ++ + # on some systems the termcap library is in -ltermcap or -lcurses + # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead + # Sysatt uses shared library in lieu of this option +@@ -235,13 +260,13 @@ WINTTYLIB = -ltermlib + # + # libraries for X11 + # If USE_XPM is defined in config.h, you will also need -lXpm here. +-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 ++WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm + # WINX11LIB = -lXaw -lXmu -lXt -lX11 + # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm + # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0 + # + # libraries for Qt +-WINQTLIB = -L$(QTDIR)/lib -lqt ++WINQTLIB = -L$(QTDIR)/lib -lqt-mt -lXpm -lX11 -lICE -lSM -lz -lpng -lXext ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} + # + # libraries for KDE (with Qt) + WINKDELIB = -lkdecore -lkdeui -lXext +@@ -257,6 +282,13 @@ WINBELIB = -lbe + + WINLIB = $(WINTTYLIB) + ++.if "${GTYPE}" == "-tty" ++.elif "${GTYPE}" == "-x11" ++WINLIB += $(WINX11LIB) ++.elif "${GTYPE}" == "-qt" ++WINLIB += $(WINQTLIB) ++.endif ++ + # any other strange libraries your system needs (for Sysunix only -- the more + # specialized targets should already be right) + # diff --git a/games/nethack-lib/patches/patch-sys_unix_Makefile.utl b/games/nethack-lib/patches/patch-sys_unix_Makefile.utl new file mode 100644 index 00000000000..9344a55a173 --- /dev/null +++ b/games/nethack-lib/patches/patch-sys_unix_Makefile.utl @@ -0,0 +1,21 @@ +$NetBSD: patch-sys_unix_Makefile.utl,v 1.1 2011/06/01 11:20:29 wiz Exp $ + +Make configurable. + +--- sys/unix/Makefile.utl.orig 2011-05-27 15:13:59.000000000 +0000 ++++ sys/unix/Makefile.utl +@@ -94,6 +94,14 @@ LFLAGS = + + LIBS = + ++.if "${GTYPE}" == "-tty" ++CFLAGS += -DGTYPE_TTY ++.elif "${GTYPE}" == "-x11" ++CFLAGS += -DGTYPE_X11 ++.elif "${GTYPE}" == "-qt" ++CFLAGS += -DGTYPE_QT ++.endif ++ + # If you are cross-compiling, you must use this: + #OBJDIR = . + # otherwise, you can save a little bit of disk space with this: diff --git a/games/nethack-qt/MESSAGE b/games/nethack-qt/MESSAGE index 3bf5100728a..ac0720e054b 100644 --- a/games/nethack-qt/MESSAGE +++ b/games/nethack-qt/MESSAGE @@ -1,6 +1,9 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.3 2002/09/24 12:30:00 wiz Exp $ +$NetBSD: MESSAGE,v 1.4 2011/06/01 11:20:29 wiz Exp $ You can run the QT NetHack by typing "nethack qt" +To fall back to tty mode, use "NETHACKOPTIONS=windowtype:tty nethack" +or set that option in your .nethackrc file. + =========================================================================== diff --git a/games/nethack-qt/Makefile b/games/nethack-qt/Makefile index e5e731ae522..c5be5f0d0b6 100644 --- a/games/nethack-qt/Makefile +++ b/games/nethack-qt/Makefile @@ -1,27 +1,34 @@ -# $NetBSD: Makefile,v 1.58 2011/01/13 13:37:48 wiz Exp $ +# $NetBSD: Makefile,v 1.59 2011/06/01 11:20:29 wiz Exp $ # .include "../../games/nethack-lib/Makefile.common" PKGNAME= nethack-qt-${NETHACK_VERSION} -PKGREVISION= 10 +PKGREVISION= 11 CATEGORIES+= x11 MAKE_JOBS_SAFE= no -COMMENT= The QT-Enhanced X11 version of NetHack +COMMENT= The QT-Enhanced X11+tty version of NetHack DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib USE_LANGUAGES= c c++ -BUILD_TARGET= x11tiles nethack +BUILD_TARGET= nethack x11tiles INSTALL_TARGET= binfiles MAKE_ENV+= GTYPE=-qt -CFLAGS+= -DPREFIX="\"${PREFIX}\"" +DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo +PATCHDIR= ${.CURDIR}/../nethack-lib/patches + +SPECIAL_PERMS+= ${PREFIX}/bin/nethack-qt \ + ${GAMEPERM} post-install: - @${CP} -f ${WRKSRC}/dat/x11tiles ${WRKSRC}/dat/tiles.xpm - @${INSTALL_DATA} ${WRKSRC}/dat/tiles.xpm ${DESTDIR}${PREFIX}/share/${NETHACK_DIR} + ${CP} -f ${WRKSRC}/dat/x11tiles ${WRKSRC}/dat/tiles.xpm + ${INSTALL_DATA} ${WRKSRC}/dat/tiles.xpm ${DESTDIR}${GAMEDIR} + ${INSTALL_DATA} ${WRKSRC}/win/Qt/nhsplash.xpm ${DESTDIR}${GAMEDIR} + ${INSTALL_DATA} ${WRKSRC}/win/Qt/knh-mini.xpm ${DESTDIR}${GAMEDIR} + ${INSTALL_DATA} ${WRKSRC}/win/Qt/knh.xpm ${DESTDIR}${GAMEDIR} .include "../../x11/libXpm/buildlink3.mk" .include "../../x11/qt3-libs/buildlink3.mk" diff --git a/games/nethack-qt/PLIST b/games/nethack-qt/PLIST index 9205b4270b5..01df25e2609 100644 --- a/games/nethack-qt/PLIST +++ b/games/nethack-qt/PLIST @@ -1,3 +1,6 @@ -@comment $NetBSD: PLIST,v 1.2 2002/03/25 20:32:27 pooka Exp $ +@comment $NetBSD: PLIST,v 1.3 2011/06/01 11:20:29 wiz Exp $ bin/nethack-qt share/nethackdir340/tiles.xpm +share/nethackdir340/nhsplash.xpm +share/nethackdir340/knh.xpm +share/nethackdir340/knh-mini.xpm diff --git a/games/nethack-qt/distinfo b/games/nethack-qt/distinfo deleted file mode 100644 index d5e663c6351..00000000000 --- a/games/nethack-qt/distinfo +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: distinfo,v 1.23 2011/04/03 01:33:51 markd Exp $ - -SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd -RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95 -Size (nethack-343-src.tgz) = 3497458 bytes -SHA1 (patch-aa) = dc4761a41a5851249e1c9e73b03dea423fc45571 -SHA1 (patch-ab) = 6c42d5c4c12e70651f14b08658169f6c00b420db -SHA1 (patch-ac) = e5101c73a1b3ec0fb072ce4b401413a338465298 -SHA1 (patch-ae) = a72da6e6bd1af3a8eaed97ecc1fdd1ed4198a5db -SHA1 (patch-af) = b89027c56de63c01840768d109b4ee6e6efac1a8 -SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674 -SHA1 (patch-ah) = 238bd9d0284d7b43aa92ab558f9a6dd723722f05 -SHA1 (patch-ai) = f12acf028c90659bde26bdb5d20692a6daf810c7 diff --git a/games/nethack-qt/patches/patch-aa b/games/nethack-qt/patches/patch-aa deleted file mode 100644 index 8d8011b19ac..00000000000 --- a/games/nethack-qt/patches/patch-aa +++ /dev/null @@ -1,59 +0,0 @@ -$NetBSD: patch-aa,v 1.12 2005/12/19 19:45:02 joerg Exp $ - ---- include/config.h.old 2003-12-08 01:39:13.000000000 +0200 -+++ include/config.h 2004-03-05 17:00:59.000000000 +0200 -@@ -42,9 +42,9 @@ - * Define all of those you want supported in your binary. - * Some combinations make no sense. See the installation document. - */ --#define TTY_GRAPHICS /* good old tty based graphics */ -+/* #define TTY_GRAPHICS */ /* good old tty based graphics */ - /* #define X11_GRAPHICS */ /* X11 interface */ --/* #define QT_GRAPHICS */ /* Qt interface */ -+#define QT_GRAPHICS /* Qt interface */ - /* #define GNOME_GRAPHICS */ /* Gnome interface */ - /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ - -@@ -85,7 +85,7 @@ - #ifdef QT_GRAPHICS - # define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */ - # define USER_SOUNDS /* Use sounds */ --# ifndef __APPLE__ -+# if !(defined(__APPLE__) || defined(__NetBSD__) || defined(__DragonFly__)) - # define USER_SOUNDS_REGEX - # endif - # define USE_XPM /* Use XPM format for images (required) */ -@@ -169,11 +169,11 @@ - - #ifdef UNIX - /* path and file name extension for compression program */ --#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ --#define COMPRESS_EXTENSION ".Z" /* compress's extension */ -+/* #define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */ -+/* #define COMPRESS_EXTENSION ".Z" */ /* compress's extension */ - /* 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 "@GZIP_PROGRAM@" /* FSF gzip compression */ -+#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */ - #endif - - #ifndef COMPRESS -@@ -204,7 +204,7 @@ - * otherwise it will be the current directory. - */ - # ifndef HACKDIR --# define HACKDIR "/usr/games/lib/nethackdir" -+# define HACKDIR "XXXPREFIXXXX/share/nethackdir340" - # endif - - /* -@@ -300,7 +300,7 @@ - * functions that have been macroized. - */ - --/* #define VISION_TABLES */ /* use vision tables generated at compile time */ -+#define VISION_TABLES /* use vision tables generated at compile time */ - #ifndef VISION_TABLES - # ifndef NO_MACRO_CPATH - # define MACRO_CPATH /* use clear_path macros instead of functions */ diff --git a/games/nethack-qt/patches/patch-ab b/games/nethack-qt/patches/patch-ab deleted file mode 100644 index 5e2b1e0025b..00000000000 --- a/games/nethack-qt/patches/patch-ab +++ /dev/null @@ -1,121 +0,0 @@ -$NetBSD: patch-ab,v 1.7 2003/09/02 00:30:55 pooka Exp $ - ---- sys/unix/Makefile.top.orig 2003-08-30 03:08:04.000000000 +0300 -+++ sys/unix/Makefile.top 2003-09-02 02:42:07.000000000 +0300 -@@ -14,18 +14,17 @@ - # MAKE = make - - # make NetHack --PREFIX = /usr - GAME = nethack - # GAME = nethack.prg --GAMEUID = games --GAMEGRP = bin -+GAMEUID = root -+GAMEGRP = games - - # Permissions - some places use setgid instead of setuid, for instance - # See also the option "SECURE" in include/config.h --GAMEPERM = 04755 --FILEPERM = 0644 -+GAMEPERM = 2755 -+FILEPERM = 0664 - EXEPERM = 0755 --DIRPERM = 0755 -+DIRPERM = 0775 - - # GAMEDIR also appears in config.h as "HACKDIR". - # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR -@@ -35,12 +34,12 @@ - # therefore there should not be anything in GAMEDIR that you want to keep - # (if there is, you'll have to do the installation by hand or modify the - # instructions) --GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir -+GAMEDIR = $(PREFIX)/share/$(GAME)dir340 - VARDIR = $(GAMEDIR) --SHELLDIR = $(PREFIX)/games -+SHELLDIR = $(PREFIX)/bin - - # per discussion in Install.X11 and Install.Qt --VARDATND = -+VARDATND = pet_mark.xbm rip.xpm - # VARDATND = x11tiles NetHack.ad pet_mark.xbm - # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm - # for Atari/Gem -@@ -87,9 +86,12 @@ - $(GAME): - ( cd src ; $(MAKE) ) - --all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb -+all: $(GAME) datastuff - @echo "Done." - -+datastuff: recover Guidebook $(VARDAT) dungeon spec_levs check-dlb -+ @echo "Data Sets Built." -+ - # Note: many of the dependencies below are here to allow parallel make - # to generate valid output - -@@ -183,18 +185,15 @@ - -e '}' \ - -e '$$s/.*/nodlb/p' < dat/options` ; \ - $(MAKE) dofiles-$${target-nodlb} -- cp src/$(GAME) $(GAMEDIR) -- cp util/recover $(GAMEDIR) -+ cp util/recover $(PREFIX)/bin - -rm -f $(SHELLDIR)/$(GAME) - sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ - -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ -+ -e 's;XXXPREFIXXXX;$(PREFIX);' \ - < sys/unix/nethack.sh \ - > $(SHELLDIR)/$(GAME) - # set up their permissions -- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ -- $(CHGRP) $(GAMEGRP) $(GAME) recover ) -- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) -- chmod $(EXEPERM) $(GAMEDIR)/recover -+ chmod $(EXEPERM) $(PREFIX)/bin/recover - -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) - $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) - chmod $(EXEPERM) $(SHELLDIR)/$(GAME) -@@ -230,16 +229,16 @@ - # and a reminder - @echo You may also want to install the man pages via the doc Makefile. - --install: $(GAME) recover $(VARDAT) dungeon spec_levs -+install-dat: 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) -- -rm -rf $(GAMEDIR) $(VARDIR) - -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save - -rmdir ./-p - -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save - $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save -- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save -+ chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) -+ chmod 770 $(VARDIR)/save - # set up the game files - ( $(MAKE) dofiles ) - # set up some additional files -@@ -247,9 +246,20 @@ - -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ - $(CHGRP) $(GAMEGRP) perm record logfile ; \ - chmod $(FILEPERM) perm record logfile ) -+ -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard* -+ -touch -c $(VARDIR)/save/* -+ -mkdir -p $(PREFIX)/share/doc/nethack -+ cp doc/Guidebook $(PREFIX)/share/doc/nethack -+ chown $(GAMEUID):$(GAMEGRP) $(PREFIX)/share/doc/nethack/Guidebook -+ chmod $(FILEPERM) $(PREFIX)/share/doc/nethack/Guidebook - # and a reminder - @echo You may also want to reinstall the man pages via the doc Makefile. - -+binfiles: $(GAME) -+ cp src/$(GAME) $(SHELLDIR)/$(GAME)$(GTYPE) -+ -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)$(GTYPE) ; \ -+ $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)$(GTYPE) ) -+ chmod $(GAMEPERM) $(SHELLDIR)/$(GAME)$(GTYPE) - - # 'make clean' removes all the .o files, but leaves around all the executables - # and compiled data files diff --git a/games/nethack-qt/patches/patch-ac b/games/nethack-qt/patches/patch-ac deleted file mode 100644 index 4aa02c1bbdb..00000000000 --- a/games/nethack-qt/patches/patch-ac +++ /dev/null @@ -1,49 +0,0 @@ -$NetBSD: patch-ac,v 1.14 2005/12/19 19:45:02 joerg Exp $ - ---- include/system.h.orig 2003-08-30 03:07:23.000000000 +0300 -+++ include/system.h 2003-09-02 02:49:23.000000000 +0300 -@@ -79,10 +79,10 @@ - # if !defined(__SC__) && !defined(LINUX) - E long NDECL(random); - # endif --# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM) -+# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)) || defined(RANDOM) - E void FDECL(srandom, (unsigned int)); - # else --# if !defined(bsdi) && !defined(__FreeBSD__) -+# if !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) - E int FDECL(srandom, (unsigned int)); - # endif - # endif -@@ -132,7 +132,7 @@ - E void FDECL(qsort, (genericptr_t,size_t,size_t, - int(*)(const genericptr,const genericptr))); - #else --# if defined(BSD) || defined(ULTRIX) -+# if defined(BSD) || defined(ULTRIX) && !defined(__NetBSD__) - E int qsort(); - # else - # if !defined(LATTICE) && !defined(AZTEC_50) -@@ -421,7 +421,7 @@ - # ifdef HPUX - E unsigned int FDECL(strlen, (char *)); - # else --# if !(defined(ULTRIX_PROTO) && defined(__GNUC__)) -+# if !(defined(ULTRIX_PROTO) && defined(__GNUC__)) && !defined(__NetBSD__) && !defined(__DragonFly__) - E int FDECL(strlen, (const char *)); - # endif - # endif /* HPUX */ -@@ -521,11 +521,13 @@ - # endif - # endif - -+#ifndef __NetBSD__ - # if defined(ULTRIX) || (defined(BSD) && defined(POSIX_TYPES)) || defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) || (defined(HPUX) && defined(_POSIX_SOURCE)) - E time_t FDECL(time, (time_t *)); - # else - E long FDECL(time, (time_t *)); - # endif /* ULTRIX */ -+#endif - - #ifdef VMS - /* used in makedefs.c, but missing from gcc-vms's <time.h> */ diff --git a/games/nethack-qt/patches/patch-ae b/games/nethack-qt/patches/patch-ae deleted file mode 100644 index 703ced03d32..00000000000 --- a/games/nethack-qt/patches/patch-ae +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ae,v 1.3 2003/09/02 00:30:55 pooka Exp $ - ---- sys/unix/Makefile.doc.orig 2003-02-23 16:43:39.000000000 +0200 -+++ sys/unix/Makefile.doc 2003-03-01 16:36:19.000000000 +0200 -@@ -38,7 +38,7 @@ - - - GAME = nethack --MANDIR = /usr/man/man6 -+MANDIR = $(PREFIX)/man/man6 - MANEXT = 6 - - # manual installation for most BSD-style systems diff --git a/games/nethack-qt/patches/patch-af b/games/nethack-qt/patches/patch-af deleted file mode 100644 index 3e558da5584..00000000000 --- a/games/nethack-qt/patches/patch-af +++ /dev/null @@ -1,65 +0,0 @@ -$NetBSD: patch-af,v 1.5 2011/04/03 01:33:51 markd Exp $ - ---- include/unixconf.h.orig 2003-12-08 12:39:13.000000000 +1300 -+++ include/unixconf.h -@@ -19,20 +19,21 @@ - */ - - /* define exactly one of the following four choices */ --/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */ -+#define __NETHACK_OS__ 1 -+/* #define BSD */ /* define for 4.n/Free/Open/Net BSD */ - /* also for relatives like SunOS 4.x, DG/UX, and */ - /* older versions of Linux */ - /* #define ULTRIX */ /* define for Ultrix v3.0 or higher (but not lower) */ - /* Use BSD for < v3.0 */ - /* "ULTRIX" not to be confused with "ultrix" */ --#define SYSV /* define for System V, Solaris 2.x, newer versions */ -+/* #define SYSV */ /* define for System V, Solaris 2.x, newer versions */ - /* of Linux */ - /* #define HPUX */ /* Hewlett-Packard's Unix, version 6.5 or higher */ - /* use SYSV for < v6.5 */ - - - /* define any of the following that are appropriate */ --#define SVR4 /* use in addition to SYSV for System V Release 4 */ -+/* #define SVR4 */ /* use in addition to SYSV for System V Release 4 */ - /* including Solaris 2+ */ - #define NETWORK /* if running on a networked system */ - /* e.g. Suns sharing a playground through NFS */ -@@ -47,7 +48,7 @@ - * job control (note that AIX is SYSV otherwise) - * Also define this for AIX 3.2 */ - --#define TERMINFO /* uses terminfo rather than termcap */ -+/* #define TERMINFO /* uses terminfo rather than termcap */ - /* Should be defined for most SYSV, SVR4 (including - * Solaris 2+), HPUX, and Linux systems. In - * particular, it should NOT be defined for the UNIXPC -@@ -168,6 +169,9 @@ - - #ifdef MAIL - # if defined(BSD) || defined(ULTRIX) -+# ifdef __NetBSD__ -+#define DEF_MAILREADER "/usr/bin/mail" -+# else - # ifdef AMS - #define AMS_MAILBOX "/Mailbox" - # else -@@ -177,6 +181,7 @@ - #define DEF_MAILREADER "/usr/ucb/Mail" - # endif - # endif -+#endif - #else - # if (defined(SYSV) || defined(DGUX) || defined(HPUX)) && !defined(LINUX) - # if defined(M_XENIX) -@@ -284,7 +289,7 @@ - #endif - - #if defined(BSD) || defined(ULTRIX) --# if !defined(DGUX) && !defined(SUNOS4) -+# if !defined(DGUX) && !defined(SUNOS4) && !defined(BSD) - #define memcpy(d, s, n) bcopy(s, d, n) - #define memcmp(s1, s2, n) bcmp(s2, s1, n) - # endif diff --git a/games/nethack-qt/patches/patch-ag b/games/nethack-qt/patches/patch-ag deleted file mode 100644 index c0725b1fc61..00000000000 --- a/games/nethack-qt/patches/patch-ag +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ag,v 1.3 2003/09/02 00:30:55 pooka Exp $ - ---- src/mail.c.orig Wed Aug 9 21:02:04 2000 -+++ src/mail.c Thu Aug 10 18:32:30 2000 -@@ -71,7 +71,7 @@ - # if !defined(MAILPATH) && (defined(LINUX) || defined(__osf__)) - # define MAILPATH "/var/spool/mail/" - # endif --# if !defined(MAILPATH) && defined(__FreeBSD__) -+# if !defined(MAILPATH) && (defined(__FreeBSD__) || defined(__NetBSD__)) - # define MAILPATH "/var/mail/" - # endif - # if !defined(MAILPATH) && (defined(BSD) || defined(ULTRIX)) diff --git a/games/nethack-qt/patches/patch-ah b/games/nethack-qt/patches/patch-ah deleted file mode 100644 index 595bcfca55e..00000000000 --- a/games/nethack-qt/patches/patch-ah +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-ah,v 1.7 2005/12/19 19:45:02 joerg Exp $ - ---- sys/unix/Makefile.src.orig 2003-12-08 12:39:13.000000000 +1300 -+++ sys/unix/Makefile.src -@@ -151,15 +151,15 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/ - # flags for debugging: - # CFLAGS = -g -I../include - --CFLAGS = -O -I../include --LFLAGS = -+CFLAGS += -I../include -I${X11BASE}/include -+LFLAGS = ${LDFLAGS} - - # The Qt and Be window systems are written in C++, while the rest of - # NetHack is standard C. If using Qt, uncomment the LINK line here to get - # the C++ libraries linked in. - CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include --CXX=g++ --#LINK=g++ -+#CXX=g++ -+LINK=$(CXX) - # For cross-compiling, eg. with gcc on Linux (see also CC further up): - #CXX=arm-linux-g++ - #LINK=arm-linux-gcc -@@ -214,8 +214,8 @@ WINBEOBJ = - - # - # --WINSRC = $(WINTTYSRC) --WINOBJ = $(WINTTYOBJ) -+WINSRC = $(WINQTSRC) -+WINOBJ = $(WINQTOBJ) - - # on some systems the termcap library is in -ltermcap or -lcurses - # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead -@@ -241,7 +241,7 @@ WINX11LIB = -lXaw -lXmu -lXext -lXt -lX1 - # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0 - # - # libraries for Qt --WINQTLIB = -L$(QTDIR)/lib -lqt -+WINQTLIB = -L$(QTDIR)/lib -lqt-mt -lXpm -lX11 -lICE -lSM -lz -lpng -lXext ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} - # - # libraries for KDE (with Qt) - WINKDELIB = -lkdecore -lkdeui -lXext -@@ -255,7 +255,7 @@ WINGEMLIB = -le_gem -lgem - # libraries for BeOS - WINBELIB = -lbe - --WINLIB = $(WINTTYLIB) -+WINLIB = $(WINQTLIB) - - # any other strange libraries your system needs (for Sysunix only -- the more - # specialized targets should already be right) diff --git a/games/nethack-tty/Makefile b/games/nethack-tty/Makefile index d3b900606a9..417000fb15e 100644 --- a/games/nethack-tty/Makefile +++ b/games/nethack-tty/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.19 2009/06/30 00:07:16 joerg Exp $ +# $NetBSD: Makefile,v 1.20 2011/06/01 11:20:30 wiz Exp $ # .include "../../games/nethack-lib/Makefile.common" PKGNAME= nethack-tty-${NETHACK_VERSION} -PKGREVISION= 1 +PKGREVISION= 2 COMMENT= The tty/console based version of NetHack @@ -19,4 +19,7 @@ MAKE_ENV+= GTYPE=-tty DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo PATCHDIR= ${.CURDIR}/../nethack-lib/patches +SPECIAL_PERMS+= ${PREFIX}/bin/nethack-tty \ + ${GAMEPERM} + .include "../../mk/bsd.pkg.mk" diff --git a/games/nethack-x11/MESSAGE b/games/nethack-x11/MESSAGE index 797410823f9..a08faecdcbc 100644 --- a/games/nethack-x11/MESSAGE +++ b/games/nethack-x11/MESSAGE @@ -1,12 +1,13 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.4 2005/09/28 12:41:40 rillig Exp $ +$NetBSD: MESSAGE,v 1.5 2011/06/01 11:20:30 wiz Exp $ You can run the X11 NetHack by typing "nethack x11". -A custom NetHack font was installed. You must add -${PREFIX}/lib/X11/fonts/misc to fontpath and set +Two fonts were installed for NetHack. You must add +${PREFIX}/lib/X11/fonts/misc to fontpath and set one of NetHack*map*font: nh10 +NetHack*map*font: -misc-fixed-medium-r-normal-ibmpc-14-120-75-75-c-80-iso8859-1 in ${PREFIX}/lib/X11/app-defaults/NetHack to use it. Tiled mode is enabled by: @@ -15,4 +16,12 @@ NetHack.tile_file: x11tiles Also see ${PREFIX}/share/nethackdir340/nethack.x11.rc +You may also want to set this environment variable, so NetHack can +find its app-defaults file: + +XFILESEARCHPATH=%D:/usr/pkg/lib/X11/%T/%N%C:/usr/pkg/lib/X11/%T/%N + +To fall back to tty mode, use "NETHACKOPTIONS=windowtype:tty nethack" +or set that option in your .nethackrc file. + =========================================================================== diff --git a/games/nethack-x11/Makefile b/games/nethack-x11/Makefile index 1c997eef25c..92c0b366f78 100644 --- a/games/nethack-x11/Makefile +++ b/games/nethack-x11/Makefile @@ -1,18 +1,17 @@ -# $NetBSD: Makefile,v 1.37 2008/11/10 17:21:35 wiz Exp $ +# $NetBSD: Makefile,v 1.38 2011/06/01 11:20:30 wiz Exp $ # .include "../../games/nethack-lib/Makefile.common" PKGNAME= nethack-x11-${NETHACK_VERSION} -PKGREVISION= 3 -COMMENT= The X11 version of NetHack +PKGREVISION= 4 +COMMENT= The X11+tty version of NetHack CATEGORIES+= x11 DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib - -BUILD_TARGET= x11tiles nethack +BUILD_TARGET= nethack x11tiles rip.xpm INSTALL_TARGET= binfiles MAKE_ENV+= GTYPE=-x11 @@ -20,13 +19,22 @@ FONTS_DIRS.x11+= ${PREFIX}/lib/X11/fonts/misc INSTALLATION_DIRS= lib/X11/app-defaults lib/X11/fonts/misc +DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo +PATCHDIR= ${.CURDIR}/../nethack-lib/patches + +SPECIAL_PERMS+= ${PREFIX}/bin/nethack-x11 \ + ${GAMEPERM} post-install: - @${INSTALL_DATA} ${WRKSRC}/dat/x11tiles ${PREFIX}/share/${NETHACK_DIR} - @${INSTALL_DATA} ${WRKSRC}/win/X11/NetHack.ad \ - ${PREFIX}/lib/X11/app-defaults/NetHack - @${INSTALL_DATA} ${WRKSRC}/win/X11/nh10.bdf ${PREFIX}/lib/X11/fonts/misc - @${INSTALL_DATA} ${WRKSRC}/win/X11/nethack.rc \ - ${PREFIX}/share/${NETHACK_DIR}/nethack.x11.rc + ${INSTALL_DATA} ${WRKSRC}/dat/x11tiles \ + ${DESTDIR}${GAMEDIR} + ${INSTALL_DATA} ${WRKSRC}/win/X11/NetHack.ad \ + ${DESTDIR}${PREFIX}/lib/X11/app-defaults/NetHack + ${INSTALL_DATA} ${WRKSRC}/win/X11/nh10.bdf \ + ${DESTDIR}${PREFIX}/lib/X11/fonts/misc + ${INSTALL_DATA} ${WRKSRC}/win/X11/ibm.bdf \ + ${DESTDIR}${PREFIX}/lib/X11/fonts/misc + ${INSTALL_DATA} ${WRKSRC}/win/X11/nethack.rc \ + ${DESTDIR}${GAMEDIR}/nethack.x11.rc .include "../../x11/libXaw/buildlink3.mk" .include "../../x11/libXpm/buildlink3.mk" diff --git a/games/nethack-x11/PLIST b/games/nethack-x11/PLIST index b1f2507eaa1..5c3c3937c13 100644 --- a/games/nethack-x11/PLIST +++ b/games/nethack-x11/PLIST @@ -1,6 +1,7 @@ -@comment $NetBSD: PLIST,v 1.3 2005/05/08 10:17:30 pooka Exp $ +@comment $NetBSD: PLIST,v 1.4 2011/06/01 11:20:30 wiz Exp $ bin/nethack-x11 -share/nethackdir340/x11tiles -share/nethackdir340/nethack.x11.rc lib/X11/app-defaults/NetHack +lib/X11/fonts/misc/ibm.bdf lib/X11/fonts/misc/nh10.bdf +share/nethackdir340/nethack.x11.rc +share/nethackdir340/x11tiles diff --git a/games/nethack-x11/distinfo b/games/nethack-x11/distinfo deleted file mode 100644 index 84e89e50b24..00000000000 --- a/games/nethack-x11/distinfo +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: distinfo,v 1.16 2005/12/19 19:42:08 joerg Exp $ - -SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd -RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95 -Size (nethack-343-src.tgz) = 3497458 bytes -SHA1 (patch-aa) = b20a15dcb6db150aab19648068a186156bf76b90 -SHA1 (patch-ab) = 73a1ac287ded70f371bb38c82cdbcd36182ce3a5 -SHA1 (patch-ac) = 7be58a01d37d632f8eb8041f2811f482c3cc9686 -SHA1 (patch-ae) = a72da6e6bd1af3a8eaed97ecc1fdd1ed4198a5db -SHA1 (patch-af) = c7640150409d97a7930fef476191d34c08c6f741 -SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674 -SHA1 (patch-ah) = 48b5972b9db3330d7087ff16816e0ae9b4ff208e diff --git a/games/nethack-x11/patches/patch-aa b/games/nethack-x11/patches/patch-aa deleted file mode 100644 index 440d7f1e5b1..00000000000 --- a/games/nethack-x11/patches/patch-aa +++ /dev/null @@ -1,67 +0,0 @@ -$NetBSD: patch-aa,v 1.9 2004/03/05 15:21:01 pooka Exp $ - ---- include/config.h.orig 2003-12-08 01:39:13.000000000 +0200 -+++ include/config.h 2004-03-05 16:26:56.000000000 +0200 -@@ -42,8 +42,8 @@ - * Define all of those you want supported in your binary. - * Some combinations make no sense. See the installation document. - */ --#define TTY_GRAPHICS /* good old tty based graphics */ --/* #define X11_GRAPHICS */ /* X11 interface */ -+/* #define TTY_GRAPHICS */ /* good old tty based graphics */ -+#define X11_GRAPHICS /* X11 interface */ - /* #define QT_GRAPHICS */ /* Qt interface */ - /* #define GNOME_GRAPHICS */ /* Gnome interface */ - /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ -@@ -114,7 +114,7 @@ - #endif - - #ifndef DEFAULT_WINDOW_SYS --# define DEFAULT_WINDOW_SYS "tty" -+# define DEFAULT_WINDOW_SYS "x11" - #endif - - #ifdef X11_GRAPHICS -@@ -126,7 +126,7 @@ - * would allow: - * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm - */ --/* # define USE_XPM */ /* Disable if you do not have the XPM library */ -+# define USE_XPM /* Disable if you do not have the XPM library */ - # ifdef USE_XPM - # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ - # endif -@@ -169,11 +169,11 @@ - - #ifdef UNIX - /* path and file name extension for compression program */ --#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ --#define COMPRESS_EXTENSION ".Z" /* compress's extension */ -+/* #define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */ -+/* #define COMPRESS_EXTENSION ".Z" */ /* compress's extension */ - /* 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 "@GZIP_PROGRAM@" /* FSF gzip compression */ -+#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */ - #endif - - #ifndef COMPRESS -@@ -204,7 +204,7 @@ - * otherwise it will be the current directory. - */ - # ifndef HACKDIR --# define HACKDIR "/usr/games/lib/nethackdir" -+# define HACKDIR "XXXPREFIXXXX/share/nethackdir340" - # endif - - /* -@@ -300,7 +300,7 @@ - * functions that have been macroized. - */ - --/* #define VISION_TABLES */ /* use vision tables generated at compile time */ -+#define VISION_TABLES /* use vision tables generated at compile time */ - #ifndef VISION_TABLES - # ifndef NO_MACRO_CPATH - # define MACRO_CPATH /* use clear_path macros instead of functions */ diff --git a/games/nethack-x11/patches/patch-ab b/games/nethack-x11/patches/patch-ab deleted file mode 100644 index c2aa0916c81..00000000000 --- a/games/nethack-x11/patches/patch-ab +++ /dev/null @@ -1,121 +0,0 @@ -$NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ - ---- sys/unix/Makefile.top.orig 2003-12-08 01:39:13.000000000 +0200 -+++ sys/unix/Makefile.top 2004-03-05 15:40:57.000000000 +0200 -@@ -14,18 +14,17 @@ - # MAKE = make - - # make NetHack --PREFIX = /usr - GAME = nethack - # GAME = nethack.prg --GAMEUID = games --GAMEGRP = bin -+GAMEUID = root -+GAMEGRP = games - - # Permissions - some places use setgid instead of setuid, for instance - # See also the option "SECURE" in include/config.h --GAMEPERM = 04755 --FILEPERM = 0644 -+GAMEPERM = 2755 -+FILEPERM = 0664 - EXEPERM = 0755 --DIRPERM = 0755 -+DIRPERM = 0775 - - # GAMEDIR also appears in config.h as "HACKDIR". - # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR -@@ -35,12 +34,12 @@ - # therefore there should not be anything in GAMEDIR that you want to keep - # (if there is, you'll have to do the installation by hand or modify the - # instructions) --GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir -+GAMEDIR = $(PREFIX)/share/$(GAME)dir340 - VARDIR = $(GAMEDIR) --SHELLDIR = $(PREFIX)/games -+SHELLDIR = $(PREFIX)/bin - - # per discussion in Install.X11 and Install.Qt --VARDATND = -+VARDATND = pet_mark.xbm rip.xpm - # VARDATND = x11tiles NetHack.ad pet_mark.xbm - # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm - # for Atari/Gem -@@ -87,9 +86,12 @@ - $(GAME): - ( cd src ; $(MAKE) ) - --all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb -+all: $(GAME) datastuff - @echo "Done." - -+datastuff: recover Guidebook $(VARDAT) dungeon spec_levs check-dlb -+ @echo "Data Sets Built." -+ - # Note: many of the dependencies below are here to allow parallel make - # to generate valid output - -@@ -183,18 +185,15 @@ - -e '}' \ - -e '$$s/.*/nodlb/p' < dat/options` ; \ - $(MAKE) dofiles-$${target-nodlb} -- cp src/$(GAME) $(GAMEDIR) -- cp util/recover $(GAMEDIR) -+ cp util/recover $(PREFIX)/bin - -rm -f $(SHELLDIR)/$(GAME) - sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ - -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ -+ -e 's;XXXPREFIXXXX;$(PREFIX);' \ - < sys/unix/nethack.sh \ - > $(SHELLDIR)/$(GAME) - # set up their permissions -- -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ -- $(CHGRP) $(GAMEGRP) $(GAME) recover ) -- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) -- chmod $(EXEPERM) $(GAMEDIR)/recover -+ chmod $(EXEPERM) $(PREFIX)/bin/recover - -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) - $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) - chmod $(EXEPERM) $(SHELLDIR)/$(GAME) -@@ -230,16 +229,16 @@ - # and a reminder - @echo You may also want to install the man pages via the doc Makefile. - --install: $(GAME) recover $(VARDAT) dungeon spec_levs -+install-dat: 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) -- -rm -rf $(GAMEDIR) $(VARDIR) - -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save - -rmdir ./-p - -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save - $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save -- chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save -+ chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) -+ chmod 770 $(VARDIR)/save - # set up the game files - ( $(MAKE) dofiles ) - # set up some additional files -@@ -247,9 +246,20 @@ - -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ - $(CHGRP) $(GAMEGRP) perm record logfile ; \ - chmod $(FILEPERM) perm record logfile ) -+ -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard* -+ -touch -c $(VARDIR)/save/* -+ -mkdir -p $(PREFIX)/share/doc/nethack -+ cp doc/Guidebook $(PREFIX)/share/doc/nethack -+ chown $(GAMEUID):$(GAMEGRP) $(PREFIX)/share/doc/nethack/Guidebook -+ chmod $(FILEPERM) $(PREFIX)/share/doc/nethack/Guidebook - # and a reminder - @echo You may also want to reinstall the man pages via the doc Makefile. - -+binfiles: $(GAME) -+ cp src/$(GAME) $(SHELLDIR)/$(GAME)$(GTYPE) -+ -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)$(GTYPE) ; \ -+ $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)$(GTYPE) ) -+ chmod $(GAMEPERM) $(SHELLDIR)/$(GAME)$(GTYPE) - - # 'make clean' removes all the .o files, but leaves around all the executables - # and compiled data files diff --git a/games/nethack-x11/patches/patch-ac b/games/nethack-x11/patches/patch-ac deleted file mode 100644 index 7f1c4424fcd..00000000000 --- a/games/nethack-x11/patches/patch-ac +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-ac,v 1.6 2005/12/19 19:42:08 joerg Exp $ - ---- include/system.h.orig 2003-12-08 01:39:13.000000000 +0200 -+++ include/system.h 2004-03-05 15:44:53.000000000 +0200 -@@ -79,10 +79,10 @@ - # if !defined(__SC__) && !defined(LINUX) - E long NDECL(random); - # endif --# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM) -+# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)) || defined(RANDOM) - E void FDECL(srandom, (unsigned int)); - # else --# if !defined(bsdi) && !defined(__FreeBSD__) -+# if !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) - E int FDECL(srandom, (unsigned int)); - # endif - # endif -@@ -132,7 +132,7 @@ - E void FDECL(qsort, (genericptr_t,size_t,size_t, - int(*)(const genericptr,const genericptr))); - #else --# if defined(BSD) || defined(ULTRIX) -+# if defined(BSD) || defined(ULTRIX) && !defined(__NetBSD__) - E int qsort(); - # else - # if !defined(LATTICE) && !defined(AZTEC_50) -@@ -421,7 +421,7 @@ - # ifdef HPUX - E unsigned int FDECL(strlen, (char *)); - # else --# if !(defined(ULTRIX_PROTO) && defined(__GNUC__)) -+# if !(defined(ULTRIX_PROTO) && defined(__GNUC__)) && !defined(__NetBSD__) && !defined(__DragonFly__) - E int FDECL(strlen, (const char *)); - # endif - # endif /* HPUX */ -@@ -521,7 +521,7 @@ - # endif - # endif - --# if defined(ULTRIX) || (defined(BSD) && defined(POSIX_TYPES)) || defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) || (defined(HPUX) && defined(_POSIX_SOURCE)) -+# if defined(ULTRIX) || (defined(BSD) && defined(POSIX_TYPES)) || defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) || (defined(HPUX) && defined(_POSIX_SOURCE)) || defined(__NetBSD__) - E time_t FDECL(time, (time_t *)); - # else - E long FDECL(time, (time_t *)); diff --git a/games/nethack-x11/patches/patch-ae b/games/nethack-x11/patches/patch-ae deleted file mode 100644 index 897d633eb7b..00000000000 --- a/games/nethack-x11/patches/patch-ae +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ae,v 1.3 2004/03/05 15:21:01 pooka Exp $ - ---- sys/unix/Makefile.doc.orig 2003-02-23 16:43:39.000000000 +0200 -+++ sys/unix/Makefile.doc 2003-03-01 16:36:19.000000000 +0200 -@@ -38,7 +38,7 @@ - - - GAME = nethack --MANDIR = /usr/man/man6 -+MANDIR = $(PREFIX)/man/man6 - MANEXT = 6 - - # manual installation for most BSD-style systems diff --git a/games/nethack-x11/patches/patch-af b/games/nethack-x11/patches/patch-af deleted file mode 100644 index be80d38a973..00000000000 --- a/games/nethack-x11/patches/patch-af +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-af,v 1.4 2004/03/05 15:21:01 pooka Exp $ - ---- include/unixconf.h.orig 2003-12-08 01:39:13.000000000 +0200 -+++ include/unixconf.h 2004-03-05 15:47:53.000000000 +0200 -@@ -19,20 +19,20 @@ - */ - - /* define exactly one of the following four choices */ --/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */ -+#define BSD 1 /* define for 4.n/Free/Open/Net BSD */ - /* also for relatives like SunOS 4.x, DG/UX, and */ - /* older versions of Linux */ - /* #define ULTRIX */ /* define for Ultrix v3.0 or higher (but not lower) */ - /* Use BSD for < v3.0 */ - /* "ULTRIX" not to be confused with "ultrix" */ --#define SYSV /* define for System V, Solaris 2.x, newer versions */ -+/* #define SYSV */ /* define for System V, Solaris 2.x, newer versions */ - /* of Linux */ - /* #define HPUX */ /* Hewlett-Packard's Unix, version 6.5 or higher */ - /* use SYSV for < v6.5 */ - - - /* define any of the following that are appropriate */ --#define SVR4 /* use in addition to SYSV for System V Release 4 */ -+/* #define SVR4 */ /* use in addition to SYSV for System V Release 4 */ - /* including Solaris 2+ */ - #define NETWORK /* if running on a networked system */ - /* e.g. Suns sharing a playground through NFS */ -@@ -47,7 +47,7 @@ - * job control (note that AIX is SYSV otherwise) - * Also define this for AIX 3.2 */ - --#define TERMINFO /* uses terminfo rather than termcap */ -+/* #define TERMINFO /* uses terminfo rather than termcap */ - /* Should be defined for most SYSV, SVR4 (including - * Solaris 2+), HPUX, and Linux systems. In - * particular, it should NOT be defined for the UNIXPC -@@ -171,7 +171,7 @@ - # ifdef AMS - #define AMS_MAILBOX "/Mailbox" - # else --# if defined(__FreeBSD__) || defined(__OpenBSD__) -+# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #define DEF_MAILREADER "/usr/bin/mail" - # else - #define DEF_MAILREADER "/usr/ucb/Mail" diff --git a/games/nethack-x11/patches/patch-ag b/games/nethack-x11/patches/patch-ag deleted file mode 100644 index 380089daeb9..00000000000 --- a/games/nethack-x11/patches/patch-ag +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ag,v 1.4 2004/03/05 15:21:01 pooka Exp $ - ---- src/mail.c.orig Wed Aug 9 21:02:04 2000 -+++ src/mail.c Thu Aug 10 18:32:30 2000 -@@ -71,7 +71,7 @@ - # if !defined(MAILPATH) && (defined(LINUX) || defined(__osf__)) - # define MAILPATH "/var/spool/mail/" - # endif --# if !defined(MAILPATH) && defined(__FreeBSD__) -+# if !defined(MAILPATH) && (defined(__FreeBSD__) || defined(__NetBSD__)) - # define MAILPATH "/var/mail/" - # endif - # if !defined(MAILPATH) && (defined(BSD) || defined(ULTRIX)) diff --git a/games/nethack-x11/patches/patch-ah b/games/nethack-x11/patches/patch-ah deleted file mode 100644 index 4b4b3d22035..00000000000 --- a/games/nethack-x11/patches/patch-ah +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-ah,v 1.4 2003/09/02 00:30:57 pooka Exp $ - ---- sys/unix/Makefile.src.orig 2003-08-30 03:08:04.000000000 +0300 -+++ sys/unix/Makefile.src 2003-09-02 03:08:18.000000000 +0300 -@@ -151,8 +151,8 @@ - # flags for debugging: - # CFLAGS = -g -I../include - --CFLAGS = -O -I../include --LFLAGS = -+CFLAGS += -I../include -I${X11BASE}/include -+LFLAGS = ${LDFLAGS} - - # The Qt and Be window systems are written in C++, while the rest of - # NetHack is standard C. If using Qt, uncomment the LINK line here to get -@@ -214,8 +214,8 @@ - - # - # --WINSRC = $(WINTTYSRC) --WINOBJ = $(WINTTYOBJ) -+WINSRC = $(WINX11SRC) -+WINOBJ = $(WINX11OBJ) - - # on some systems the termcap library is in -ltermcap or -lcurses - # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead -@@ -235,7 +235,7 @@ - # - # libraries for X11 - # If USE_XPM is defined in config.h, you will also need -lXpm here. --WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -+WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm - # WINX11LIB = -lXaw -lXmu -lXt -lX11 - # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm - # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0 -@@ -255,7 +255,7 @@ - # libraries for BeOS - WINBELIB = -lbe - --WINLIB = $(WINTTYLIB) -+WINLIB = $(WINX11LIB) - - # any other strange libraries your system needs (for Sysunix only -- the more - # specialized targets should already be right) diff --git a/games/nethack/Makefile b/games/nethack/Makefile index 6a52d57a564..b80615498d3 100644 --- a/games/nethack/Makefile +++ b/games/nethack/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.25 2009/04/08 23:02:27 joerg Exp $ +# $NetBSD: Makefile,v 1.26 2011/06/01 11:20:29 wiz Exp $ -META_PACKAGE= # empty +META_PACKAGE= yes .include "../../games/nethack-lib/Makefile.common" @@ -8,7 +8,7 @@ DISTNAME= nethack-all-${NETHACK_VERSION} PKGREVISION= 3 CATEGORIES+= x11 -COMMENT= Meta-package for NetHack with x11, qt and tty versions +COMMENT= Meta-package for NetHack with x11, Qt, and tty versions DEPENDS+= nethack-tty-${NETHACK_VERSION}{,nb*}:../../games/nethack-tty DEPENDS+= nethack-x11-${NETHACK_VERSION}{,nb*}:../../games/nethack-x11 |