DESTDIRify nethack. Merge patches and distinfo. Some other improvements. >From Rhialto in PR 45010.diff -r1.25 -r1.26 pkgsrc/games/nethack/Makefile
(wiz)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.25 2009/04/08 23:02:27 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.26 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | META_PACKAGE= # empty | 3 | META_PACKAGE= yes | |
4 | 4 | |||
5 | .include "../../games/nethack-lib/Makefile.common" | 5 | .include "../../games/nethack-lib/Makefile.common" | |
6 | 6 | |||
7 | DISTNAME= nethack-all-${NETHACK_VERSION} | 7 | DISTNAME= nethack-all-${NETHACK_VERSION} | |
8 | PKGREVISION= 3 | 8 | PKGREVISION= 3 | |
9 | CATEGORIES+= x11 | 9 | CATEGORIES+= x11 | |
10 | 10 | |||
11 | COMMENT= Meta-package for NetHack with x11, qt and tty versions | 11 | COMMENT= Meta-package for NetHack with x11, Qt, and tty versions | |
12 | 12 | |||
13 | DEPENDS+= nethack-tty-${NETHACK_VERSION}{,nb*}:../../games/nethack-tty | 13 | DEPENDS+= nethack-tty-${NETHACK_VERSION}{,nb*}:../../games/nethack-tty | |
14 | DEPENDS+= nethack-x11-${NETHACK_VERSION}{,nb*}:../../games/nethack-x11 | 14 | DEPENDS+= nethack-x11-${NETHACK_VERSION}{,nb*}:../../games/nethack-x11 | |
15 | DEPENDS+= nethack-qt-${NETHACK_VERSION}{,nb*}:../../games/nethack-qt | 15 | DEPENDS+= nethack-qt-${NETHACK_VERSION}{,nb*}:../../games/nethack-qt | |
16 | 16 | |||
17 | .include "../../mk/bsd.pkg.mk" | 17 | .include "../../mk/bsd.pkg.mk" |
@@ -1,36 +1,39 @@ | @@ -1,36 +1,39 @@ | |||
1 | # $NetBSD: Makefile,v 1.26 2008/09/25 14:02:09 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.27 2011/06/01 11:20:29 wiz Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | .include "../../games/nethack-lib/Makefile.common" | 4 | .include "../../games/nethack-lib/Makefile.common" | |
5 | 5 | |||
6 | PKGNAME= nethack-lib-${NETHACK_VERSION} | 6 | PKGNAME= nethack-lib-${NETHACK_VERSION} | |
7 | PKGREVISION= 2 | 7 | PKGREVISION= 3 | |
8 | 8 | |||
9 | COMMENT= Data files for Nethack | 9 | COMMENT= Data files for Nethack | |
10 | 10 | |||
11 | HAS_CONFIGURE= yes | 11 | HAS_CONFIGURE= yes | |
12 | CONFIGURE_SCRIPT= ./sys/unix/setup.sh | 12 | CONFIGURE_SCRIPT= ./sys/unix/setup.sh | |
13 | BUILD_TARGET= datastuff | 13 | BUILD_TARGET= datastuff | |
14 | INSTALL_TARGET= manpages install-dat | 14 | INSTALL_TARGET= manpages install-dat | |
15 | INSTALLATION_DIRS= ${PKGMANDIR}/man6 | 15 | INSTALLATION_DIRS= ${PKGMANDIR}/man6 | |
16 | 16 | |||
17 | # Special handling for the scorefiles: we do not want to delete | 17 | # Special handling for the scorefiles: we do not want to delete | |
18 | # them between package installations and deinstallations. | 18 | # them between package installations and deinstallations. | |
19 | # | 19 | # | |
20 | # These should eventually migrate to a better location, but keep them | 20 | # These should eventually migrate to a better location, but keep them | |
21 | # here for now until we lose backward compatibility because of changes | 21 | # here for now until we lose backward compatibility because of changes | |
22 | # to the fileformat. | 22 | # to the fileformat. | |
23 | CONF_FILES_PERMS+= /dev/null ${PREFIX}/share/${NETHACK_DIR}/record \ | 23 | CONF_FILES_PERMS+= /dev/null ${VARDIR}/logfile \ | |
24 | ${ROOT_USER} ${NETHACK_GROUP} 664 | 24 | ${NETHACK_USER} ${NETHACK_GROUP} 664 | |
25 | CONF_FILES_PERMS+= /dev/null ${PREFIX}/share/${NETHACK_DIR}/logfile \ | 25 | CONF_FILES_PERMS+= /dev/null ${VARDIR}/perm \ | |
26 | ${ROOT_USER} ${NETHACK_GROUP} 664 | 26 | ${NETHACK_USER} ${NETHACK_GROUP} 664 | |
27 | 27 | CONF_FILES_PERMS+= /dev/null ${VARDIR}/record \ | ||
28 | REQD_DIRS_PERMS+= ${PREFIX}/share/${NETHACK_DIR} \ | 28 | ${NETHACK_USER} ${NETHACK_GROUP} 664 | |
29 | ${ROOT_USER} ${NETHACK_GROUP} 775 | 29 | ||
30 | REQD_DIRS_PERMS+= ${PREFIX}/share/${NETHACK_DIR}/save \ | 30 | REQD_DIRS_PERMS+= ${VARDIR} \ | |
31 | ${ROOT_USER} ${NETHACK_GROUP} 770 | 31 | ${NETHACK_USER} ${NETHACK_GROUP} 775 | |
32 | 32 | REQD_DIRS_PERMS+= ${VARDIR}/save \ | ||
33 | CHECK_FILES_SKIP+= ${PREFIX}/share/${NETHACK_DIR}/logfile \ | 33 | ${NETHACK_USER} ${NETHACK_GROUP} 770 | |
34 | ${PREFIX}/share/${NETHACK_DIR}/record | 34 | ||
35 | CHECK_FILES_SKIP+= ${VARDIR}/logfile \ | |||
36 | ${VARDIR}/perm \ | |||
37 | ${VARDIR}/record | |||
35 | 38 | |||
36 | .include "../../mk/bsd.pkg.mk" | 39 | .include "../../mk/bsd.pkg.mk" |
@@ -1,62 +1,77 @@ | @@ -1,62 +1,77 @@ | |||
1 | # $NetBSD: Makefile.common,v 1.26 2009/08/04 13:58:57 joerg Exp $ | 1 | # $NetBSD: Makefile.common,v 1.27 2011/06/01 11:20:29 wiz Exp $ | |
2 | # | 2 | # | |
3 | # used by games/nethack/Makefile | |||
4 | # used by games/nethack-lib/Makefile | |||
5 | # used by games/nethack-x11/Makefile | |||
6 | # used by games/nethack-tty/Makefile | |||
7 | # used by games/nethack-qt/Makefile | |||
3 | 8 | |||
4 | NETHACK_BASEVER= 3.4.3 | 9 | NETHACK_BASEVER= 3.4.3 | |
5 | NETHACK_VERSION= ${NETHACK_BASEVER} | 10 | NETHACK_VERSION= ${NETHACK_BASEVER} | |
6 | NETHACK_DISTVER= ${NETHACK_BASEVER:S/.//g} | 11 | NETHACK_DISTVER= ${NETHACK_BASEVER:S/.//g} | |
7 | NETHACK_DIR= nethackdir340 | 12 | NETHACK_DIR= nethackdir340 | |
8 | 13 | |||
9 | DISTNAME= nethack-${NETHACK_DISTVER}-src | 14 | DISTNAME= nethack-${NETHACK_DISTVER}-src | |
10 | CATEGORIES= games | 15 | CATEGORIES= games | |
11 | MASTER_SITES= ftp://ftp.sourceforge.net/pub/sourceforge/n/ne/nethack/ | 16 | MASTER_SITES= ftp://ftp.sourceforge.net/pub/sourceforge/n/ne/nethack/ | |
12 | EXTRACT_SUFX= .tgz | 17 | EXTRACT_SUFX= .tgz | |
13 | 18 | |||
14 | MAINTAINER= pooka@NetBSD.org | 19 | MAINTAINER= pooka@NetBSD.org | |
15 | HOMEPAGE= http://www.nethack.org/ | 20 | HOMEPAGE= http://www.nethack.org/ | |
21 | LICENSE= nethack-license | |||
16 | 22 | |||
17 | MAKE_JOBS_SAFE= no | 23 | MAKE_JOBS_SAFE= no | |
24 | PKG_DESTDIR_SUPPORT= user-destdir | |||
18 | 25 | |||
19 | .if !defined(META_PACKAGE) | 26 | .if !defined(META_PACKAGE) | |
20 | 27 | |||
21 | WRKSRC= ${WRKDIR}/nethack-${NETHACK_BASEVER} | 28 | WRKSRC= ${WRKDIR}/nethack-${NETHACK_BASEVER} | |
22 | HAS_CONFIGURE= yes | 29 | HAS_CONFIGURE= yes | |
23 | CONFIGURE_SCRIPT= ./sys/unix/setup.sh | 30 | CONFIGURE_SCRIPT= ./sys/unix/setup.sh | |
24 | USE_TOOLS+= gzip yacc lex | 31 | USE_TOOLS+= gzip yacc lex awk | |
25 | 32 | |||
26 | .include "../../mk/bsd.prefs.mk" | 33 | .include "../../mk/bsd.prefs.mk" | |
27 | 34 | |||
28 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" | 35 | .if ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" | |
29 | SUBST_CLASSES+= ttylib | 36 | SUBST_CLASSES+= ttylib | |
30 | SUBST_MESSAGE.ttylib= Configuring to use ncurses | 37 | SUBST_MESSAGE.ttylib= Configuring to use ncurses | |
31 | SUBST_STAGE.ttylib= post-patch | 38 | SUBST_STAGE.ttylib= post-patch | |
32 | SUBST_FILES.ttylib= sys/unix/Makefile.src | 39 | SUBST_FILES.ttylib= sys/unix/Makefile.src | |
33 | SUBST_SED.ttylib= -e 's,^WINTTYLIB = -ltermlib,WINTTYLIB = -lncurses,' | 40 | SUBST_SED.ttylib= -e 's,^WINTTYLIB = -ltermlib,WINTTYLIB = -lncurses,' | |
34 | .endif | 41 | .endif | |
35 | .include "../../mk/curses.buildlink3.mk" | 42 | .include "../../mk/curses.buildlink3.mk" | |
36 | 43 | |||
37 | .if ${OPSYS} == "Linux" | 44 | .if ${OPSYS} == "Linux" | |
38 | NETHACK_OS= SYSV | 45 | NETHACK_OS= SYSV | |
39 | .endif | 46 | .endif | |
40 | NETHACK_OS?= BSD | 47 | NETHACK_OS?= BSD | |
41 | 48 | |||
42 | SUBST_CLASSES+= os | 49 | SUBST_CLASSES+= os | |
43 | SUBST_MESSAGE.os= Configuring for $(NETHACK_OS) | 50 | SUBST_MESSAGE.os= Configuring for ${NETHACK_OS} | |
44 | SUBST_STAGE.os= post-patch | 51 | SUBST_STAGE.os= post-patch | |
45 | SUBST_FILES.os= include/unixconf.h | 52 | SUBST_FILES.os= include/unixconf.h | |
46 | SUBST_SED.os= -e 's,__NETHACK_OS__,${NETHACK_OS},' | 53 | SUBST_SED.os= -e 's,__NETHACK_OS__,${NETHACK_OS},' | |
47 | 54 | |||
48 | NETHACK_GROUP= games | 55 | USE_GAMESGROUP= yes | |
49 | PKG_GROUPS= ${NETHACK_GROUP} | 56 | NETHACK_USER= ${GAMES_USER} | |
57 | NETHACK_GROUP= ${GAMES_GROUP} | |||
58 | BUILD_DEFS+= GAMES_USER GAMES_GROUP | |||
59 | GAMEPERM= ${NETHACK_USER} ${NETHACK_GROUP} 2555 | |||
60 | ||||
61 | GAMEDIR= ${PREFIX}/share/${NETHACK_DIR} | |||
62 | VARDIR= /var/games/nethack340 | |||
63 | MAKE_ENV+= GAMEDIR=${GAMEDIR:Q} | |||
64 | MAKE_ENV+= VARDIR=${VARDIR:Q} | |||
50 | 65 | |||
51 | pre-configure: | 66 | pre-configure: | |
52 | @${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh | 67 | @${CHMOD} 755 ${WRKSRC}/sys/unix/setup.sh | |
53 | 68 | |||
54 | post-patch: | 69 | post-patch: | |
55 | @${MV} ${WRKSRC}/include/config.h ${WRKSRC}/config.h-pre | 70 | @${MV} ${WRKSRC}/include/config.h ${WRKSRC}/config.h-pre | |
56 | @${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' \ | 71 | @${SED} -e 's|@PREFIX@|${PREFIX}|g' \ | |
57 | -e 's|@GZIP_PROGRAM@|'`${ECHO} ${GZIP_CMD} \ | 72 | -e 's|@GZIP_PROGRAM@|'`${ECHO} ${GZIP_CMD} \ | |
58 | | ${AWK} '{ print $$1 }'`'|g' \ | 73 | | ${AWK} '{ print $$1 }'`'|g' \ | |
59 | < ${WRKSRC}/config.h-pre > ${WRKSRC}/include/config.h | 74 | < ${WRKSRC}/config.h-pre > ${WRKSRC}/include/config.h | |
60 | @${RM} -f ${WRKSRC}/config.h-pre | 75 | @${RM} -f ${WRKSRC}/config.h-pre | |
61 | 76 | |||
62 | .endif # !NO_BUILD | 77 | .endif # !NO_BUILD |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.7 2009/06/14 17:56:52 joerg Exp $ | 1 | @comment $NetBSD: PLIST,v 1.8 2011/06/01 11:20:29 wiz Exp $ | |
2 | bin/nethack | 2 | bin/nethack | |
3 | bin/recover | 3 | bin/recover | |
4 | man/man6/dgn_comp.6 | 4 | man/man6/dgn_comp.6 | |
5 | man/man6/dlb.6 | 5 | man/man6/dlb.6 | |
6 | man/man6/lev_comp.6 | 6 | man/man6/lev_comp.6 | |
7 | man/man6/nethack.6 | 7 | man/man6/nethack.6 | |
8 | man/man6/recover.6 | 8 | man/man6/recover.6 | |
9 | share/doc/nethack/Guidebook | 9 | share/doc/nethack/Guidebook | |
10 | share/nethackdir340/Arc-fila.lev | 10 | share/nethackdir340/Arc-fila.lev | |
11 | share/nethackdir340/Arc-filb.lev | 11 | share/nethackdir340/Arc-filb.lev | |
12 | share/nethackdir340/Arc-goal.lev | 12 | share/nethackdir340/Arc-goal.lev | |
13 | share/nethackdir340/Arc-loca.lev | 13 | share/nethackdir340/Arc-loca.lev | |
14 | share/nethackdir340/Arc-strt.lev | 14 | share/nethackdir340/Arc-strt.lev | |
@@ -103,27 +103,26 @@ share/nethackdir340/minend-2.lev | @@ -103,27 +103,26 @@ share/nethackdir340/minend-2.lev | |||
103 | share/nethackdir340/minend-3.lev | 103 | share/nethackdir340/minend-3.lev | |
104 | share/nethackdir340/minetn-1.lev | 104 | share/nethackdir340/minetn-1.lev | |
105 | share/nethackdir340/minetn-2.lev | 105 | share/nethackdir340/minetn-2.lev | |
106 | share/nethackdir340/minetn-3.lev | 106 | share/nethackdir340/minetn-3.lev | |
107 | share/nethackdir340/minetn-4.lev | 107 | share/nethackdir340/minetn-4.lev | |
108 | share/nethackdir340/minetn-5.lev | 108 | share/nethackdir340/minetn-5.lev | |
109 | share/nethackdir340/minetn-6.lev | 109 | share/nethackdir340/minetn-6.lev | |
110 | share/nethackdir340/minetn-7.lev | 110 | share/nethackdir340/minetn-7.lev | |
111 | share/nethackdir340/opthelp | 111 | share/nethackdir340/opthelp | |
112 | share/nethackdir340/options | 112 | share/nethackdir340/options | |
113 | share/nethackdir340/oracle.lev | 113 | share/nethackdir340/oracle.lev | |
114 | share/nethackdir340/oracles | 114 | share/nethackdir340/oracles | |
115 | share/nethackdir340/orcus.lev | 115 | share/nethackdir340/orcus.lev | |
116 | share/nethackdir340/perm | |||
117 | share/nethackdir340/pet_mark.xbm | 116 | share/nethackdir340/pet_mark.xbm | |
118 | share/nethackdir340/quest.dat | 117 | share/nethackdir340/quest.dat | |
119 | share/nethackdir340/rip.xpm | 118 | share/nethackdir340/rip.xpm | |
120 | share/nethackdir340/rumors | 119 | share/nethackdir340/rumors | |
121 | share/nethackdir340/sanctum.lev | 120 | share/nethackdir340/sanctum.lev | |
122 | share/nethackdir340/soko1-1.lev | 121 | share/nethackdir340/soko1-1.lev | |
123 | share/nethackdir340/soko1-2.lev | 122 | share/nethackdir340/soko1-2.lev | |
124 | share/nethackdir340/soko2-1.lev | 123 | share/nethackdir340/soko2-1.lev | |
125 | share/nethackdir340/soko2-2.lev | 124 | share/nethackdir340/soko2-2.lev | |
126 | share/nethackdir340/soko3-1.lev | 125 | share/nethackdir340/soko3-1.lev | |
127 | share/nethackdir340/soko3-2.lev | 126 | share/nethackdir340/soko3-2.lev | |
128 | share/nethackdir340/soko4-1.lev | 127 | share/nethackdir340/soko4-1.lev | |
129 | share/nethackdir340/soko4-2.lev | 128 | share/nethackdir340/soko4-2.lev |
@@ -1,12 +1,15 @@ | @@ -1,12 +1,15 @@ | |||
1 | $NetBSD: distinfo,v 1.16 2008/05/20 19:47:16 tnn Exp $ | 1 | $NetBSD: distinfo,v 1.17 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd | 3 | SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd | |
4 | RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95 | 4 | RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95 | |
5 | Size (nethack-343-src.tgz) = 3497458 bytes | 5 | Size (nethack-343-src.tgz) = 3497458 bytes | |
6 | SHA1 (patch-aa) = ed5c55651acf81c459867c99026e13a6c5ed34a0 | 6 | SHA1 (patch-aa) = 31d89b27e52189de9a51fbb04f1ed390c5377b2b | |
7 | SHA1 (patch-ab) = 73a1ac287ded70f371bb38c82cdbcd36182ce3a5 | 7 | SHA1 (patch-ab) = 49947b960f2b7871fc798398d1c1ceab8d462ec9 | |
8 | SHA1 (patch-ac) = e447b4c60ef7db7cfcd35a9be8b8d2f86fc0c27b | 8 | SHA1 (patch-ac) = 50cac811281c629edf2a72e523b62b51f8c3c840 | |
9 | SHA1 (patch-ad) = 05bb391eb0e4382c906251bc8b8627124873a7a0 | 9 | SHA1 (patch-ad) = be56ef8459f3273a0b316bb94e0ae7397a53c37f | |
10 | SHA1 (patch-ae) = ff98bb6b76795b7ae69c3602f70a1a597c28633c | 10 | SHA1 (patch-ae) = 8530c1e033f2522e05b699db36d84f77ecf886be | |
11 | SHA1 (patch-af) = e4723716f326df242279953b6091e528eb7e0007 | 11 | SHA1 (patch-af) = a567c4c664f135ad24f3f0069ddc29bf5b950b21 | |
12 | SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674 | 12 | SHA1 (patch-ag) = 5bf322fb92a3cd9df9559e56265f0477d9e92487 | |
13 | SHA1 (patch-ai) = 73c5b2ea1227531089474705f2f18bc411366365 | |||
14 | SHA1 (patch-sys_unix_Makefile.src) = 003f16fba997ac61efc92adecc13b883135a86bc | |||
15 | SHA1 (patch-sys_unix_Makefile.utl) = 409e1f8b58c7e2709d224f42c19fdfd162d9cea7 |
@@ -1,38 +1,75 @@ | @@ -1,38 +1,75 @@ | |||
1 | $NetBSD: patch-aa,v 1.9 2004/03/05 15:21:01 pooka Exp $ | 1 | $NetBSD: patch-aa,v 1.10 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | --- include/config.h.old 2004-03-05 15:39:59.000000000 +0200 | 3 | Make configurable. | |
4 | +++ include/config.h 2004-03-05 15:40:05.000000000 +0200 | 4 | ||
5 | @@ -169,11 +169,11 @@ | 5 | --- include/config.h.orig 2003-12-07 23:39:13.000000000 +0000 | |
6 | +++ include/config.h | |||
7 | @@ -42,6 +42,16 @@ | |||
8 | * Define all of those you want supported in your binary. | |||
9 | * Some combinations make no sense. See the installation document. | |||
10 | */ | |||
11 | +#if defined(GTYPE_TTY) | |||
12 | +# define DEFAULT_WINDOW_SYS "tty" | |||
13 | +#elif defined(GTYPE_X11) | |||
14 | +# define X11_GRAPHICS | |||
15 | +# define DEFAULT_WINDOW_SYS "x11" | |||
16 | +#elif defined(GTYPE_QT) | |||
17 | +# define QT_GRAPHICS | |||
18 | +# define DEFAULT_WINDOW_SYS "Qt" | |||
19 | +#endif | |||
20 | + | |||
21 | #define TTY_GRAPHICS /* good old tty based graphics */ | |||
22 | /* #define X11_GRAPHICS */ /* X11 interface */ | |||
23 | /* #define QT_GRAPHICS */ /* Qt interface */ | |||
24 | @@ -86,7 +96,7 @@ | |||
25 | # define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */ | |||
26 | # define USER_SOUNDS /* Use sounds */ | |||
27 | # ifndef __APPLE__ | |||
28 | -# define USER_SOUNDS_REGEX | |||
29 | +/*# define USER_SOUNDS_REGEX */ | |||
30 | # endif | |||
31 | # define USE_XPM /* Use XPM format for images (required) */ | |||
32 | # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ | |||
33 | @@ -126,7 +136,7 @@ | |||
34 | * would allow: | |||
35 | * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm | |||
36 | */ | |||
37 | -/* # define USE_XPM */ /* Disable if you do not have the XPM library */ | |||
38 | +# define USE_XPM /* Disable if you do not have the XPM library */ | |||
39 | # ifdef USE_XPM | |||
40 | # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ | |||
41 | # endif | |||
42 | @@ -169,11 +179,11 @@ | |||
6 | 43 | |||
7 | #ifdef UNIX | 44 | #ifdef UNIX | |
8 | /* path and file name extension for compression program */ | 45 | /* path and file name extension for compression program */ | |
9 | -#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ | 46 | -#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ | |
10 | -#define COMPRESS_EXTENSION ".Z" /* compress's extension */ | 47 | -#define COMPRESS_EXTENSION ".Z" /* compress's extension */ | |
11 | +/* #define COMPRESS "/usr/bin/compress"*/ /* Lempel-Ziv compression */ | 48 | +/* #define COMPRESS "/usr/bin/compress"*/ /* Lempel-Ziv compression */ | |
12 | +/* #define COMPRESS_EXTENSION ".Z"*/ /* compress's extension */ | 49 | +/* #define COMPRESS_EXTENSION ".Z"*/ /* compress's extension */ | |
13 | /* An example of one alternative you might want to use: */ | 50 | /* An example of one alternative you might want to use: */ | |
14 | -/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ | 51 | -/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ | |
15 | -/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ | 52 | -/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ | |
16 | +#define COMPRESS "@GZIP_PROGRAM@" /* FSF gzip compression */ | 53 | +#define COMPRESS "@GZIP_PROGRAM@" /* FSF gzip compression */ | |
17 | +#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */ | 54 | +#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */ | |
18 | #endif | 55 | #endif | |
19 | 56 | |||
20 | #ifndef COMPRESS | 57 | #ifndef COMPRESS | |
21 | @@ -204,7 +204,7 @@ | 58 | @@ -204,7 +214,7 @@ | |
22 | * otherwise it will be the current directory. | 59 | * otherwise it will be the current directory. | |
23 | */ | 60 | */ | |
24 | # ifndef HACKDIR | 61 | # ifndef HACKDIR | |
25 | -# define HACKDIR "/usr/games/lib/nethackdir" | 62 | -# define HACKDIR "/usr/games/lib/nethackdir" | |
26 | +# define HACKDIR "XXXPREFIXXXX/share/nethackdir340" | 63 | +# define HACKDIR "@PREFIX@/share/nethackdir340" | |
27 | # endif | 64 | # endif | |
28 | 65 | |||
29 | /* | 66 | /* | |
30 | @@ -300,7 +300,7 @@ | 67 | @@ -300,7 +310,7 @@ typedef unsigned char uchar; | |
31 | * functions that have been macroized. | 68 | * functions that have been macroized. | |
32 | */ | 69 | */ | |
33 | 70 | |||
34 | -/* #define VISION_TABLES */ /* use vision tables generated at compile time */ | 71 | -/* #define VISION_TABLES */ /* use vision tables generated at compile time */ | |
35 | +#define VISION_TABLES /* use vision tables generated at compile time */ | 72 | +#define VISION_TABLES /* use vision tables generated at compile time */ | |
36 | #ifndef VISION_TABLES | 73 | #ifndef VISION_TABLES | |
37 | # ifndef NO_MACRO_CPATH | 74 | # ifndef NO_MACRO_CPATH | |
38 | # define MACRO_CPATH /* use clear_path macros instead of functions */ | 75 | # define MACRO_CPATH /* use clear_path macros instead of functions */ |
@@ -1,14 +1,16 @@ | @@ -1,14 +1,16 @@ | |||
1 | $NetBSD: patch-ac,v 1.9 2006/06/19 17:07:45 minskim Exp $ | 1 | $NetBSD: patch-ac,v 1.10 2011/06/01 11:20:29 wiz Exp $ | |
2 | ||||
3 | Fix for NetBSD. | |||
2 | 4 | |||
3 | --- include/system.h.orig 2003-12-07 15:39:13.000000000 -0800 | 5 | --- include/system.h.orig 2003-12-07 15:39:13.000000000 -0800 | |
4 | +++ include/system.h | 6 | +++ include/system.h | |
5 | @@ -79,10 +79,10 @@ typedef long off_t; | 7 | @@ -79,10 +79,10 @@ typedef long off_t; | |
6 | # if !defined(__SC__) && !defined(LINUX) | 8 | # if !defined(__SC__) && !defined(LINUX) | |
7 | E long NDECL(random); | 9 | E long NDECL(random); | |
8 | # endif | 10 | # endif | |
9 | -# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM) | 11 | -# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__FreeBSD__)) || defined(RANDOM) | |
10 | +# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)) || defined(RANDOM) | 12 | +# if (!defined(SUNOS4) && !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__APPLE__)) || defined(RANDOM) | |
11 | E void FDECL(srandom, (unsigned int)); | 13 | E void FDECL(srandom, (unsigned int)); | |
12 | # else | 14 | # else | |
13 | -# if !defined(bsdi) && !defined(__FreeBSD__) | 15 | -# if !defined(bsdi) && !defined(__FreeBSD__) | |
14 | +# if !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__APPLE__) | 16 | +# if !defined(bsdi) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__APPLE__) |
@@ -1,121 +1,242 @@ | @@ -1,121 +1,242 @@ | |||
1 | $NetBSD: patch-ab,v 1.11 2004/03/05 15:21:01 pooka Exp $ | 1 | $NetBSD: patch-ab,v 1.12 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | --- sys/unix/Makefile.top.orig 2003-12-08 01:39:13.000000000 +0200 | 3 | Make configurable. | |
4 | +++ sys/unix/Makefile.top 2004-03-05 15:40:57.000000000 +0200 | 4 | ||
5 | @@ -14,18 +14,17 @@ | 5 | --- sys/unix/Makefile.top.orig 2003-12-07 23:39:13.000000000 +0000 | |
6 | +++ sys/unix/Makefile.top | |||
7 | @@ -14,18 +14,18 @@ | |||
6 | # MAKE = make | 8 | # MAKE = make | |
7 | 9 | |||
8 | # make NetHack | 10 | # make NetHack | |
9 | -PREFIX = /usr | 11 | -PREFIX = /usr | |
10 | GAME = nethack | 12 | GAME = nethack | |
11 | # GAME = nethack.prg | 13 | # GAME = nethack.prg | |
12 | -GAMEUID = games | 14 | -GAMEUID = games | |
13 | -GAMEGRP = bin | 15 | -GAMEGRP = bin | |
14 | +GAMEUID = root | 16 | +GAMEUID = root | |
15 | +GAMEGRP = games | 17 | +GAMEGRP = games | |
16 | 18 | |||
17 | # Permissions - some places use setgid instead of setuid, for instance | 19 | # Permissions - some places use setgid instead of setuid, for instance | |
18 | # See also the option "SECURE" in include/config.h | 20 | # See also the option "SECURE" in include/config.h | |
19 | -GAMEPERM = 04755 | 21 | -GAMEPERM = 04755 | |
20 | -FILEPERM = 0644 | |||
21 | +GAMEPERM = 2755 | 22 | +GAMEPERM = 2755 | |
22 | +FILEPERM = 0664 | 23 | FILEPERM = 0644 | |
24 | +VARFILEPERM = 0664 | |||
23 | EXEPERM = 0755 | 25 | EXEPERM = 0755 | |
24 | -DIRPERM = 0755 | 26 | -DIRPERM = 0755 | |
25 | +DIRPERM = 0775 | 27 | +DIRPERM = 0775 | |
26 | 28 | |||
27 | # GAMEDIR also appears in config.h as "HACKDIR". | 29 | # GAMEDIR also appears in config.h as "HACKDIR". | |
28 | # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR | 30 | # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR | |
29 | @@ -35,12 +34,12 @@ | 31 | @@ -35,12 +35,12 @@ DIRPERM = 0755 | |
30 | # therefore there should not be anything in GAMEDIR that you want to keep | 32 | # therefore there should not be anything in GAMEDIR that you want to keep | |
31 | # (if there is, you'll have to do the installation by hand or modify the | 33 | # (if there is, you'll have to do the installation by hand or modify the | |
32 | # instructions) | 34 | # instructions) | |
33 | -GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir | 35 | -GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir | |
34 | +GAMEDIR = $(PREFIX)/share/$(GAME)dir340 | 36 | -VARDIR = $(GAMEDIR) | |
35 | VARDIR = $(GAMEDIR) | |||
36 | -SHELLDIR = $(PREFIX)/games | 37 | -SHELLDIR = $(PREFIX)/games | |
38 | +GAMEDIR ?= $(PREFIX)/share/$(GAME)dir340 | |||
39 | +VARDIR ?= /var/games/nethack340 | |||
37 | +SHELLDIR = $(PREFIX)/bin | 40 | +SHELLDIR = $(PREFIX)/bin | |
38 | 41 | |||
39 | # per discussion in Install.X11 and Install.Qt | 42 | # per discussion in Install.X11 and Install.Qt | |
40 | -VARDATND = | 43 | -VARDATND = | |
41 | +VARDATND = pet_mark.xbm rip.xpm | 44 | +VARDATND = pet_mark.xbm rip.xpm | |
42 | # VARDATND = x11tiles NetHack.ad pet_mark.xbm | 45 | # VARDATND = x11tiles NetHack.ad pet_mark.xbm | |
43 | # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm | 46 | # VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm | |
44 | # for Atari/Gem | 47 | # for Atari/Gem | |
45 | @@ -87,9 +86,12 @@ | 48 | @@ -64,8 +64,8 @@ VARDAT = $(VARDATD) $(VARDATND) | |
49 | # other permission-related reasons. If that happens, you may want to set the | |||
50 | # command to "true", which is a no-op. Note that disabling chown or chgrp | |||
51 | # will only work if setuid (or setgid) behavior is not desired or required. | |||
52 | -CHOWN = chown | |||
53 | -CHGRP = chgrp | |||
54 | +CHOWN = : # chown | |||
55 | +CHGRP = : # chgrp | |||
56 | ||||
57 | # | |||
58 | # end of configuration | |||
59 | @@ -87,9 +87,12 @@ DAT = $(DATNODLB) $(DATDLB) | |||
46 | $(GAME): | 60 | $(GAME): | |
47 | ( cd src ; $(MAKE) ) | 61 | ( cd src ; $(MAKE) ) | |
48 | 62 | |||
49 | -all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb | 63 | -all: $(GAME) recover Guidebook $(VARDAT) dungeon spec_levs check-dlb | |
50 | +all: $(GAME) datastuff | 64 | +all: $(GAME) datastuff | |
51 | @echo "Done." | 65 | @echo "Done." | |
52 | 66 | |||
53 | +datastuff: recover Guidebook $(VARDAT) dungeon spec_levs check-dlb | 67 | +datastuff: recover Guidebook $(VARDAT) dungeon spec_levs check-dlb | |
54 | + @echo "Data Sets Built." | 68 | + @echo "Data Sets Built." | |
55 | + | 69 | + | |
56 | # Note: many of the dependencies below are here to allow parallel make | 70 | # Note: many of the dependencies below are here to allow parallel make | |
57 | # to generate valid output | 71 | # to generate valid output | |
58 | 72 | |||
59 | @@ -183,18 +185,15 @@ | 73 | @@ -99,20 +102,20 @@ Guidebook: | |
74 | manpages: | |||
75 | ( cd doc ; $(MAKE) manpages ) | |||
76 | ||||
77 | -data: $(GAME) | |||
78 | +data: # $(GAME) | |||
79 | ( cd dat ; $(MAKE) data ) | |||
80 | ||||
81 | -rumors: $(GAME) | |||
82 | +rumors: # $(GAME) | |||
83 | ( cd dat ; $(MAKE) rumors ) | |||
84 | ||||
85 | -oracles: $(GAME) | |||
86 | +oracles: # $(GAME) | |||
87 | ( cd dat ; $(MAKE) oracles ) | |||
88 | ||||
89 | # Note: options should have already been made with make, but... | |||
90 | -options: $(GAME) | |||
91 | +options: # $(GAME) | |||
92 | ( cd dat ; $(MAKE) options ) | |||
93 | ||||
94 | -quest.dat: $(GAME) | |||
95 | +quest.dat: # $(GAME) | |||
96 | ( cd dat ; $(MAKE) quest.dat ) | |||
97 | ||||
98 | spec_levs: dungeon | |||
99 | @@ -120,22 +123,22 @@ spec_levs: dungeon | |||
100 | ( cd dat ; $(MAKE) spec_levs ) | |||
101 | ( cd dat ; $(MAKE) quest_levs ) | |||
102 | ||||
103 | -dungeon: $(GAME) | |||
104 | +dungeon: # $(GAME) | |||
105 | ( cd util ; $(MAKE) dgn_comp ) | |||
106 | ( cd dat ; $(MAKE) dungeon ) | |||
107 | ||||
108 | -nhtiles.bmp: $(GAME) | |||
109 | +nhtiles.bmp: # $(GAME) | |||
110 | ( cd dat ; $(MAKE) nhtiles.bmp ) | |||
111 | ||||
112 | -x11tiles: $(GAME) | |||
113 | +x11tiles: # $(GAME) | |||
114 | ( cd util ; $(MAKE) tile2x11 ) | |||
115 | ( cd dat ; $(MAKE) x11tiles ) | |||
116 | ||||
117 | -beostiles: $(GAME) | |||
118 | +beostiles: # $(GAME) | |||
119 | ( cd util ; $(MAKE) tile2beos ) | |||
120 | ( cd dat ; $(MAKE) beostiles ) | |||
121 | ||||
122 | -NetHack.ad: $(GAME) | |||
123 | +NetHack.ad: # $(GAME) | |||
124 | ( cd dat ; $(MAKE) NetHack.ad ) | |||
125 | ||||
126 | pet_mark.xbm: | |||
127 | @@ -150,7 +153,7 @@ mapbg.xpm: | |||
128 | nhsplash.xpm: | |||
129 | ( cd dat ; $(MAKE) nhsplash.xpm ) | |||
130 | ||||
131 | -nh16.img: $(GAME) | |||
132 | +nh16.img: # $(GAME) | |||
133 | ( cd util ; $(MAKE) tile2img.ttp ) | |||
134 | ( cd dat ; $(MAKE) nh16.img ) | |||
135 | ||||
136 | @@ -172,7 +175,7 @@ dlb: | |||
137 | ||||
138 | # recover can be used when INSURANCE is defined in include/config.h | |||
139 | # and the checkpoint option is true | |||
140 | -recover: $(GAME) | |||
141 | +recover: # $(GAME) | |||
142 | ( cd util ; $(MAKE) recover ) | |||
143 | ||||
144 | dofiles: | |||
145 | @@ -183,34 +186,31 @@ dofiles: | |||
60 | -e '}' \ | 146 | -e '}' \ | |
61 | -e '$$s/.*/nodlb/p' < dat/options` ; \ | 147 | -e '$$s/.*/nodlb/p' < dat/options` ; \ | |
62 | $(MAKE) dofiles-$${target-nodlb} | 148 | $(MAKE) dofiles-$${target-nodlb} | |
63 | - cp src/$(GAME) $(GAMEDIR) | 149 | - cp src/$(GAME) $(GAMEDIR) | |
64 | - cp util/recover $(GAMEDIR) | 150 | - cp util/recover $(GAMEDIR) | |
65 | + cp util/recover $(PREFIX)/bin | 151 | - -rm -f $(SHELLDIR)/$(GAME) | |
66 | -rm -f $(SHELLDIR)/$(GAME) | 152 | - sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ | |
67 | sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ | 153 | + cp util/recover $(DESTDIR)$(PREFIX)/bin | |
154 | + -rm -f $(DESTDIR)$(SHELLDIR)/$(GAME) | |||
155 | + sed -e 's;@GAMEDIR@;$(GAMEDIR);' \ | |||
68 | -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ | 156 | -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ | |
69 | + -e 's;XXXPREFIXXXX;$(PREFIX);' \ | 157 | + -e 's;@PREFIX@;$(PREFIX);' \ | |
70 | < sys/unix/nethack.sh \ | 158 | < sys/unix/nethack.sh \ | |
71 | > $(SHELLDIR)/$(GAME) | 159 | - > $(SHELLDIR)/$(GAME) | |
160 | + > $(DESTDIR)$(SHELLDIR)/$(GAME) | |||
72 | # set up their permissions | 161 | # set up their permissions | |
73 | - -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ | 162 | - -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ | |
74 | - $(CHGRP) $(GAMEGRP) $(GAME) recover ) | 163 | - $(CHGRP) $(GAMEGRP) $(GAME) recover ) | |
75 | - chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) | 164 | - chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) | |
76 | - chmod $(EXEPERM) $(GAMEDIR)/recover | 165 | - chmod $(EXEPERM) $(GAMEDIR)/recover | |
77 | + chmod $(EXEPERM) $(PREFIX)/bin/recover | 166 | - -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) | |
78 | -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) | 167 | - $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) | |
79 | $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) | 168 | - chmod $(EXEPERM) $(SHELLDIR)/$(GAME) | |
80 | chmod $(EXEPERM) $(SHELLDIR)/$(GAME) | 169 | + chmod $(EXEPERM) $(DESTDIR)$(PREFIX)/bin/recover | |
81 | @@ -230,16 +229,16 @@ | 170 | + -$(CHOWN) $(GAMEUID) $(DESTDIR)$(SHELLDIR)/$(GAME) | |
171 | + $(CHGRP) $(GAMEGRP) $(DESTDIR)$(SHELLDIR)/$(GAME) | |||
172 | + chmod $(EXEPERM) $(DESTDIR)$(SHELLDIR)/$(GAME) | |||
173 | ||||
174 | dofiles-dlb: check-dlb | |||
175 | - ( cd dat ; cp nhdat $(DATNODLB) $(GAMEDIR) ) | |||
176 | + ( cd dat ; cp nhdat $(DATNODLB) $(DESTDIR)$(GAMEDIR) ) | |||
177 | # set up their permissions | |||
178 | - -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ | |||
179 | + -( cd $(DESTDIR)$(GAMEDIR) ; $(CHOWN) $(GAMEUID) nhdat $(DATNODLB) ; \ | |||
180 | $(CHGRP) $(GAMEGRP) nhdat $(DATNODLB) ; \ | |||
181 | chmod $(FILEPERM) nhdat $(DATNODLB) ) | |||
182 | ||||
183 | dofiles-nodlb: | |||
184 | # copy over the game files | |||
185 | - ( cd dat ; cp $(DAT) $(GAMEDIR) ) | |||
186 | + ( cd dat ; cp $(DAT) $(DESTDIR)$(GAMEDIR) ) | |||
187 | # set up their permissions | |||
188 | - -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ | |||
189 | + -( cd $(DESTDIR)$(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DAT) ; \ | |||
190 | $(CHGRP) $(GAMEGRP) $(DAT) ; \ | |||
191 | chmod $(FILEPERM) $(DAT) ) | |||
192 | ||||
193 | @@ -230,26 +230,39 @@ update: $(GAME) recover $(VARDAT) dungeo | |||
82 | # and a reminder | 194 | # and a reminder | |
83 | @echo You may also want to install the man pages via the doc Makefile. | 195 | @echo You may also want to install the man pages via the doc Makefile. | |
84 | 196 | |||
85 | -install: $(GAME) recover $(VARDAT) dungeon spec_levs | 197 | -install: $(GAME) recover $(VARDAT) dungeon spec_levs | |
86 | +install-dat: recover $(VARDAT) dungeon spec_levs | 198 | +install-dat: recover $(VARDAT) dungeon spec_levs | |
87 | # set up the directories | 199 | # set up the directories | |
88 | # not all mkdirs have -p; those that don't will create a -p directory | 200 | # not all mkdirs have -p; those that don't will create a -p directory | |
89 | -mkdir -p $(SHELLDIR) | 201 | - -mkdir -p $(SHELLDIR) | |
90 | - -rm -rf $(GAMEDIR) $(VARDIR) | 202 | - -rm -rf $(GAMEDIR) $(VARDIR) | |
91 | -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save | 203 | - -mkdir -p $(GAMEDIR) $(VARDIR) $(VARDIR)/save | |
204 | + -mkdir -p $(DESTDIR)$(SHELLDIR) | |||
205 | + -mkdir -p $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(VARDIR)/save | |||
92 | -rmdir ./-p | 206 | -rmdir ./-p | |
93 | -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save | 207 | - -$(CHOWN) $(GAMEUID) $(GAMEDIR) $(VARDIR) $(VARDIR)/save | |
94 | $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save | 208 | - $(CHGRP) $(GAMEGRP) $(GAMEDIR) $(VARDIR) $(VARDIR)/save | |
95 | - chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save | 209 | - chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) $(VARDIR)/save | |
96 | + chmod $(DIRPERM) $(GAMEDIR) $(VARDIR) | 210 | + -$(CHOWN) $(GAMEUID) $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(VARDIR)/save | |
97 | + chmod 770 $(VARDIR)/save | 211 | + $(CHGRP) $(DESTDIR)$(GAMEGRP) $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(VARDIR)/save | |
212 | + chmod $(DIRPERM) $(DESTDIR)$(GAMEDIR) $(DESTDIR)$(VARDIR) | |||
213 | + chmod 770 $(DESTDIR)$(VARDIR)/save | |||
98 | # set up the game files | 214 | # set up the game files | |
99 | ( $(MAKE) dofiles ) | 215 | ( $(MAKE) dofiles ) | |
100 | # set up some additional files | 216 | # set up some additional files | |
101 | @@ -247,9 +246,20 @@ | 217 | - touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile | |
102 | -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ | 218 | - -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ | |
219 | + touch $(DESTDIR)$(VARDIR)/perm $(DESTDIR)$(VARDIR)/record $(DESTDIR)$(VARDIR)/logfile | |||
220 | + -( cd $(DESTDIR)$(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ | |||
103 | $(CHGRP) $(GAMEGRP) perm record logfile ; \ | 221 | $(CHGRP) $(GAMEGRP) perm record logfile ; \ | |
104 | chmod $(FILEPERM) perm record logfile ) | 222 | - chmod $(FILEPERM) perm record logfile ) | |
105 | + -touch -c $(VARDIR)/bones* $(VARDIR)/?lock* $(VARDIR)/wizard* | 223 | + chmod $(VARFILEPERM) perm record logfile ) | |
106 | + -touch -c $(VARDIR)/save/* | 224 | + -touch -c $(DESTDIR)$(VARDIR)/bones* $(DESTDIR)$(VARDIR)/?lock* $(DESTDIR)$(VARDIR)/wizard* | |
107 | + -mkdir -p $(PREFIX)/share/doc/nethack | 225 | + -touch -c $(DESTDIR)$(VARDIR)/save/* | |
108 | + cp doc/Guidebook $(PREFIX)/share/doc/nethack | 226 | + -mkdir -p $(DESTDIR)$(PREFIX)/share/doc/nethack | |
109 | + chown $(GAMEUID):$(GAMEGRP) $(PREFIX)/share/doc/nethack/Guidebook | 227 | + cp doc/Guidebook $(DESTDIR)$(PREFIX)/share/doc/nethack | |
110 | + chmod $(FILEPERM) $(PREFIX)/share/doc/nethack/Guidebook | 228 | + $(CHOWN) $(GAMEUID):$(GAMEGRP) $(DESTDIR)$(PREFIX)/share/doc/nethack/Guidebook | |
229 | + chmod $(FILEPERM) $(DESTDIR)$(PREFIX)/share/doc/nethack/Guidebook | |||
111 | # and a reminder | 230 | # and a reminder | |
112 | @echo You may also want to reinstall the man pages via the doc Makefile. | 231 | @echo You may also want to reinstall the man pages via the doc Makefile. | |
113 | 232 | |||
114 | +binfiles: $(GAME) | 233 | +binfiles: $(GAME) | |
115 | + cp src/$(GAME) $(SHELLDIR)/$(GAME)$(GTYPE) | 234 | + mkdir -p $(DESTDIR)$(SHELLDIR) | |
116 | + -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME)$(GTYPE) ; \ | 235 | + mkdir -p $(DESTDIR)$(GAMEDIR) | |
117 | + $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME)$(GTYPE) ) | 236 | + cp src/$(GAME) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) | |
118 | + chmod $(GAMEPERM) $(SHELLDIR)/$(GAME)$(GTYPE) | 237 | + -( cd $(DESTDIR)$(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) ; \ | |
238 | + $(CHGRP) $(GAMEGRP) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) ) | |||
239 | + #chmod $(GAMEPERM) $(DESTDIR)$(SHELLDIR)/$(GAME)$(GTYPE) | |||
119 | 240 | |||
120 | # 'make clean' removes all the .o files, but leaves around all the executables | 241 | # 'make clean' removes all the .o files, but leaves around all the executables | |
121 | # and compiled data files | 242 | # and compiled data files |
@@ -1,38 +1,40 @@ | @@ -1,38 +1,40 @@ | |||
1 | $NetBSD: patch-ad,v 1.7 2007/10/27 18:26:34 pooka Exp $ | 1 | $NetBSD: patch-ad,v 1.8 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | --- sys/unix/nethack.sh.orig 2003-12-08 00:39:13.000000000 +0100 | 3 | Make configurable. | |
4 | +++ sys/unix/nethack.sh 2007-10-27 20:18:37.000000000 +0200 | 4 | ||
5 | --- sys/unix/nethack.sh.orig 2003-12-07 23:39:13.000000000 +0000 | |||
6 | +++ sys/unix/nethack.sh | |||
5 | @@ -1,9 +1,31 @@ | 7 | @@ -1,9 +1,31 @@ | |
6 | #!/bin/sh | 8 | #!/bin/sh | |
7 | # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 | 9 | # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 | |
8 | 10 | |||
9 | -HACKDIR=/usr/games/lib/nethackdir | 11 | -HACKDIR=/usr/games/lib/nethackdir | |
10 | +UILIST="tty x11 qt" | 12 | +UILIST="tty x11 qt" | |
11 | +findbin () | 13 | +findbin () | |
12 | +{ | 14 | +{ | |
13 | + for x in $UILIST; do | 15 | + for x in $UILIST; do | |
14 | + if [ -x XXXPREFIXXXX/bin/nethack-$x ]; then | 16 | + if [ -x @PREFIX@/bin/nethack-$x ]; then | |
15 | + echo $x | 17 | + echo $x | |
16 | + return | 18 | + return | |
17 | + fi | 19 | + fi | |
18 | + done | 20 | + done | |
19 | +} | 21 | +} | |
20 | + | 22 | + | |
21 | +if [ -z "$1" -o -z "${1%%-*}" ]; then | 23 | +if [ -z "$1" -o -z "${1%%-*}" ]; then | |
22 | + TTY=`findbin` | 24 | + TTY=`findbin` | |
23 | +else | 25 | +else | |
24 | + TTY=$1 | 26 | + TTY=$1 | |
25 | +fi | 27 | +fi | |
26 | + | 28 | + | |
27 | +if [ -z "$TTY" ]; then | 29 | +if [ -z "$TTY" ]; then | |
28 | + echo "No UI ($UILIST) found" | 30 | + echo "No UI ($UILIST) found" | |
29 | + exit 1 | 31 | + exit 1 | |
30 | +fi | 32 | +fi | |
31 | + | 33 | + | |
32 | +HACKDIR=XXXPREFIXXXX/share/nethackdir340 | 34 | +HACKDIR=@GAMEDIR@ | |
33 | export HACKDIR | 35 | export HACKDIR | |
34 | -HACK=$HACKDIR/nethack | 36 | -HACK=$HACKDIR/nethack | |
35 | +HACK=XXXPREFIXXXX/bin/nethack-$TTY | 37 | +HACK=@PREFIX@/bin/nethack-$TTY | |
36 | MAXNROFPLAYERS=4 | 38 | MAXNROFPLAYERS=4 | |
37 | 39 | |||
38 | # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH | 40 | # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH |
@@ -1,13 +1,32 @@ | @@ -1,13 +1,32 @@ | |||
1 | $NetBSD: patch-ae,v 1.5 2008/05/20 19:47:16 tnn Exp $ | 1 | $NetBSD: patch-ae,v 1.6 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | --- sys/unix/Makefile.doc.orig 2003-12-08 00:39:13.000000000 +0100 | 3 | Make configurable. | |
4 | ||||
5 | --- sys/unix/Makefile.doc.orig 2003-12-07 23:39:13.000000000 +0000 | |||
4 | +++ sys/unix/Makefile.doc | 6 | +++ sys/unix/Makefile.doc | |
5 | @@ -41,7 +41,7 @@ Guidebook.dvi: Guidebook.tex | 7 | @@ -41,7 +41,7 @@ Guidebook.dvi: Guidebook.tex | |
6 | 8 | |||
7 | 9 | |||
8 | GAME = nethack | 10 | GAME = nethack | |
9 | -MANDIR = /usr/man/man6 | 11 | -MANDIR = /usr/man/man6 | |
10 | +MANDIR = $(PREFIX)/$(PKGMANDIR)/man6 | 12 | +MANDIR = $(PREFIX)/$(PKGMANDIR)/man6 | |
11 | MANEXT = 6 | 13 | MANEXT = 6 | |
12 | 14 | |||
13 | # manual installation for most BSD-style systems | 15 | # manual installation for most BSD-style systems | |
16 | @@ -58,11 +58,11 @@ DLBMANCREATE = cp dlb.6 | |||
17 | # DLBMANCREATE = nroff -man dlb.6 > | |||
18 | ||||
19 | manpages: | |||
20 | - -$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT) | |||
21 | - -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT) | |||
22 | - -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT) | |||
23 | - -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT) | |||
24 | - -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT) | |||
25 | + -$(GAMEMANCREATE) $(DESTDIR)$(MANDIR)/$(GAME).$(MANEXT) | |||
26 | + -$(LEVMANCREATE) $(DESTDIR)$(MANDIR)/lev_comp.$(MANEXT) | |||
27 | + -$(DGNMANCREATE) $(DESTDIR)$(MANDIR)/dgn_comp.$(MANEXT) | |||
28 | + -$(RCVRMANCREATE) $(DESTDIR)$(MANDIR)/recover.$(MANEXT) | |||
29 | + -$(DLBMANCREATE) $(DESTDIR)$(MANDIR)/dlb.$(MANEXT) | |||
30 | ||||
31 | # manual creation for distribution | |||
32 | DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt |
@@ -1,16 +1,19 @@ | @@ -1,16 +1,19 @@ | |||
1 | $NetBSD: patch-af,v 1.6 2006/10/09 02:06:58 ben Exp $ | 1 | $NetBSD: patch-af,v 1.7 2011/06/01 11:20:29 wiz Exp $ | |
2 | 2 | |||
3 | --- include/unixconf.h.orig 2003-12-07 18:39:13.000000000 -0500 | 3 | Make configurable. | |
4 | Fix for BSD. | |||
5 | ||||
6 | --- include/unixconf.h.orig 2003-12-07 23:39:13.000000000 +0000 | |||
4 | +++ include/unixconf.h | 7 | +++ include/unixconf.h | |
5 | @@ -19,20 +19,21 @@ | 8 | @@ -19,20 +19,21 @@ | |
6 | */ | 9 | */ | |
7 | 10 | |||
8 | /* define exactly one of the following four choices */ | 11 | /* define exactly one of the following four choices */ | |
9 | -/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */ | 12 | -/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */ | |
10 | +#define __NETHACK_OS__ 1 | 13 | +#define __NETHACK_OS__ 1 | |
11 | +/* #define BSD */ /* define for 4.n/Free/Open/Net BSD */ | 14 | +/* #define BSD */ /* define for 4.n/Free/Open/Net BSD */ | |
12 | /* also for relatives like SunOS 4.x, DG/UX, and */ | 15 | /* also for relatives like SunOS 4.x, DG/UX, and */ | |
13 | /* older versions of Linux */ | 16 | /* older versions of Linux */ | |
14 | /* #define ULTRIX */ /* define for Ultrix v3.0 or higher (but not lower) */ | 17 | /* #define ULTRIX */ /* define for Ultrix v3.0 or higher (but not lower) */ | |
15 | /* Use BSD for < v3.0 */ | 18 | /* Use BSD for < v3.0 */ | |
16 | /* "ULTRIX" not to be confused with "ultrix" */ | 19 | /* "ULTRIX" not to be confused with "ultrix" */ | |
@@ -26,22 +29,39 @@ $NetBSD: patch-af,v 1.6 2006/10/09 02:06 | @@ -26,22 +29,39 @@ $NetBSD: patch-af,v 1.6 2006/10/09 02:06 | |||
26 | +/* #define SVR4 */ /* use in addition to SYSV for System V Release 4 */ | 29 | +/* #define SVR4 */ /* use in addition to SYSV for System V Release 4 */ | |
27 | /* including Solaris 2+ */ | 30 | /* including Solaris 2+ */ | |
28 | #define NETWORK /* if running on a networked system */ | 31 | #define NETWORK /* if running on a networked system */ | |
29 | /* e.g. Suns sharing a playground through NFS */ | 32 | /* e.g. Suns sharing a playground through NFS */ | |
30 | @@ -47,7 +48,7 @@ | 33 | @@ -47,7 +48,7 @@ | |
31 | * job control (note that AIX is SYSV otherwise) | 34 | * job control (note that AIX is SYSV otherwise) | |
32 | * Also define this for AIX 3.2 */ | 35 | * Also define this for AIX 3.2 */ | |
33 | 36 | |||
34 | -#define TERMINFO /* uses terminfo rather than termcap */ | 37 | -#define TERMINFO /* uses terminfo rather than termcap */ | |
35 | +/* #define TERMINFO /* uses terminfo rather than termcap */ | 38 | +/* #define TERMINFO /* uses terminfo rather than termcap */ | |
36 | /* Should be defined for most SYSV, SVR4 (including | 39 | /* Should be defined for most SYSV, SVR4 (including | |
37 | * Solaris 2+), HPUX, and Linux systems. In | 40 | * Solaris 2+), HPUX, and Linux systems. In | |
38 | * particular, it should NOT be defined for the UNIXPC | 41 | * particular, it should NOT be defined for the UNIXPC | |
39 | @@ -171,7 +172,7 @@ | 42 | @@ -103,6 +104,7 @@ | |
43 | * system, define VAR_PLAYGROUND to be where the variable parts are kept. | |||
44 | */ | |||
45 | /* #define VAR_PLAYGROUND "/var/lib/games/nethack" */ | |||
46 | +#define VAR_PLAYGROUND "/var/games/nethack340" | |||
47 | ||||
48 | ||||
49 | /* | |||
50 | @@ -171,7 +173,7 @@ | |||
40 | # ifdef AMS | 51 | # ifdef AMS | |
41 | #define AMS_MAILBOX "/Mailbox" | 52 | #define AMS_MAILBOX "/Mailbox" | |
42 | # else | 53 | # else | |
43 | -# if defined(__FreeBSD__) || defined(__OpenBSD__) | 54 | -# if defined(__FreeBSD__) || defined(__OpenBSD__) | |
44 | +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) | 55 | +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) | |
45 | #define DEF_MAILREADER "/usr/bin/mail" | 56 | #define DEF_MAILREADER "/usr/bin/mail" | |
46 | # else | 57 | # else | |
47 | #define DEF_MAILREADER "/usr/ucb/Mail" | 58 | #define DEF_MAILREADER "/usr/ucb/Mail" | |
59 | @@ -284,7 +286,7 @@ | |||
60 | #endif | |||
61 | ||||
62 | #if defined(BSD) || defined(ULTRIX) | |||
63 | -# if !defined(DGUX) && !defined(SUNOS4) | |||
64 | +# if !defined(DGUX) && !defined(SUNOS4) && !defined(BSD) | |||
65 | #define memcpy(d, s, n) bcopy(s, d, n) | |||
66 | #define memcmp(s1, s2, n) bcmp(s2, s1, n) | |||
67 | # endif |
@@ -1,13 +1,15 @@ | @@ -1,13 +1,15 @@ | |||
1 | $NetBSD: patch-ag,v 1.2 2000/08/10 17:50:07 pooka Exp $ | 1 | $NetBSD: patch-ag,v 1.3 2011/06/01 11:20:29 wiz Exp $ | |
2 | ||||
3 | Fix for NetBSD. | |||
2 | 4 | |||
3 | --- src/mail.c.orig Wed Aug 9 21:02:04 2000 | 5 | --- src/mail.c.orig Wed Aug 9 21:02:04 2000 | |
4 | +++ src/mail.c Thu Aug 10 18:32:30 2000 | 6 | +++ src/mail.c Thu Aug 10 18:32:30 2000 | |
5 | @@ -71,7 +71,7 @@ | 7 | @@ -71,7 +71,7 @@ | |
6 | # if !defined(MAILPATH) && (defined(LINUX) || defined(__osf__)) | 8 | # if !defined(MAILPATH) && (defined(LINUX) || defined(__osf__)) | |
7 | # define MAILPATH "/var/spool/mail/" | 9 | # define MAILPATH "/var/spool/mail/" | |
8 | # endif | 10 | # endif | |
9 | -# if !defined(MAILPATH) && defined(__FreeBSD__) | 11 | -# if !defined(MAILPATH) && defined(__FreeBSD__) | |
10 | +# if !defined(MAILPATH) && (defined(__FreeBSD__) || defined(__NetBSD__)) | 12 | +# if !defined(MAILPATH) && (defined(__FreeBSD__) || defined(__NetBSD__)) | |
11 | # define MAILPATH "/var/mail/" | 13 | # define MAILPATH "/var/mail/" | |
12 | # endif | 14 | # endif | |
13 | # if !defined(MAILPATH) && (defined(BSD) || defined(ULTRIX)) | 15 | # if !defined(MAILPATH) && (defined(BSD) || defined(ULTRIX)) |
$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
@@ -102,11 +102,7 @@ extern "C" {
#include "qt_xpms.h"
#include <dirent.h>
-#ifdef Q_WS_MACX
-# include <sys/malloc.h>
-#else
-# include <malloc.h>
-#endif
+#include <stdlib.h>
#ifdef _WS_X11_
// For userid control
@@ -4278,7 +4274,7 @@ void NetHackQtYnDialog::done(int i)
NetHackQtGlyphs::NetHackQtGlyphs()
{
- const char* tile_file = "nhtiles.bmp";
+ const char* tile_file = "tiles.xpm";
if ( iflags.wc_tile_file )
tile_file = iflags.wc_tile_file;
$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)
#
$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:
@@ -1,6 +1,9 @@ | @@ -1,6 +1,9 @@ | |||
1 | =========================================================================== | 1 | =========================================================================== | |
2 | $NetBSD: MESSAGE,v 1.3 2002/09/24 12:30:00 wiz Exp $ | 2 | $NetBSD: MESSAGE,v 1.4 2011/06/01 11:20:29 wiz Exp $ | |
3 | 3 | |||
4 | You can run the QT NetHack by typing "nethack qt" | 4 | You can run the QT NetHack by typing "nethack qt" | |
5 | 5 | |||
6 | To fall back to tty mode, use "NETHACKOPTIONS=windowtype:tty nethack" | |||
7 | or set that option in your .nethackrc file. | |||
8 | ||||
6 | =========================================================================== | 9 | =========================================================================== |
@@ -1,29 +1,36 @@ | @@ -1,29 +1,36 @@ | |||
1 | # $NetBSD: Makefile,v 1.58 2011/01/13 13:37:48 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.59 2011/06/01 11:20:29 wiz Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | .include "../../games/nethack-lib/Makefile.common" | 4 | .include "../../games/nethack-lib/Makefile.common" | |
5 | 5 | |||
6 | PKGNAME= nethack-qt-${NETHACK_VERSION} | 6 | PKGNAME= nethack-qt-${NETHACK_VERSION} | |
7 | PKGREVISION= 10 | 7 | PKGREVISION= 11 | |
8 | CATEGORIES+= x11 | 8 | CATEGORIES+= x11 | |
9 | 9 | |||
10 | MAKE_JOBS_SAFE= no | 10 | MAKE_JOBS_SAFE= no | |
11 | 11 | |||
12 | COMMENT= The QT-Enhanced X11 version of NetHack | 12 | COMMENT= The QT-Enhanced X11+tty version of NetHack | |
13 | 13 | |||
14 | DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib | 14 | DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib | |
15 | 15 | |||
16 | USE_LANGUAGES= c c++ | 16 | USE_LANGUAGES= c c++ | |
17 | BUILD_TARGET= x11tiles nethack | 17 | BUILD_TARGET= nethack x11tiles | |
18 | INSTALL_TARGET= binfiles | 18 | INSTALL_TARGET= binfiles | |
19 | MAKE_ENV+= GTYPE=-qt | 19 | MAKE_ENV+= GTYPE=-qt | |
20 | CFLAGS+= -DPREFIX="\"${PREFIX}\"" | |||
21 | 20 | |||
21 | DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo | |||
22 | PATCHDIR= ${.CURDIR}/../nethack-lib/patches | |||
23 | ||||
24 | SPECIAL_PERMS+= ${PREFIX}/bin/nethack-qt \ | |||
25 | ${GAMEPERM} | |||
22 | post-install: | 26 | post-install: | |
23 | @${CP} -f ${WRKSRC}/dat/x11tiles ${WRKSRC}/dat/tiles.xpm | 27 | ${CP} -f ${WRKSRC}/dat/x11tiles ${WRKSRC}/dat/tiles.xpm | |
24 | @${INSTALL_DATA} ${WRKSRC}/dat/tiles.xpm ${DESTDIR}${PREFIX}/share/${NETHACK_DIR} | 28 | ${INSTALL_DATA} ${WRKSRC}/dat/tiles.xpm ${DESTDIR}${GAMEDIR} | |
29 | ${INSTALL_DATA} ${WRKSRC}/win/Qt/nhsplash.xpm ${DESTDIR}${GAMEDIR} | |||
30 | ${INSTALL_DATA} ${WRKSRC}/win/Qt/knh-mini.xpm ${DESTDIR}${GAMEDIR} | |||
31 | ${INSTALL_DATA} ${WRKSRC}/win/Qt/knh.xpm ${DESTDIR}${GAMEDIR} | |||
25 | 32 | |||
26 | .include "../../x11/libXpm/buildlink3.mk" | 33 | .include "../../x11/libXpm/buildlink3.mk" | |
27 | .include "../../x11/qt3-libs/buildlink3.mk" | 34 | .include "../../x11/qt3-libs/buildlink3.mk" | |
28 | 35 | |||
29 | .include "../../mk/bsd.pkg.mk" | 36 | .include "../../mk/bsd.pkg.mk" |
@@ -1,3 +1,6 @@ | @@ -1,3 +1,6 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.2 2002/03/25 20:32:27 pooka Exp $ | 1 | @comment $NetBSD: PLIST,v 1.3 2011/06/01 11:20:29 wiz Exp $ | |
2 | bin/nethack-qt | 2 | bin/nethack-qt | |
3 | share/nethackdir340/tiles.xpm | 3 | share/nethackdir340/tiles.xpm | |
4 | share/nethackdir340/nhsplash.xpm | |||
5 | share/nethackdir340/knh.xpm | |||
6 | share/nethackdir340/knh-mini.xpm |
@@ -1,22 +1,25 @@ | @@ -1,22 +1,25 @@ | |||
1 | # $NetBSD: Makefile,v 1.19 2009/06/30 00:07:16 joerg Exp $ | 1 | # $NetBSD: Makefile,v 1.20 2011/06/01 11:20:30 wiz Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | .include "../../games/nethack-lib/Makefile.common" | 4 | .include "../../games/nethack-lib/Makefile.common" | |
5 | 5 | |||
6 | PKGNAME= nethack-tty-${NETHACK_VERSION} | 6 | PKGNAME= nethack-tty-${NETHACK_VERSION} | |
7 | PKGREVISION= 1 | 7 | PKGREVISION= 2 | |
8 | 8 | |||
9 | COMMENT= The tty/console based version of NetHack | 9 | COMMENT= The tty/console based version of NetHack | |
10 | 10 | |||
11 | MAKE_JOBS_SAFE= no | 11 | MAKE_JOBS_SAFE= no | |
12 | 12 | |||
13 | DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib | 13 | DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib | |
14 | 14 | |||
15 | BUILD_TARGET= nethack | 15 | BUILD_TARGET= nethack | |
16 | INSTALL_TARGET= binfiles | 16 | INSTALL_TARGET= binfiles | |
17 | MAKE_ENV+= GTYPE=-tty | 17 | MAKE_ENV+= GTYPE=-tty | |
18 | 18 | |||
19 | DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo | 19 | DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo | |
20 | PATCHDIR= ${.CURDIR}/../nethack-lib/patches | 20 | PATCHDIR= ${.CURDIR}/../nethack-lib/patches | |
21 | 21 | |||
22 | SPECIAL_PERMS+= ${PREFIX}/bin/nethack-tty \ | |||
23 | ${GAMEPERM} | |||
24 | ||||
22 | .include "../../mk/bsd.pkg.mk" | 25 | .include "../../mk/bsd.pkg.mk" |
@@ -1,18 +1,27 @@ | @@ -1,18 +1,27 @@ | |||
1 | =========================================================================== | 1 | =========================================================================== | |
2 | $NetBSD: MESSAGE,v 1.4 2005/09/28 12:41:40 rillig Exp $ | 2 | $NetBSD: MESSAGE,v 1.5 2011/06/01 11:20:30 wiz Exp $ | |
3 | 3 | |||
4 | You can run the X11 NetHack by typing "nethack x11". | 4 | You can run the X11 NetHack by typing "nethack x11". | |
5 | 5 | |||
6 | A custom NetHack font was installed. You must add | 6 | Two fonts were installed for NetHack. You must add | |
7 | ${PREFIX}/lib/X11/fonts/misc to fontpath and set | 7 | ${PREFIX}/lib/X11/fonts/misc to fontpath and set one of | |
8 | 8 | |||
9 | NetHack*map*font: nh10 | 9 | NetHack*map*font: nh10 | |
10 | NetHack*map*font: -misc-fixed-medium-r-normal-ibmpc-14-120-75-75-c-80-iso8859-1 | |||
10 | 11 | |||
11 | in ${PREFIX}/lib/X11/app-defaults/NetHack to use it. | 12 | in ${PREFIX}/lib/X11/app-defaults/NetHack to use it. | |
12 | Tiled mode is enabled by: | 13 | Tiled mode is enabled by: | |
13 | 14 | |||
14 | NetHack.tile_file: x11tiles | 15 | NetHack.tile_file: x11tiles | |
15 | 16 | |||
16 | Also see ${PREFIX}/share/nethackdir340/nethack.x11.rc | 17 | Also see ${PREFIX}/share/nethackdir340/nethack.x11.rc | |
17 | 18 | |||
19 | You may also want to set this environment variable, so NetHack can | |||
20 | find its app-defaults file: | |||
21 | ||||
22 | XFILESEARCHPATH=%D:/usr/pkg/lib/X11/%T/%N%C:/usr/pkg/lib/X11/%T/%N | |||
23 | ||||
24 | To fall back to tty mode, use "NETHACKOPTIONS=windowtype:tty nethack" | |||
25 | or set that option in your .nethackrc file. | |||
26 | ||||
18 | =========================================================================== | 27 | =========================================================================== |
@@ -1,34 +1,42 @@ | @@ -1,34 +1,42 @@ | |||
1 | # $NetBSD: Makefile,v 1.37 2008/11/10 17:21:35 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.38 2011/06/01 11:20:30 wiz Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | .include "../../games/nethack-lib/Makefile.common" | 4 | .include "../../games/nethack-lib/Makefile.common" | |
5 | 5 | |||
6 | PKGNAME= nethack-x11-${NETHACK_VERSION} | 6 | PKGNAME= nethack-x11-${NETHACK_VERSION} | |
7 | PKGREVISION= 3 | 7 | PKGREVISION= 4 | |
8 | COMMENT= The X11 version of NetHack | 8 | COMMENT= The X11+tty version of NetHack | |
9 | 9 | |||
10 | CATEGORIES+= x11 | 10 | CATEGORIES+= x11 | |
11 | 11 | |||
12 | DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib | 12 | DEPENDS+= nethack-lib-${NETHACK_VERSION}{,nb*}:../../games/nethack-lib | |
13 | 13 | |||
14 | 14 | BUILD_TARGET= nethack x11tiles rip.xpm | ||
15 | BUILD_TARGET= x11tiles nethack | |||
16 | INSTALL_TARGET= binfiles | 15 | INSTALL_TARGET= binfiles | |
17 | MAKE_ENV+= GTYPE=-x11 | 16 | MAKE_ENV+= GTYPE=-x11 | |
18 | 17 | |||
19 | FONTS_DIRS.x11+= ${PREFIX}/lib/X11/fonts/misc | 18 | FONTS_DIRS.x11+= ${PREFIX}/lib/X11/fonts/misc | |
20 | 19 | |||
21 | INSTALLATION_DIRS= lib/X11/app-defaults lib/X11/fonts/misc | 20 | INSTALLATION_DIRS= lib/X11/app-defaults lib/X11/fonts/misc | |
22 | 21 | |||
22 | DISTINFO_FILE?= ${.CURDIR}/../nethack-lib/distinfo | |||
23 | PATCHDIR= ${.CURDIR}/../nethack-lib/patches | |||
24 | ||||
25 | SPECIAL_PERMS+= ${PREFIX}/bin/nethack-x11 \ | |||
26 | ${GAMEPERM} | |||
23 | post-install: | 27 | post-install: | |
24 | @${INSTALL_DATA} ${WRKSRC}/dat/x11tiles ${PREFIX}/share/${NETHACK_DIR} | 28 | ${INSTALL_DATA} ${WRKSRC}/dat/x11tiles \ | |
25 | @${INSTALL_DATA} ${WRKSRC}/win/X11/NetHack.ad \ | 29 | ${DESTDIR}${GAMEDIR} | |
26 | ${PREFIX}/lib/X11/app-defaults/NetHack | 30 | ${INSTALL_DATA} ${WRKSRC}/win/X11/NetHack.ad \ | |
27 | @${INSTALL_DATA} ${WRKSRC}/win/X11/nh10.bdf ${PREFIX}/lib/X11/fonts/misc | 31 | ${DESTDIR}${PREFIX}/lib/X11/app-defaults/NetHack | |
28 | @${INSTALL_DATA} ${WRKSRC}/win/X11/nethack.rc \ | 32 | ${INSTALL_DATA} ${WRKSRC}/win/X11/nh10.bdf \ | |
29 | ${PREFIX}/share/${NETHACK_DIR}/nethack.x11.rc | 33 | ${DESTDIR}${PREFIX}/lib/X11/fonts/misc | |
34 | ${INSTALL_DATA} ${WRKSRC}/win/X11/ibm.bdf \ | |||
35 | ${DESTDIR}${PREFIX}/lib/X11/fonts/misc | |||
36 | ${INSTALL_DATA} ${WRKSRC}/win/X11/nethack.rc \ | |||
37 | ${DESTDIR}${GAMEDIR}/nethack.x11.rc | |||
30 | 38 | |||
31 | .include "../../x11/libXaw/buildlink3.mk" | 39 | .include "../../x11/libXaw/buildlink3.mk" | |
32 | .include "../../x11/libXpm/buildlink3.mk" | 40 | .include "../../x11/libXpm/buildlink3.mk" | |
33 | .include "../../x11/libXt/buildlink3.mk" | 41 | .include "../../x11/libXt/buildlink3.mk" | |
34 | .include "../../mk/bsd.pkg.mk" | 42 | .include "../../mk/bsd.pkg.mk" |
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.3 2005/05/08 10:17:30 pooka Exp $ | 1 | @comment $NetBSD: PLIST,v 1.4 2011/06/01 11:20:30 wiz Exp $ | |
2 | bin/nethack-x11 | 2 | bin/nethack-x11 | |
3 | share/nethackdir340/x11tiles | |||
4 | share/nethackdir340/nethack.x11.rc | |||
5 | lib/X11/app-defaults/NetHack | 3 | lib/X11/app-defaults/NetHack | |
4 | lib/X11/fonts/misc/ibm.bdf | |||
6 | lib/X11/fonts/misc/nh10.bdf | 5 | lib/X11/fonts/misc/nh10.bdf | |
6 | share/nethackdir340/nethack.x11.rc | |||
7 | share/nethackdir340/x11tiles |