Module submission - nethack

duncan.gibson@xs4all.nl duncan.gibson at xs4all.nl
Mon May 28 18:52:21 CEST 2007


module name       : nethack
suggested section : games
update (y/n)      : n
bugfix (y/n)      : n
security (y/n)    : n

In a fit of nostalgia, I wanted to play rogue, but knew I would
be unlikely to find it. The next level up, hack/nethack is only
represented in moonbase by falconseye, based on nethack-3.3.1,
but this gives a segmentation fault, and I just could not fathom
out the build instructions to try to repair it. I found navigation
in angband a bit too tedious, and I kept dying :-( so I went back
to basics and found plain old nethack-3.4.3 via a web search.

The build instructions for this aren't too clear either, but I
think I've got them coded in the mass of sed calls in BUILD.
Unfortunately there is an inelegant 'chmod' at the bottom that
I could not see how to integrate in the Makefiles, and there is
a step missing for the X11 interface:

  Additional step: As discussed in win/X11/Install.X11, convert
  nh10.bdf and ibm.bdf to proper font files and place in font path.

NOTE: I added a CONFLICTS for falconseye, which doesn't work on
my box, and which appears to be a dead project. The 'vultures'
project that forked from falconseye also has complicated build
instructions (and barfs on one of the SDL libraries, iirc)
I'll submit a bug report for falconseye in a minute.

Duncan / engelsman

-------------- next part --------------
--- nethack/BUILD	1970-01-01 01:00:00.000000000 +0100
+++ nethack/BUILD	2007-05-28 18:48:31.000000000 +0200
@@ -0,0 +1,60 @@
+(
+
+ cp include/config.h include/config.h.orig
+ cat include/config.h.orig \
+ | sed -e 's:/\* #define X11_GRAPHICS \*/:#define X11_GRAPHICS:' \
+       -e 's:/\* #define USE_XPM \*/:#define USE_XPM:' \
+       -e 's:^#define COMPRESS .*$:#define COMPRESS "/bin/gzip":' \
+       -e 's:^#define COMPRESS_EXTENSION.*$:#define COMPRESS_EXTENSION ".gz":' \
+       -e 's:/\* #define DLB \*/:#define DLB:' \
+       -e 's:/\* #define AUTOPICKUP_EXTENSIONS \*/:#define AUTOPICKUP_EXTENSIONS:' \
+ > include/config.h
+ # cp include/config.h* /tmp
+
+ cp include/unixconf.h include/unixconf.h.orig
+ cat include/unixconf.h.orig \
+ | sed -e 's:/\* #define LINUX \*/:#define LINUX:' \
+       -e 's:/\* #define TIMED_DELAY \*/:#define TIMED_DELAY:' \
+ > include/unixconf.h
+ # cp include/unixconf.h* /tmp
+
+ cp sys/unix/Makefile.src sys/unix/Makefile.src.orig
+ cat sys/unix/Makefile.src.orig \
+ | sed -e 's:^# CC = gcc *$:CC = gcc:' \
+       -e 's:^# LFLAGS = -L/usr/X11R6/lib:LFLAGS = -L/usr/X11R6/lib:' \
+       -e 's:^WINSRC = $(WINTTYSRC):WINSRC = $(WINTTYSRC) $(WINX11SRC):' \
+       -e 's:^WINOBJ = $(WINTTYOBJ):WINOBJ = $(WINTTYOBJ) $(WINX11OBJ):' \
+       -e 's:^WINTTYLIB = -ltermlib:WINTTYLIB = -lncurses:' \
+       -e 's:^WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11:WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11:' \
+       -e 's:^WINLIB = $(WINTTYLIB):WINLIB = $(WINTTYLIB) $(WINX11LIB):' \
+ > sys/unix/Makefile.src
+ # cp sys/unix/Makefile.src* /tmp
+
+ cp sys/unix/Makefile.utl sys/unix/Makefile.utl.orig
+ cat sys/unix/Makefile.utl.orig \
+ | sed -e 's:^# CC = gcc *$:CC = gcc:' \
+       -e 's:^# LFLAGS = -L/usr/X11R6/lib:LFLAGS = -L/usr/X11R6/lib:' \
+       -e 's:^YACC *= yacc:YACC = bison -y:' \
+       -e 's:^LEX *= lex:LEX = flex:' \
+ > sys/unix/Makefile.utl
+ # cp sys/unix/Makefile.utl* /tmp
+
+ cp sys/unix/Makefile.top sys/unix/Makefile.top.orig
+ cat sys/unix/Makefile.top.orig \
+ | sed -e 's:^GAMEGRP *= bin:GAMEGRP = games:' \
+       -e 's:^GAMEPERM = 04755:GAMEPERM = 02755:' \
+       -e 's:^FILEPERM = 0644:FILEPERM = 0664:' \
+       -e 's:^DIRPERM = 0755:DIRPERM = 0775:' \
+       -e 's:^VARDATND =.*$:VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm:' \
+ > sys/unix/Makefile.top
+ # cp sys/unix/Makefile.top* /tmp
+
+ sh sys/unix/setup.sh
+ make all
+
+ prepare_install
+ make install
+ chmod 0775 /usr/games/lib/nethackdir
+
+) > $C_FIFO 2>&1
+
--- nethack/CONFLICTS	1970-01-01 01:00:00.000000000 +0100
+++ nethack/CONFLICTS	2007-05-28 18:27:24.000000000 +0200
@@ -0,0 +1 @@
+conflicts falconseye
--- nethack/DETAILS	1970-01-01 01:00:00.000000000 +0100
+++ nethack/DETAILS	2007-05-26 18:43:27.000000000 +0200
@@ -0,0 +1,25 @@
+          MODULE=nethack
+         VERSION=3.4.3
+ 	  SOURCE=$MODULE-343-src.tgz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION/
+    SOURCE_URL[0]=$SFORGE_URL/n/ne/$MODULE/
+    SOURCE_URL[1]=ftp://umn.dl.sourceforge.net/pub/sourceforge/n/ne/$MODULE/
+    SOURCE_URL[2]=ftp://heanet.dl.sourceforge.net/n/ne/$MODULE/
+       SOURCE_VFY=21479c95990eefe7650df582426457f9
+        WEB_SITE=http://www.nethack.org
+         ENTERED=20070526
+	 UPDATED=20070526
+           SHORT="single player dungeon exploration game"
+
+cat << EOF
+NetHack is a single player dungeon exploration game that runs on a
+wide variety of computer systems, with a variety of graphical and text
+interfaces all using the same game engine. Unlike many other Dungeons &
+Dragons-inspired games, the emphasis in NetHack is on discovering the
+detail of the dungeon and not simply killing everything in sight - in
+fact, killing everything in sight is a good way to die quickly. Each game
+presents a different landscape - the random number generator provides
+an essentially unlimited number of variations of the dungeon and its
+denizens to be discovered by the player in one of a number of characters:
+you can pick your race, your role, and your gender.
+EOF
-------------- next part --------------
lvu submit nethack 2a2ed0e1479c8b8e1be8c449720aadf0  -
2.6.21.1 2.6.12 gcc-4.1.2 glibc-2.3.6


More information about the Lunar mailing list