23141914 nethack 3.6.0
authorDanek Duvall <danek.duvall@oracle.com>
Mon, 25 Apr 2016 10:20:40 -0700
changeset 5859 98bc99958997
parent 5858 74ec1e7d5b4b
child 5860 afd31ba91ee9
23141914 nethack 3.6.0
components/nethack/Makefile
components/nethack/files/solaris
components/nethack/nethack.p5m
components/nethack/patches/64-bit.patch
components/nethack/patches/make.patch
components/nethack/patches/nethack.patch
components/nethack/patches/sysconf.patch
--- a/components/nethack/Makefile	Fri Apr 15 13:38:08 2016 -0700
+++ b/components/nethack/Makefile	Mon Apr 25 10:20:40 2016 -0700
@@ -25,17 +25,17 @@
 BUILD_BITS= 64
 include ../../make-rules/shared-macros.mk
 
-PATH=$(dir $(CC)):$(USRBINDIR):$(GNUBIN)
+PATH=$(dir $(CC)):$(USRBINDIR)
 
 COMPONENT_NAME=		nethack
-COMPONENT_VERSION=	3.4.3
+COMPONENT_VERSION=	3.6.0
 COMPONENT_PROJECT_URL=	http://www.nethack.org/
-COMPONENT_ARCHIVE=	$(COMPONENT_NAME)-343-src.tgz
+COMPONENT_ARCHIVE=	$(COMPONENT_NAME)-$(subst .,,$(COMPONENT_VERSION))-src.tgz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4
+    sha256:1ade698d8458b8d87a4721444cb73f178c74ed1b6fde537c12000f8edf2cb18a
 COMPONENT_ARCHIVE_URL=	http://sourceforge.net/projects/$(COMPONENT_NAME)/files/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)/download
 
-TPNO=			9239
+TPNO=			27856
 
 BUILD_STYLE= justmake
 TEST_TARGET= $(NO_TESTS)
@@ -43,32 +43,23 @@
 
 PATCH_LEVEL=0
 
+# This file contains the configuration we need
+COMPONENT_POST_UNPACK_ACTION = $(CP) files/solaris $(SOURCE_DIR)/sys/unix/hints
+
 # Need to use Makefiles in the sys/unix directory and copy them into various
 # other directories.
 #
-COMPONENT_PREP_ACTION= (cd $(SOURCE_DIR)/sys/unix ; sh setup.sh)
-
-COMPONENT_INSTALL_ARGS += CHOWN=true
-COMPONENT_INSTALL_ARGS += CHGRP=true
-COMPONENT_INSTALL_ARGS += ROOT=$(PROTO_DIR)
+COMPONENT_PREP_ACTION= (cd $(SOURCE_DIR)/sys/unix; sh setup.sh hints/solaris)
 
-# Nethack's build infrastructure doesn't let you easily override CFLAGS.
-# Luckily, all the source files live in the same location relative to the
-# include directory, so we can just stuff a -I into CFLAGS matching what's
-# there in the Makefiles.  And we have to force this to be overridden by
-# putting -e into MAKEFLAGS.
+COMPONENT_BUILD_TARGETS = all
 COMPONENT_BUILD_ENV += CC=$(CC)
-COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS) -I../include"
+COMPONENT_BUILD_ENV += TOP_CFLAGS="$(CFLAGS)"
 COMPONENT_BUILD_ENV += LFLAGS="$(CC_BITS)"
-COMPONENT_BUILD_ENV += MAKEFLAGS=-e
-COMPONENT_INSTALL_ENV += CC=$(CC)
-COMPONENT_INSTALL_ENV += CFLAGS="$(CFLAGS) -I../include"
-COMPONENT_INSTALL_ENV += LFLAGS="$(CC_BITS)"
-COMPONENT_INSTALL_ENV += MAKEFLAGS=-e
 
