summaryrefslogtreecommitdiffstats
path: root/games/nethack/files
diff options
context:
space:
mode:
Diffstat (limited to 'games/nethack/files')
-rw-r--r--games/nethack/files/nethack-enviro.patch155
-rw-r--r--games/nethack/files/nethack-qt5
-rw-r--r--games/nethack/files/nethack-qt.patch66
-rw-r--r--games/nethack/files/nethack-tty5
-rw-r--r--games/nethack/files/nethack-x115
-rw-r--r--games/nethack/files/nethack-x11.patch82
-rw-r--r--games/nethack/files/nethack.desktop11
-rw-r--r--games/nethack/files/nethackrc.qt85
8 files changed, 414 insertions, 0 deletions
diff --git a/games/nethack/files/nethack-enviro.patch b/games/nethack/files/nethack-enviro.patch
new file mode 100644
index 0000000000..ba47d87c0c
--- /dev/null
+++ b/games/nethack/files/nethack-enviro.patch
@@ -0,0 +1,155 @@
+diff -U 3 -dHrN -- nethack-3.4.3/include/config.h nethack-3.4.3-enviro/include/config.h
+--- nethack-3.4.3/include/config.h 2003-12-07 17:39:13.000000000 -0600
++++ nethack-3.4.3-enviro/include/config.h 2007-01-02 22:38:51.000000000 -0600
+@@ -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
+@@ -185,7 +185,7 @@
+ * a tar-like file, thus making a neater installation. See *conf.h
+ * for detailed configuration.
+ */
+-/* #define DLB */ /* not supported on all platforms */
++#define DLB /* not supported on all platforms */
+
+ /*
+ * Defining INSURANCE slows down level changes, but allows games that
+@@ -204,7 +204,7 @@
+ * otherwise it will be the current directory.
+ */
+ # ifndef HACKDIR
+-# define HACKDIR "/usr/games/lib/nethackdir"
++# define HACKDIR "/usr/share/games/nethack"
+ # endif
+
+ /*
+@@ -300,7 +300,7 @@
+ * functions that have been macroized.
+ */
+
+-/* #define VISION_TABLES */ /* use vision tables generated at compile time */
++#define VISION_TABLES /* use vision tables generated at compile time */
+ #ifndef VISION_TABLES
+ # ifndef NO_MACRO_CPATH
+ # define MACRO_CPATH /* use clear_path macros instead of functions */
+@@ -348,8 +348,8 @@
+ * bugs left here.
+ */
+
+-/*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */
+-/*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */
++#define GOLDOBJ /* Gold is kept on obj chains - Helge Hafting */
++#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */
+
+ /* End of Section 5 */
+
+diff -U 3 -dHrN -- nethack-3.4.3/include/unixconf.h nethack-3.4.3-enviro/include/unixconf.h
+--- nethack-3.4.3/include/unixconf.h 2003-12-07 17:39:13.000000000 -0600
++++ nethack-3.4.3-enviro/include/unixconf.h 2007-01-02 22:39:38.000000000 -0600
+@@ -32,12 +32,12 @@
+
+
+ /* define any of the following that are appropriate */
+-#define SVR4 /* use in addition to SYSV for System V Release 4 */
++/*n#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 */
+ /* #define SUNOS4 */ /* SunOS 4.x */
+-/* #define LINUX */ /* Another Unix clone */
++#define LINUX /* Another Unix clone */
+ /* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */
+ /* #define GENIX */ /* Yet Another Unix Clone */
+ /* #define HISX */ /* Bull Unix for XPS Machines */
+@@ -102,7 +102,7 @@
+ * 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"
+
+
+ /*
+diff -U 3 -dHrN -- nethack-3.4.3/sys/unix/Makefile.src nethack-3.4.3-enviro/sys/unix/Makefile.src
+--- nethack-3.4.3/sys/unix/Makefile.src 2003-12-07 17:39:13.000000000 -0600
++++ nethack-3.4.3-enviro/sys/unix/Makefile.src 2007-01-02 22:40:09.000000000 -0600
+@@ -230,8 +230,8 @@
+ # WINTTYLIB = -ltermcap
+ # WINTTYLIB = -lcurses
+ # WINTTYLIB = -lcurses16
+-# WINTTYLIB = -lncurses
+-WINTTYLIB = -ltermlib
++WINTTYLIB = -lncurses
++# WINTTYLIB = -ltermlib
+ #
+ # libraries for X11
+ # If USE_XPM is defined in config.h, you will also need -lXpm here.
+diff -U 3 -dHrN -- nethack-3.4.3/sys/unix/Makefile.top nethack-3.4.3-enviro/sys/unix/Makefile.top
+--- nethack-3.4.3/sys/unix/Makefile.top 2003-12-07 17:39:13.000000000 -0600
++++ nethack-3.4.3-enviro/sys/unix/Makefile.top 2007-01-02 22:36:23.000000000 -0600
+@@ -14,11 +14,11 @@
+ # MAKE = make
+
+ # make NetHack
+-PREFIX = /usr
++PREFIX = $(DESTDIR)/usr
+ GAME = nethack
+ # GAME = nethack.prg
+-GAMEUID = games
+-GAMEGRP = bin
++GAMEUID = root
++GAMEGRP = root
+
+ # Permissions - some places use setgid instead of setuid, for instance
+ # See also the option "SECURE" in include/config.h
+@@ -35,8 +35,8 @@
+ # 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)
++GAMEDIR = $(PREFIX)/share/games/nethack
++VARDIR = $(DESTDIR)/var/games/nethack
+ SHELLDIR = $(PREFIX)/games
+
+ # per discussion in Install.X11 and Install.Qt
+@@ -188,6 +188,7 @@
+ -rm -f $(SHELLDIR)/$(GAME)
+ sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
+ -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
++ -e 's;$(DESTDIR);;' \
+ < sys/unix/nethack.sh \
+ > $(SHELLDIR)/$(GAME)
+ # set up their permissions
+diff -U 3 -dHrN -- nethack-3.4.3/sys/unix/Makefile.utl nethack-3.4.3-enviro/sys/unix/Makefile.utl
+--- nethack-3.4.3/sys/unix/Makefile.utl 2003-12-07 17:39:13.000000000 -0600
++++ nethack-3.4.3-enviro/sys/unix/Makefile.utl 2007-01-02 22:36:46.000000000 -0600
+@@ -101,11 +101,11 @@
+
+ # yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
+ # if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
+-YACC = yacc
+-LEX = lex
+-# YACC = bison -y
+-# YACC = byacc
+-# LEX = flex
++# YACC = yacc
++# LEX = lex
++YACC = bison -y
++YACC = byacc
++LEX = flex
+
+ # these are the names of the output files from YACC/LEX. Under MS-DOS
+ # and similar systems, they may differ
diff --git a/games/nethack/files/nethack-qt b/games/nethack/files/nethack-qt
new file mode 100644
index 0000000000..938d4671b3
--- /dev/null
+++ b/games/nethack/files/nethack-qt
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export NETHACKOPTIONS="windowtype:qt"
+
+exec /usr/games/nethack \ No newline at end of file
diff --git a/games/nethack/files/nethack-qt.patch b/games/nethack/files/nethack-qt.patch
new file mode 100644
index 0000000000..ede7ddfa51
--- /dev/null
+++ b/games/nethack/files/nethack-qt.patch
@@ -0,0 +1,66 @@
+diff -U 3 -dHrN -- nethack-3.4.3-x11/include/config.h nethack-3.4.3-qt/include/config.h
+--- nethack-3.4.3-x11/include/config.h 2007-01-02 23:10:07.000000000 -0600
++++ nethack-3.4.3-qt/include/config.h 2007-01-03 11:58:11.000000000 -0600
+@@ -44,7 +44,7 @@
+ */
+ #define TTY_GRAPHICS /* good old tty based graphics */
+ #define X11_GRAPHICS /* X11 interface */
+-/* #define QT_GRAPHICS */ /* Qt interface */
++#define QT_GRAPHICS /* Qt interface */
+ /* #define GNOME_GRAPHICS */ /* Gnome interface */
+ /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */
+
+diff -U 3 -dHrN -- nethack-3.4.3-x11/sys/unix/Makefile.src nethack-3.4.3-qt/sys/unix/Makefile.src
+--- nethack-3.4.3-x11/sys/unix/Makefile.src 2007-01-02 23:20:01.000000000 -0600
++++ nethack-3.4.3-qt/sys/unix/Makefile.src 2007-01-03 12:12:55.000000000 -0600
+@@ -186,7 +186,8 @@
+ # Files for a Qt port
+ #
+ WINQTSRC = ../win/Qt/qt_win.cpp ../win/Qt/qt_clust.cpp ../win/Qt/qttableview.cpp
+-WINQTOBJ = qt_win.o qt_clust.o qttableview.o tile.o
++# WINQTOBJ = qt_win.o qt_clust.o qttableview.o tile.o
++WINQTOBJ = qt_win.o qt_clust.o qttableview.o
+ #
+ # Files for a Gnome port
+ #
+@@ -214,8 +215,8 @@
+
+ #
+ #
+-WINSRC = $(WINTTYSRC) $(WINX11SRC)
+-WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
++WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINQTSRC)
++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINQTOBJ)
+
+ # on some systems the termcap library is in -ltermcap or -lcurses
+ # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
+@@ -241,7 +242,7 @@
+ # 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
+ #
+ # libraries for KDE (with Qt)
+ WINKDELIB = -lkdecore -lkdeui -lXext
+@@ -255,7 +256,7 @@
+ # libraries for BeOS
+ WINBELIB = -lbe
+
+-WINLIB = $(WINTTYLIB) $(WINX11LIB)
++WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINQTLIB)
+
+ # any other strange libraries your system needs (for Sysunix only -- the more
+ # specialized targets should already be right)
+diff -U 3 -dHrN -- nethack-3.4.3-x11/sys/unix/Makefile.top nethack-3.4.3-qt/sys/unix/Makefile.top
+--- nethack-3.4.3-x11/sys/unix/Makefile.top 2007-01-02 23:12:32.000000000 -0600
++++ nethack-3.4.3-qt/sys/unix/Makefile.top 2007-01-03 12:01:32.000000000 -0600
+@@ -42,7 +42,7 @@
+ # 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 nhsplash.xpm
+ # for Atari/Gem
+ # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
+ # for BeOS
diff --git a/games/nethack/files/nethack-tty b/games/nethack/files/nethack-tty
new file mode 100644
index 0000000000..8a7415de9e
--- /dev/null
+++ b/games/nethack/files/nethack-tty
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export NETHACKOPTIONS="windowtype:tty"
+
+exec /usr/games/nethack \ No newline at end of file
diff --git a/games/nethack/files/nethack-x11 b/games/nethack/files/nethack-x11
new file mode 100644
index 0000000000..545677f844
--- /dev/null
+++ b/games/nethack/files/nethack-x11
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export NETHACKOPTIONS="windowtype:x11"
+
+exec /usr/games/nethack \ No newline at end of file
diff --git a/games/nethack/files/nethack-x11.patch b/games/nethack/files/nethack-x11.patch
new file mode 100644
index 0000000000..e6fb890e5d
--- /dev/null
+++ b/games/nethack/files/nethack-x11.patch
@@ -0,0 +1,82 @@
+diff -U 3 -dHrN -- nethack-3.4.3-enviro/include/config.h nethack-3.4.3-x11/include/config.h
+--- nethack-3.4.3-enviro/include/config.h 2007-01-02 22:38:51.000000000 -0600
++++ nethack-3.4.3-x11/include/config.h 2007-01-02 23:10:07.000000000 -0600
+@@ -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
+diff -U 3 -dHrN -- nethack-3.4.3-enviro/sys/unix/Makefile.src nethack-3.4.3-x11/sys/unix/Makefile.src
+--- nethack-3.4.3-enviro/sys/unix/Makefile.src 2007-01-02 22:40:09.000000000 -0600
++++ nethack-3.4.3-x11/sys/unix/Makefile.src 2007-01-02 23:20:01.000000000 -0600
+@@ -151,8 +151,8 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+
+-CFLAGS = -O -I../include
+-LFLAGS =
++CFLAGS = -O -I../include -I/usr/X11R6/include
++LFLAGS = -L/usr/X11R6/lib
+
+ # The Qt and Be window systems are written in C++, while the rest of
+ # NetHack is standard C. If using Qt, uncomment the LINK line here to get
+@@ -214,8 +214,8 @@
+
+ #
+ #
+-WINSRC = $(WINTTYSRC)
+-WINOBJ = $(WINTTYOBJ)
++WINSRC = $(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,9 +235,9 @@
+ #
+ # 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
+ # WINX11LIB = -lXaw -lXmu -lXt -lX11
+-# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
++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
+@@ -255,7 +255,7 @@
+ # libraries for BeOS
+ WINBELIB = -lbe
+
+-WINLIB = $(WINTTYLIB)
++WINLIB = $(WINTTYLIB) $(WINX11LIB)
+
+ # any other strange libraries your system needs (for Sysunix only -- the more
+ # specialized targets should already be right)
+diff -U 3 -dHrN -- nethack-3.4.3-enviro/sys/unix/Makefile.top nethack-3.4.3-x11/sys/unix/Makefile.top
+--- nethack-3.4.3-enviro/sys/unix/Makefile.top 2007-01-02 22:36:23.000000000 -0600
++++ nethack-3.4.3-x11/sys/unix/Makefile.top 2007-01-02 23:12:32.000000000 -0600
+@@ -40,9 +40,9 @@
+ SHELLDIR = $(PREFIX)/games
+
+ # per discussion in Install.X11 and Install.Qt
+-VARDATND =
++# 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
diff --git a/games/nethack/files/nethack.desktop b/games/nethack/files/nethack.desktop
new file mode 100644
index 0000000000..5ab1cc5edb
--- /dev/null
+++ b/games/nethack/files/nethack.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Nethack
+Comment=X11 Client
+GenericName=Roguelike Game
+Exec=nethack-x11
+Icon=/usr/share/pixmaps/nethack.xpm
+Terminal=false
+Type=Application
+X-KDE-StartupNotify=true
+Categories=Application;Game
diff --git a/games/nethack/files/nethackrc.qt b/games/nethack/files/nethackrc.qt
new file mode 100644
index 0000000000..d84c85fd2d
--- /dev/null
+++ b/games/nethack/files/nethackrc.qt
@@ -0,0 +1,85 @@
+#
+# Nethack configuration file.
+#
+# Naming this file $(HOME)/.nethackrc (for UNIX) or setting the environment
+# variable NETHACKOPTIONS to point to its full path name elsewhere tells
+# NetHack to use X11 windowing and fonts (provided the executable was
+# compiled with that ability).
+#
+#
+OPTIONS=windowtype:Qt,menustyle:partial,!time,showexp,msghistory:200,toptenwin,hilite_pet
+OPTIONS=confirm,male,fixinv,noautopickup,safe_pet,sortpack,tombstone
+OPTIONS=verbose,news,fruit:pineapple
+OPTIONS=dogname:Dhairrhuwyth
+OPTIONS=catname:Ghisteslwchlohm
+
+# Qt options:
+qt_tilewidth=18
+qt_tileheight=18
+qt_fontsize=tiny
+qt_compact=0
+
+# There are 17 object symbols and various graphics symbols.
+# The descriptions of these symbols can be found in dat/opthelp.
+#
+#
+# Font: nh10 (10x20)
+#
+OBJECTS= 180 183 188 192 181 184 182 189 190 196 \
+ 191 194 193 187 185 186 195
+#
+DUNGEON= 032 025 018 013 012 014 011 015 023 024 \
+ 022 021 128 129 130 131 132 035 035 133 \
+ 134 135 136 137 145 146 144 124 143 142 \
+ 141 140 149 150 031 031 147 148 031 161 \
+ 140
+#
+TRAPS= 138 138 138 138 138 138 138 138 138 138 \
+ 138 138 138 138 138 139 138 138 138 138 \
+ 138 138
+#
+EFFECTS= 151 152 153 154 155 156 157 158 \
+ 159 160 161 162 \
+ 163 164 165 166 167 168 169 170 \
+ 171 172 173 174 175 176 177 178 179
+#
+#
+# Font: ibm (8x14)
+#
+#OBJECTS= 207 210 215 219 208 211 209 216 217 223 \
+# 218 221 220 214 212 213 222
+#
+#DUNGEON= 032 128 129 130 131 132 133 134 135 136 \
+# 137 138 139 045 124 142 143 035 035 144 \
+# 145 146 147 148 155 156 227 124 154 153 \
+# 152 151 159 160 200 200 157 158 250 170 \
+# 151
+#
+#TRAPS= 149 149 149 149 149 149 149 149 149 149 \
+# 149 149 149 149 149 150 149 149 149 149 \
+# 149 149
+#
+#EFFECTS= 161 162 163 164 165 166 167 168 \
+# 169 170 171 172 \
+# 173 174 175 176 177 178 179 180 \
+# 181 182 183 184 185 186 187 188 189
+#
+#
+# Font: a "standard" font like 6x13
+# Note that this version is unlikely to work on a tty on a Unix system because
+# many of these characters are also control characters.
+#
+#DUNGEON = 032 025 018 013 012 014 011 015 023 024 \
+# 022 021 031 045 124 043 043 035 035 031 \
+# 035 001 060 062 060 062 019 124 092 035 \
+# 123 125 031 125 046 046 035 035 046 127 \
+# 125
+#
+#TRAPS= 094 094 094 094 094 094 094 094 094 094 \
+# 094 094 094 094 094 002 094 094 094 094 \
+# 094 094
+#
+#EFFECTS= 124 045 092 047 042 033 041 040 \
+# 048 035 064 042 \
+# 047 045 092 124 124 092 045 047 \
+# 047 064 092 064 064 064 092 064 047