From 8d43be31b69e03441d873dc2d47d580260ffff7b Mon Sep 17 00:00:00 2001 From: pooka Date: Fri, 22 Mar 2002 17:26:24 +0000 Subject: Upgrade nethack packages to NetHack 3.4.0 Highlights of the new release: * numerous bugfixes * stamina affects ability to throw heavy things * objects merge in containers * several small refinements to race/role separation * more feedback about skill advancement from #enhance command * "autodig" option * option for starting without a pet + many more, read doc/fixes34.0 Old savegames naturally don't work, so make sure you finish old ones before upgrading the package. Also fixes the rest of pkg/15717 by Bernd Ernesti. Solution was the same as what Thomas Klausner used to fix angband (ie. simply duplicate the patches) --- games/nethack-x11/patches/patch-aa | 48 ++++++++-- games/nethack-x11/patches/patch-ab | 175 ++++++++++++++++++++++++++++--------- games/nethack-x11/patches/patch-ac | 49 +++++++++++ games/nethack-x11/patches/patch-ad | 22 +++++ games/nethack-x11/patches/patch-ae | 13 +++ games/nethack-x11/patches/patch-af | 54 ++++++++++++ games/nethack-x11/patches/patch-ag | 13 +++ games/nethack-x11/patches/patch-ah | 44 ++++++++++ 8 files changed, 368 insertions(+), 50 deletions(-) create mode 100644 games/nethack-x11/patches/patch-ac create mode 100644 games/nethack-x11/patches/patch-ad create mode 100644 games/nethack-x11/patches/patch-ae create mode 100644 games/nethack-x11/patches/patch-af create mode 100644 games/nethack-x11/patches/patch-ag create mode 100644 games/nethack-x11/patches/patch-ah (limited to 'games/nethack-x11/patches') diff --git a/games/nethack-x11/patches/patch-aa b/games/nethack-x11/patches/patch-aa index 82d62c8fa5d..84e4967f694 100644 --- a/games/nethack-x11/patches/patch-aa +++ b/games/nethack-x11/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.3 2000/08/10 17:50:09 pooka Exp $ +$NetBSD: patch-aa,v 1.4 2002/03/22 17:26:28 pooka Exp $ ---- include/config.h.orig Sat Jul 22 04:13:51 2000 -+++ include/config.h Thu Aug 10 19:25:21 2000 +--- include/config.h.orig Thu Mar 21 01:42:43 2002 ++++ include/config.h Fri Mar 22 18:24:20 2002 @@ -42,8 +42,8 @@ * Define all of those you want supported in your binary. * Some combinations make no sense. See the installation document. @@ -9,11 +9,11 @@ $NetBSD: patch-aa,v 1.3 2000/08/10 17:50:09 pooka Exp $ -#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 X11_GRAPHICS /* X11 interface */ /* #define QT_GRAPHICS */ /* Qt interface */ /* #define GNOME_GRAPHICS */ /* Gnome interface */ - -@@ -98,7 +98,7 @@ + /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ +@@ -110,7 +110,7 @@ #endif #ifndef DEFAULT_WINDOW_SYS @@ -22,7 +22,7 @@ $NetBSD: patch-aa,v 1.3 2000/08/10 17:50:09 pooka Exp $ #endif #ifdef X11_GRAPHICS -@@ -110,7 +110,7 @@ +@@ -122,7 +122,7 @@ * would allow: * xpmtoppm x11tiles_big.xpm */ @@ -31,3 +31,37 @@ $NetBSD: patch-aa,v 1.3 2000/08/10 17:50:09 pooka Exp $ # ifdef USE_XPM # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ # endif +@@ -163,11 +163,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 +@@ -201,7 +201,7 @@ + # ifdef __APPLE__ + # define HACKDIR "nethackdir" /* nethack directory */ + # else +-# define HACKDIR "/usr/games/lib/nethackdir" ++# define HACKDIR "XXXPREFIXXXX/share/nethackdir" + # endif + # endif + +@@ -298,7 +298,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 index 8d213557190..819b4c175fc 100644 --- a/games/nethack-x11/patches/patch-ab +++ b/games/nethack-x11/patches/patch-ab @@ -1,44 +1,133 @@ -$NetBSD: patch-ab,v 1.6 2001/08/29 22:41:13 jlam Exp $ +$NetBSD: patch-ab,v 1.7 2002/03/22 17:26:28 pooka Exp $ ---- sys/unix/Makefile.src.orig Sat Aug 5 13:52:57 2000 -+++ sys/unix/Makefile.src Thu Aug 10 19:28:31 2000 -@@ -144,8 +144,8 @@ - # flags for debugging: - # CFLAGS = -g -I../include - --CFLAGS = -O -I../include --LFLAGS = -+CFLAGS += -I../include -I${BUILDLINK_X11_DIR}/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 LD line here to get -@@ -203,8 +203,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 -@@ -224,7 +224,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 -@@ -244,7 +244,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) +--- sys/unix/Makefile.top.orig Fri Mar 22 17:15:28 2002 ++++ sys/unix/Makefile.top Fri Mar 22 17:24:57 2002 +@@ -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)dir + 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 pet_mark.xbm + # VARDATND = x11tiles pet_mark.xbm rip.xpm + # for Atari/Gem +@@ -87,9 +86,12 @@ + $(GAME): + ( cd src ; $(MAKE) ) + +-all: $(GAME) Guidebook $(VARDAT) dungeon spec_levs check-dlb ++all: $(GAME) datastuff + @echo "Done." + ++datastuff: Guidebook $(VARDAT) dungeon spec_levs check-dlb recover ++ @echo "Data Sets Built." ++ + # Note: many of the dependencies below are here to allow parallel make + # to generate valid output + +@@ -102,6 +104,9 @@ + data: $(GAME) + ( cd dat ; $(MAKE) data ) + ++recover: ++ ( cd util ; $(MAKE) recover ) ++ + rumors: $(GAME) + ( cd dat ; $(MAKE) rumors ) + +@@ -164,6 +169,11 @@ + ( cd util ; $(MAKE) dlb ) + ( cd dat ; ../util/dlb cf nhdat $(DATDLB) ) + ++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) + + dofiles: + target=`sed -n \ +@@ -173,16 +183,13 @@ + -e '}' \ + -e '$$s/.*/nodlb/p' < dat/options` ; \ + $(MAKE) dofiles-$${target-nodlb} +- cp src/$(GAME) $(GAMEDIR) + -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) ; \ +- $(CHGRP) $(GAMEGRP) $(GAME) ) +- chmod $(GAMEPERM) $(GAMEDIR)/$(GAME) + -$(CHOWN) $(GAMEUID) $(SHELLDIR)/$(GAME) + $(CHGRP) $(GAMEGRP) $(SHELLDIR)/$(GAME) + chmod $(EXEPERM) $(SHELLDIR)/$(GAME) +@@ -218,16 +225,16 @@ + # and a reminder + @echo You may also want to install the man pages via the doc Makefile. + +-install: $(GAME) $(VARDAT) dungeon spec_levs ++install-dat: $(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 +@@ -235,6 +242,14 @@ + -( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \ + $(CHGRP) $(GAMEGRP) perm record logfile ; \ + chmod $(FILEPERM) perm record logfile ) ++ -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 ++ cp util/recover $(PREFIX)/bin/recover ++ chown 0:0 $(PREFIX)/bin/recover ++ chmod 755 $(PREFIX)/bin/recover ++ + # and a reminder + @echo You may also want to reinstall the man pages via the doc Makefile. + diff --git a/games/nethack-x11/patches/patch-ac b/games/nethack-x11/patches/patch-ac new file mode 100644 index 00000000000..dc587e4f7d5 --- /dev/null +++ b/games/nethack-x11/patches/patch-ac @@ -0,0 +1,49 @@ +$NetBSD: patch-ac,v 1.1 2002/03/22 17:26:28 pooka Exp $ + +--- include/system.h.orig Thu Jan 6 21:20:08 2000 ++++ include/system.h Thu Aug 10 18:16:03 2000 +@@ -77,10 +77,10 @@ + # if !defined(__SC__) && !defined(LINUX) + E long NDECL(random); + # endif +-# if !defined(SUNOS4) || defined(RANDOM) ++# if !defined(SUNOS4) && !defined(__NetBSD__) || defined(RANDOM) + E void FDECL(srandom, (unsigned int)); + # else +-# if !defined(bsdi) && !defined(__FreeBSD__) ++# if !defined(bsdi) && !defined(__FreeBSD__) && !defined(__NetBSD__) + E int FDECL(srandom, (unsigned int)); + # endif + # endif +@@ -130,7 +130,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) +@@ -413,7 +413,7 @@ + # ifdef HPUX + E unsigned int FDECL(strlen, (char *)); + # else +-# if !(defined(ULTRIX_PROTO) && defined(__GNUC__)) ++# if !(defined(ULTRIX_PROTO) && defined(__GNUC__)) && !defined(__NetBSD__) + E int FDECL(strlen, (const char *)); + # endif + # endif /* HPUX */ +@@ -513,11 +513,13 @@ + # endif + # endif + ++#ifndef __NetBSD__ + # if defined(ULTRIX) || 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 */ diff --git a/games/nethack-x11/patches/patch-ad b/games/nethack-x11/patches/patch-ad new file mode 100644 index 00000000000..5d3dd8fa1a9 --- /dev/null +++ b/games/nethack-x11/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.1 2002/03/22 17:26:28 pooka Exp $ + +--- sys/unix/nethack.sh.orig Thu Mar 21 01:43:54 2002 ++++ sys/unix/nethack.sh Fri Mar 22 17:39:00 2002 +@@ -1,9 +1,15 @@ + #!/bin/sh + # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 + +-HACKDIR=/usr/games/lib/nethackdir ++if [ "$1" = "" ]; then ++ TTY=tty ++else ++ TTY=$1 ++fi ++ ++HACKDIR=XXXPREFIXXXX/share/nethackdir + export HACKDIR +-HACK=$HACKDIR/nethack ++HACK=XXXPREFIXXXX/bin/nethack-$TTY + MAXNROFPLAYERS=4 + + # see if we can find the full path name of PAGER, so help files work properly diff --git a/games/nethack-x11/patches/patch-ae b/games/nethack-x11/patches/patch-ae new file mode 100644 index 00000000000..2b078332f38 --- /dev/null +++ b/games/nethack-x11/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1 2002/03/22 17:26:28 pooka Exp $ + +--- sys/unix/Makefile.doc.orig Fri Jan 14 22:49:48 2000 ++++ sys/unix/Makefile.doc Thu Aug 10 18:17:40 2000 +@@ -34,7 +34,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 new file mode 100644 index 00000000000..f24171f23aa --- /dev/null +++ b/games/nethack-x11/patches/patch-af @@ -0,0 +1,54 @@ +$NetBSD: patch-af,v 1.1 2002/03/22 17:26:29 pooka Exp $ + +--- include/unixconf.h.orig Thu Mar 21 01:42:56 2002 ++++ include/unixconf.h Fri Mar 22 17:42:50 2002 +@@ -19,20 +19,20 @@ + */ + + /* define exactly one of the following four choices */ +-/* #define BSD 1 */ /* define for 4.n BSD */ ++#define BSD 1 /* define for 4.n 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 +@@ -168,11 +168,15 @@ + + #ifdef MAIL + # if defined(BSD) || defined(ULTRIX) ++# ifdef __NetBSD__ ++#define DEF_MAILREADER "/usr/bin/mail" ++# else + # ifdef AMS + #define AMS_MAILBOX "/Mailbox" + # else + #define DEF_MAILREADER "/usr/ucb/Mail" +-# endif ++# endif ++# endif + #else + # if (defined(SYSV) || defined(DGUX) || defined(HPUX)) && !defined(LINUX) + # if defined(M_XENIX) || defined(__FreeBSD__) diff --git a/games/nethack-x11/patches/patch-ag b/games/nethack-x11/patches/patch-ag new file mode 100644 index 00000000000..ad6589bbc5c --- /dev/null +++ b/games/nethack-x11/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1 2002/03/22 17:26:29 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 new file mode 100644 index 00000000000..725e184c6ed --- /dev/null +++ b/games/nethack-x11/patches/patch-ah @@ -0,0 +1,44 @@ +$NetBSD: patch-ah,v 1.1 2002/03/22 17:26:29 pooka Exp $ + +--- sys/unix/Makefile.src.orig Sat Aug 5 13:52:57 2000 ++++ sys/unix/Makefile.src Thu Aug 10 19:28:31 2000 +@@ -144,8 +144,8 @@ + # flags for debugging: + # CFLAGS = -g -I../include + +-CFLAGS = -O -I../include +-LFLAGS = ++CFLAGS += -I../include -I${BUILDLINK_X11_DIR}/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 LD line here to get +@@ -203,8 +203,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 +@@ -224,7 +224,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 +@@ -244,7 +244,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) -- cgit v1.2.3