+# Uncomment out a few lines in the resources file
 COMPONENT_POST_INSTALL_ACTION += \
 	$(GSED) -e 's/^!\(NetHack.tomb\)/\1/' -e 's/^!\(NetHack.pet\)/\1/' \
-		-e 's/^!\(NetHack.tile_file\)/\1/' \
+		-e 's/^!\(NetHack.pilemark\)/\1/' \
 		$(COMPONENT_SRC)/win/X11/NetHack.ad \
 		> $(PROTO_DIR)/usr/lib/nethack/NetHack.ad
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/nethack/files/solaris	Mon Apr 25 10:20:40 2016 -0700
@@ -0,0 +1,58 @@
+#-PRE
+# Solaris hints file
+# This hints file provides tty and X11 builds for Solaris.
+
+# During build, DESTDIR should be empty.  During install, DESTDIR should be the
+# root of the proto area.
+
+# GAME is not set in Makefile.utl, but we need to have it set.
+# CLIENT_HACKDIR needs to be set separately from HACKDIR, since we use it
+# as a substitution in the nethack script, and can't have the workspace
+# path embedded in that script.  The rest should have DESTDIR prepended.
+GAME=nethack
+PREFIX=/usr
+CLIENT_HACKDIR=$(PREFIX)/lib/$(GAME)
+HACKDIR=$(DESTDIR)$(CLIENT_HACKDIR)
+SHELLDIR = $(DESTDIR)$(PREFIX)/bin
+INSTDIR=$(HACKDIR)
+VARDIR = $(DESTDIR)/var/games/$(GAME)
+
+
+# Inherit CFLAGS from outside, via TOP_CFLAGS, and then do a bunch of
+# customization.
+CFLAGS=$(TOP_CFLAGS)
+CFLAGS+=-I../include
+CFLAGS+=-DX11_GRAPHICS -DUSE_XPM -DVISION_TABLES=1 -DTIMED_DELAY=1
+CFLAGS+=-DVAR_PLAYGROUND=\"$(VARDIR)\" -DLOCKDIR=\"$(VARDIR)\"
+CFLAGS+=-DCOMPRESS=\"/usr/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
+CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
+
+LINK=$(CC)
+
+# Build for both tty and X11
+WINSRC = $(WINTTYSRC) $(WINX11SRC)
+WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
+WINLIB = -Wl,-zignore $(WINTTYLIB) $(WINX11LIB)
+
+WINTTYLIB=-lcurses
+
+VARDATND=x11tiles NetHack.ad pet_mark.xbm pilemark.xbm rip.xpm
+
+# The installation believes it's installing to the live filesystem, so it
+# wants to set owner, group, and mode.  Prevent the first two (which won't
+# be possible in a non-root build) and give reasonable but still arbitrary
+# values for the last.
+CHOWN=true
+CHGRP=true
+GAMEPERM = 0755
+VARFILEPERM = 0644
+VARDIRPERM = 0755
+
+#-POST
+# Override WINX11LIB in Makefile.src, to remove -lXmu and add -lXpm
+WINX11LIB=-lXaw -lXext -lXt -lX11 -lXpm
+
+# We need these down here in order to override the use of lex & yacc in
+# Makefile.utl
+LEX=flex
+YACC=bison -y
--- a/components/nethack/nethack.p5m	Fri Apr 15 13:38:08 2016 -0700
+++ b/components/nethack/nethack.p5m	Mon Apr 25 10:20:40 2016 -0700
@@ -18,7 +18,9 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+
+#
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -35,6 +37,8 @@
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=org.opensolaris.arc-caseid value=PSARC/2008/172
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+#
+file sys/unix/sysconf path=etc/nethack.conf group=games mode=0664 preserve=true
 file path=usr/bin/nethack
 file path=usr/lib/nethack/Arc-fila.lev
 file path=usr/lib/nethack/Arc-filb.lev
@@ -107,15 +111,23 @@
 file path=usr/lib/nethack/astral.lev
 file path=usr/lib/nethack/baalz.lev
 file path=usr/lib/nethack/bigrm-1.lev
+file path=usr/lib/nethack/bigrm-10.lev
 file path=usr/lib/nethack/bigrm-2.lev
 file path=usr/lib/nethack/bigrm-3.lev
 file path=usr/lib/nethack/bigrm-4.lev
 file path=usr/lib/nethack/bigrm-5.lev
+file path=usr/lib/nethack/bigrm-6.lev
+file path=usr/lib/nethack/bigrm-7.lev
+file path=usr/lib/nethack/bigrm-8.lev
+file path=usr/lib/nethack/bigrm-9.lev
+file path=usr/lib/nethack/bogusmon
 file path=usr/lib/nethack/castle.lev
 file path=usr/lib/nethack/cmdhelp
 file path=usr/lib/nethack/data
 file path=usr/lib/nethack/dungeon
 file path=usr/lib/nethack/earth.lev
+file path=usr/lib/nethack/engrave
+file path=usr/lib/nethack/epitaph
 file path=usr/lib/nethack/fakewiz1.lev
 file path=usr/lib/nethack/fakewiz2.lev
 file path=usr/lib/nethack/fire.lev
@@ -127,6 +139,8 @@
 file path=usr/lib/nethack/license
 file path=usr/lib/nethack/medusa-1.lev
 file path=usr/lib/nethack/medusa-2.lev
+file path=usr/lib/nethack/medusa-3.lev
+file path=usr/lib/nethack/medusa-4.lev
 file path=usr/lib/nethack/minefill.lev
 file path=usr/lib/nethack/minend-1.lev
 file path=usr/lib/nethack/minend-2.lev
@@ -145,6 +159,7 @@
 file path=usr/lib/nethack/oracles
 file path=usr/lib/nethack/orcus.lev
 file path=usr/lib/nethack/pet_mark.xbm
+file path=usr/lib/nethack/pilemark.xbm
 file path=usr/lib/nethack/quest.dat
 file path=usr/lib/nethack/recover mode=0555
 file path=usr/lib/nethack/rip.xpm
@@ -158,9 +173,12 @@
 file path=usr/lib/nethack/soko3-2.lev
 file path=usr/lib/nethack/soko4-1.lev
 file path=usr/lib/nethack/soko4-2.lev
+file path=usr/lib/nethack/symbols
+link path=usr/lib/nethack/sysconf target=../../../etc/nethack.conf
 file path=usr/lib/nethack/tower1.lev
 file path=usr/lib/nethack/tower2.lev
 file path=usr/lib/nethack/tower3.lev
+file path=usr/lib/nethack/tribute
 file path=usr/lib/nethack/valley.lev
 file path=usr/lib/nethack/water.lev
 file path=usr/lib/nethack/wizard1.lev
@@ -177,4 +195,6 @@
 file path=var/games/nethack/record group=games mode=0664 \
     original_name=SUNWnethack:var/games/nethack/record preserve=true
 dir  path=var/games/nethack/save group=games mode=0775
+file path=var/games/nethack/xlogfile group=games mode=0664 preserve=true
+#
 license dat/license license=Nethack
--- a/components/nethack/patches/64-bit.patch	Fri Apr 15 13:38:08 2016 -0700
+++ b/components/nethack/patches/64-bit.patch	Mon Apr 25 10:20:40 2016 -0700
@@ -2,14 +2,14 @@
 
 This patch will not be submitted upstream.
 
---- include/system.h.orig	Sun Dec  7 15:39:13 2003
-+++ include/system.h	Tue Jul 23 11:00:47 2013
-@@ -162,7 +162,7 @@
- # endif
- #  if defined(POSIX_TYPES) || defined(__TURBOC__)
- #   ifndef bsdi
--E int FDECL(write, (int, const void *,unsigned));
-+/* E int FDECL(write, (int, const void *,unsigned)); */
- #   endif
- #  else
- #   ifndef __MWERKS__	/* metrowerks defines write via universal headers */
+--- include/system.h	2015-12-07 00:26:01.000000000 -0800
++++ include/system.h	2016-04-14 14:53:13.263148993 -0700
+@@ -165,7 +165,7 @@ E long FDECL(lseek, (int, long, int));
+ #endif
+ #if defined(POSIX_TYPES) || defined(__TURBOC__)
+ #ifndef bsdi
+-E int FDECL(write, (int, const void *, unsigned));
++/* E int FDECL(write, (int, const void *, unsigned)); */
+ #endif
+ #else
+ #ifndef __MWERKS__ /* metrowerks defines write via universal headers */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/nethack/patches/make.patch	Mon Apr 25 10:20:40 2016 -0700
@@ -0,0 +1,14 @@
+The makefiles don't really allow for a proto-area-style install; this
+tweak, plus the bits in files/solaris, let this happen correctly.
+
+--- sys/unix/Makefile.top	2015-11-18 12:54:59.000000000 -0800
++++ sys/unix/Makefile.top	2016-04-14 16:37:08.807692850 -0700
+@@ -206,7 +206,7 @@
+ 	cp util/recover $(INSTDIR)
+ 	-if test -n '$(SHELLDIR)'; then rm -f $(SHELLDIR)/$(GAME); fi
+ 	if test -n '$(SHELLDIR)'; then \
+-		sed -e 's;/usr/games/lib/nethackdir;$(HACKDIR);' \
++		sed -e 's;/usr/games/lib/nethackdir;$(CLIENT_HACKDIR);' \
+ 		-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
+ 		< sys/unix/nethack.sh \
+ 		> $(SHELLDIR)/$(GAME) ; fi
--- a/components/nethack/patches/nethack.patch	Fri Apr 15 13:38:08 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
---- include/config.h.old	Sun Dec  7 15:39:13 2003
-+++ include/config.h	Sun Mar 30 12:37:01 2008
-@@ -43,7 +43,7 @@
-  * Some combinations make no sense.  See the installation document.
-  */
- #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 */
- /* #define MSWIN_GRAPHICS */	/* Windows NT, CE, 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 "/usr/bin/gzip"	/* 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 "/usr/lib/nethack"
- # endif
- 
- /*
-@@ -300,7 +300,7 @@
-  * functions that have been macroized.
-  */
- 
--/* #define VISION_TABLES */ /* use vision tables generated at compile time */
-+#define VISION_TABLES 1 /* use vision tables generated at compile time */
- #ifndef VISION_TABLES
- # ifndef NO_MACRO_CPATH
- #  define MACRO_CPATH	/* use clear_path macros instead of functions */
---- include/unixconf.h.old	2003-12-07 15:39:13.000000000 -0800
-+++ include/unixconf.h	2007-09-27 09:12:36.692549857 -0700
-@@ -96,13 +96,13 @@
-  */
- 
- /* #define NO_FILE_LINKS */	/* if no hard links */
--/* #define LOCKDIR "/usr/games/lib/nethackdir" */	/* where to put locks */
-+#define LOCKDIR "/var/games/nethack" /* where to put locks */
- 
- /*
-  * If you want the static parts of your playground on a read-only file
-  * system, define VAR_PLAYGROUND to be where the variable parts are kept.
-  */
--/* #define VAR_PLAYGROUND "/var/lib/games/nethack" */
-+#define VAR_PLAYGROUND "/var/games/nethack"
- 
- 
- /*
-@@ -132,7 +132,7 @@
-  * "extra output" method is used, but not all systems provide access to
-  * a fine-grained timer.
-  */
--/* #define TIMED_DELAY */	/* usleep() */
-+#define TIMED_DELAY 1	/* usleep() */
- #endif
- 
- /*
---- sys/unix/Makefile.src.old	Sun Dec  7 15:39:13 2003
-+++ sys/unix/Makefile.src	Sun Mar 30 12:38:36 2008
-@@ -214,8 +214,8 @@
- 
- #
- #
--WINSRC = $(WINTTYSRC)
--WINOBJ = $(WINTTYOBJ)
-+WINSRC = $(WINTTYSRC) $(WINX11SRC)
-+WINOBJ = $(WINTTYOBJ) $(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 -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 = -Wl,-zignore $(WINTTYLIB) $(WINX11LIB)
- 
- # any other strange libraries your system needs (for Sysunix only -- the more
- # specialized targets should already be right)
---- sys/unix/Makefile.top.old	Sun Dec  7 15:39:13 2003
-+++ sys/unix/Makefile.top	Sun Mar 30 12:42:20 2008
-@@ -22,7 +22,7 @@
- 
- # Permissions - some places use setgid instead of setuid, for instance
- # See also the option "SECURE" in include/config.h
--GAMEPERM = 04755
-+GAMEPERM = 02755
- FILEPERM = 0644
- EXEPERM  = 0755
- DIRPERM  = 0755
-@@ -35,14 +35,15 @@
- # 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
--VARDIR  = $(GAMEDIR)
--SHELLDIR = $(PREFIX)/games
-+GAMEDIR  = $(ROOT)/$(PREFIX)/lib/$(GAME)
-+CLIENT_GAMEDIR = $(PREFIX)/lib/$(GAME)
-+VARDIR  = $(ROOT)/var/games/nethack
-+SHELLDIR = $(ROOT)/$(PREFIX)/bin
- 
- # per discussion in Install.X11 and Install.Qt
- VARDATND = 
- # VARDATND = x11tiles NetHack.ad pet_mark.xbm
--# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
-+VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
- # for Atari/Gem
- # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
- # for BeOS
-@@ -186,7 +187,7 @@
- 	cp src/$(GAME) $(GAMEDIR)
- 	cp util/recover $(GAMEDIR)
- 	-rm -f $(SHELLDIR)/$(GAME)
--	sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
-+	sed -e 's;/usr/games/lib/nethackdir;$(CLIENT_GAMEDIR);' \
- 		-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
- 		< sys/unix/nethack.sh \
- 		> $(SHELLDIR)/$(GAME)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/nethack/patches/sysconf.patch	Mon Apr 25 10:20:40 2016 -0700
@@ -0,0 +1,40 @@
+Set some reasonable defaults.  Not suitable for upstream.
+
+--- sys/unix/sysconf	2015-12-07 00:26:01.000000000 -0800
++++ sys/unix/sysconf	2016-04-14 18:33:58.537973707 -0700
+@@ -28,14 +28,14 @@
+ # occasionally get stuck outside the game by accidentally typing '!' or
+ # '^Z' during play and not knowing how to go back.)
+ # Uses the same syntax as the WIZARDS and EXPLORERS options above.
+-#SHELLERS=
++SHELLERS=*
+ 
+ # Limit the number of simultaneous games (see also nethack.sh).
+-MAXPLAYERS=10
++MAXPLAYERS=25
+ 
+ # If not null, added to string "To get local support, " in the support
+ # information help.
+-#SUPPORT=call Izchak at extension 42.
++SUPPORT=call Izchak at extension 42.
+ 
+ # If not null, displayed at the end of a panic-save sequence.
+ #RECOVER=Run the recover program.
+@@ -51,14 +51,14 @@
+ # CAUTION: changing these after people have started playing games can
+ #  lead to lost high scores!
+ # Maximum entries for one person.
+-#PERSMAX=10
++PERSMAX=100
+ # Maximum entries in the record file.
+-#ENTRYMAX=100
++ENTRYMAX=1000
+ # Minimum points to get an entry.
+ #POINTSMIN=1
+ # Determine identity of "person" in the score file with name (0) or
+ # numeric (1) user id.
+-#PERS_IS_UID=1
++PERS_IS_UID=0
+ 
+ # Maximum number of score file entries to use for random statue names
+ #MAX_STATUENAME_RANK=10