summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-10 04:59:58 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-10 04:59:58 +0000
commit0bb76cbaabcb2e024867417795e8c6b19786b020 (patch)
tree2a0f2a2466549809e3b960bb8cde4777773230e0 /games-roguelike/nethack
parentrepoman: fix leading whitespace (diff)
downloadhistorical-0bb76cbaabcb2e024867417795e8c6b19786b020.tar.gz
historical-0bb76cbaabcb2e024867417795e8c6b19786b020.tar.bz2
historical-0bb76cbaabcb2e024867417795e8c6b19786b020.zip
hello rogues
Diffstat (limited to 'games-roguelike/nethack')
-rw-r--r--games-roguelike/nethack/ChangeLog89
-rw-r--r--games-roguelike/nethack/Manifest14
-rw-r--r--games-roguelike/nethack/files/3.4.1-GNOME-RTLD_NEXT.patch26
-rw-r--r--games-roguelike/nethack/files/3.4.1-GNOME-support.patch28
-rw-r--r--games-roguelike/nethack/files/3.4.1-QT-GNOME-support.patch30
-rw-r--r--games-roguelike/nethack/files/3.4.1-QT-support.patch23
-rw-r--r--games-roguelike/nethack/files/3.4.1-X-support.patch26
-rw-r--r--games-roguelike/nethack/files/3.4.1-default-options.patch29
-rw-r--r--games-roguelike/nethack/files/3.4.1-errno.patch68
-rw-r--r--games-roguelike/nethack/files/3.4.1-gentoo-paths.patch18
-rw-r--r--games-roguelike/nethack/files/digest-nethack-3.4.11
-rw-r--r--games-roguelike/nethack/files/digest-nethack-3.4.1-r11
-rw-r--r--games-roguelike/nethack/files/dot.nethackrc92
-rw-r--r--games-roguelike/nethack/nethack-3.4.1-r1.ebuild139
-rw-r--r--games-roguelike/nethack/nethack-3.4.1.ebuild135
15 files changed, 719 insertions, 0 deletions
diff --git a/games-roguelike/nethack/ChangeLog b/games-roguelike/nethack/ChangeLog
new file mode 100644
index 000000000000..565536e47b14
--- /dev/null
+++ b/games-roguelike/nethack/ChangeLog
@@ -0,0 +1,89 @@
+# ChangeLog for app-games/nethack
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*nethack-3.4.1-r1 (07 Aug 2003)
+
+ 07 Aug 2003; Mike Frysinger <vapier@gentoo.org> :
+ Fix file permissions/writable file locations #26085
+
+*nethack-3.4.1 (03 Mar 2003)
+
+ 11 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
+ Don't overwrite saved games and stuff ... #16428
+
+ 22 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
+ Cleaned up ebuild ... move most sed statements to patches. #16436 #16827
+
+ 05 Mar 2003; Bartosch Pixa <darkspecter@gentoo.org> nethack-3.4.1.ebuild:
+ set ~ppc in keywords
+
+ 03 Mar 2003; Daniel Ahlberg <aliz@gentoo.org> :
+ Version bump.
+
+*nethack-3.4.0-r7 (26 Feb 2003)
+
+ 26 Feb 2003; Mike Frysinger <vapier@gentoo.org> :
+ Added errno patch to fix #16436 (#16267).
+
+*nethack-3.4.0-r6 (18 Feb 2003)
+
+ 18 Feb 2003; Daniel Ahlberg <aliz@gentoo.org> :
+ Security update.
+
+*nethack-3.4.0-r5 (22 Dec 2002)
+
+ 22 Dec 2002; J.Alberto Suarez L. <bass@gentoo.org> :
+ Fix bug #12576
+
+*nethack-3.4.0-r4 (16 Dec 2002)
+
+ 16 Dec 2002; Mike Frysinger <vapier@gentoo.org> :
+ Added games.eclass support and fix for #9147.
+
+*nethack-3.4.0-r3 (23 Apr 2002)
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> nethack-3.4.0-r3.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> nethack-3.4.0.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+ 23 Apr 2002; Spider <spider@gentoo.org> nethack-3.4.0-r3.ebuild:
+ Fix qt dependency
+
+*nethack-3.4.0-r2 (17 Apr 2002)
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> nethack-3.4.0-r2.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+ 17 Apr 2002; Spider <spider@gentoo.org> nethack-3.4.0-r2.ebuild:
+ Here is the bulk message from Jason Ritchie <jasonr@myrealbox.com>
+ This version I wrote from scratch, but after I got stuck I got a lot of
+ good info from the existing nethack ebuilds. I have included a
+ CREDITS.gentoo.
+
+ On to the meat. This ebuild supports USE flags X, qt, and gnome. I
+ have also included a default .nethackrc file and a FAQ-ish thing about
+ why I made some decisions. It removes the need for /usr/games as this is to be avoided
+ from what I hear. It will emerge with qt2 or 3 installed, but it will only
+ use 2. I have tested tty, X, qt, and gnome window types and it seems to run very
+ nicely.
+
+ The whole setup process should be:
+ emerge nethack
+ cp /usr/share/nethackdir/dot.nethackrc ~/.nethackrc
+ nethack
+
+ This was such a fun project. Let me know if I screwed the pooch.
+
+*nethack-3.4.0-r1 (13 Apr 2002)
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> nethack-3.4.0-r1.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+ 13 Apr 2002; Spider <spider@gentoo.org> nethack-3.4.0-r1.ebuild :
+ Adding comment on how to get colour support thanks to Ryan Phillips
+ Update dodoc line
+
+ *nethack-3.4.0 (09 Apr 2002)
+ 9 Apr 2002; Spider <spider@gentoo.org> nethack-3.4.0.ebuild :
+ Second release of nethack really, only including the 3.4.0 release though.
+ initial commit to cvs/portage
diff --git a/games-roguelike/nethack/Manifest b/games-roguelike/nethack/Manifest
new file mode 100644
index 000000000000..029f97337b92
--- /dev/null
+++ b/games-roguelike/nethack/Manifest
@@ -0,0 +1,14 @@
+MD5 d5738a7be6385eed01de95c5a303203d files/3.4.1-GNOME-RTLD_NEXT.patch 617
+MD5 7dfa79bba03a240cb7bba2e84d8178ef files/3.4.1-GNOME-support.patch 1316
+MD5 004669e4ce554b5f7f92daaea2e2cebb files/3.4.1-QT-GNOME-support.patch 1507
+MD5 f128c014d1efb8861cec5dae19eedb5b files/dot.nethackrc 2717
+MD5 c1f64a8da334f8dbc9817bbd95b8f879 files/3.4.1-QT-support.patch 825
+MD5 2517703c5a6cb5d151d525e4f58128b2 files/digest-nethack-3.4.1 61
+MD5 68200eaa7e6d116868700aab23e7e1d5 files/3.4.1-X-support.patch 920
+MD5 1d7c9716b1a212c5278326fa2e84efdc files/3.4.1-default-options.patch 1266
+MD5 c9f63ebc75e7872f691922a78f1c0b0b files/3.4.1-errno.patch 1901
+MD5 a33605f7cde87f4aafa5c42998a9feb2 files/3.4.1-gentoo-paths.patch 576
+MD5 2517703c5a6cb5d151d525e4f58128b2 files/digest-nethack-3.4.1-r1 61
+MD5 d9c02506e9976559405489e402b91f2c nethack-3.4.1.ebuild 3816
+MD5 60e08a834fe8b77eabbc9d93e27cc080 ChangeLog 3172
+MD5 74d2a7b022c71ee64a8d7ae23c70e316 nethack-3.4.1-r1.ebuild 4149
diff --git a/games-roguelike/nethack/files/3.4.1-GNOME-RTLD_NEXT.patch b/games-roguelike/nethack/files/3.4.1-GNOME-RTLD_NEXT.patch
new file mode 100644
index 000000000000..728a2d6ab137
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-GNOME-RTLD_NEXT.patch
@@ -0,0 +1,26 @@
+diff -ur base.1/sys/unix/unixres.c work/sys/unix/unixres.c
+--- base.1/sys/unix/unixres.c 2003-02-23 09:43:39.000000000 -0500
++++ work/sys/unix/unixres.c 2003-03-05 16:56:12.000000000 -0500
+@@ -14,14 +14,19 @@
+ * hide them.
+ */
+
++/* _GNU_SOURCE has to be set before including config.h, as otherwise
++ * features.h will be included and it will be too late.
++ */
++
++#if defined(linux) && defined(__GNUC__)
++# define _GNU_SOURCE
++#endif
++
+ #include "config.h"
+
+ #ifdef GETRES_SUPPORT
+
+ # if defined(LINUX)
+-#ifdef __GNUC__
+-#define _GNU_SOURCE
+-#endif
+
+ /* requires dynamic linking with libc */
+ #include <dlfcn.h>
diff --git a/games-roguelike/nethack/files/3.4.1-GNOME-support.patch b/games-roguelike/nethack/files/3.4.1-GNOME-support.patch
new file mode 100644
index 000000000000..3a18fae409ad
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-GNOME-support.patch
@@ -0,0 +1,28 @@
+--- include/config.h.orig 2003-06-21 21:06:38.000000000 -0400
++++ include/config.h 2003-06-21 21:12:00.000000000 -0400
+@@ -48 +48 @@
+-/* #define GNOME_GRAPHICS */ /* Gnome interface */
++#define GNOME_GRAPHICS
+@@ -96 +95,0 @@
+-# define USE_XPM /* Use XPM format for images (required) */
+--- Makefile.orig 2003-06-21 21:06:38.000000000 -0400
++++ Makefile 2003-06-21 21:13:02.000000000 -0400
+@@ -43 +43 @@
+-VARDATND = x11tiles pet_mark.xbm rip.xpm
++VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
+--- src/Makefile.orig 2003-06-21 21:06:38.000000000 -0400
++++ src/Makefile 2003-06-21 21:17:33.000000000 -0400
+@@ -142 +142 @@
+-GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome
++GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+@@ -191 +191 @@
+- gnyesno.o gnworn.o tile.o
++ gnyesno.o gnworn.o
+@@ -207,2 +207,2 @@
+-WINSRC = $(WINTTYSRC) $(WINX11SRC)
+-WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
++WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC)
++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINGNOMEOBJ)
+@@ -248 +248 @@
+-WINLIB = $(WINTTYLIB) $(WINX11LIB)
++WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINGNOMELIB)
diff --git a/games-roguelike/nethack/files/3.4.1-QT-GNOME-support.patch b/games-roguelike/nethack/files/3.4.1-QT-GNOME-support.patch
new file mode 100644
index 000000000000..2a610d61764f
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-QT-GNOME-support.patch
@@ -0,0 +1,30 @@
+--- include/config.h.orig 2003-06-21 21:06:38.000000000 -0400
++++ include/config.h 2003-06-21 21:12:00.000000000 -0400
+@@ -48 +48 @@
+-/* #define GNOME_GRAPHICS */ /* Gnome interface */
++#define GNOME_GRAPHICS
+--- Makefile.orig 2003-06-21 21:06:38.000000000 -0400
++++ Makefile 2003-06-21 21:13:02.000000000 -0400
+@@ -43 +43 @@
+-VARDATND = x11tiles pet_mark.xbm rip.xpm
++VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
+--- src/Makefile.orig 2003-06-21 21:06:38.000000000 -0400
++++ src/Makefile 2003-06-21 21:17:33.000000000 -0400
+@@ -142 +142 @@
+-GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome
++GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
+@@ -191 +191 @@
+- gnyesno.o gnworn.o tile.o
++ gnyesno.o gnworn.o
+@@ -207,2 +207,2 @@
+-WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINQTSRC)
+-WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINQTOBJ)
++WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINQTSRC) $(WINGNOMESRC)
++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINQTOBJ) $(WINGNOMEOBJ)
+@@ -248 +248 @@
+-WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINQTLIB)
++WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINQTLIB) $(WINGNOMELIB)
+--- include/config.h.orig 2003-06-21 22:04:25.000000000 -0400
++++ include/config.h 2003-06-21 22:04:31.000000000 -0400
+@@ -96 +95,0 @@
+-# define USE_XPM /* Use XPM format for images (required) */
diff --git a/games-roguelike/nethack/files/3.4.1-QT-support.patch b/games-roguelike/nethack/files/3.4.1-QT-support.patch
new file mode 100644
index 000000000000..826aaadae6da
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-QT-support.patch
@@ -0,0 +1,23 @@
+--- include/config.h.orig 2003-06-21 21:03:14.000000000 -0400
++++ include/config.h 2003-06-21 21:03:20.000000000 -0400
+@@ -47 +47 @@
+-/* #define QT_GRAPHICS */ /* Qt interface */
++#define QT_GRAPHICS
+@@ -89 +88,0 @@
+-# define USE_XPM /* Use XPM format for images (required) */
+--- src/Makefile.orig 2003-06-21 21:04:41.000000000 -0400
++++ src/Makefile 2003-06-21 21:04:58.000000000 -0400
+@@ -155 +155 @@
+-#LD=g++
++LD=g++
+@@ -179 +179 @@
+-WINQTOBJ = qt_win.o qt_clust.o qttableview.o tile.o
++WINQTOBJ = qt_win.o qt_clust.o qttableview.o
+@@ -207,2 +207,2 @@
+-WINSRC = $(WINTTYSRC) $(WINX11SRC)
+-WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
++WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINQTSRC)
++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINQTOBJ)
+@@ -248 +248 @@
+-WINLIB = $(WINTTYLIB) $(WINX11LIB)
++WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINQTLIB)
diff --git a/games-roguelike/nethack/files/3.4.1-X-support.patch b/games-roguelike/nethack/files/3.4.1-X-support.patch
new file mode 100644
index 000000000000..6687f8865509
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-X-support.patch
@@ -0,0 +1,26 @@
+--- include/config.h.orig 2003-06-21 20:58:57.000000000 -0400
++++ include/config.h 2003-06-21 20:59:44.000000000 -0400
+@@ -46 +46 @@
+-/* #define X11_GRAPHICS */ /* X11 interface */
++#define X11_GRAPHICS 1
+@@ -127 +127 @@
+-/* # define USE_XPM */ /* Disable if you do not have the XPM library */
++# define USE_XPM 1
+--- Makefile.orig 2003-06-21 21:01:03.000000000 -0400
++++ Makefile 2003-06-21 21:01:16.000000000 -0400
+@@ -43 +43 @@
+-VARDATND =
++VARDATND = x11tiles pet_mark.xbm rip.xpm
+--- src/Makefile.orig 2003-06-21 21:02:01.000000000 -0400
++++ src/Makefile 2003-06-21 21:02:11.000000000 -0400
+@@ -207,2 +207,2 @@
+-WINSRC = $(WINTTYSRC)
+-WINOBJ = $(WINTTYOBJ)
++WINSRC = $(WINTTYSRC) $(WINX11SRC)
++WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
+@@ -228 +228 @@
+-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
++WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm
+@@ -248 +248 @@
+-WINLIB = $(WINTTYLIB)
++WINLIB = $(WINTTYLIB) $(WINX11LIB)
diff --git a/games-roguelike/nethack/files/3.4.1-default-options.patch b/games-roguelike/nethack/files/3.4.1-default-options.patch
new file mode 100644
index 000000000000..03a904c118c7
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-default-options.patch
@@ -0,0 +1,29 @@
+--- include/config.h.orig 2003-06-21 20:44:00.000000000 -0400
++++ include/config.h 2003-06-21 20:46:42.000000000 -0400
+@@ -170,2 +170,2 @@
+-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
+-#define COMPRESS_EXTENSION ".Z" /* compress's extension */
++#define COMPRESS "/bin/bzip2" /* Lempel-Ziv compression */
++#define COMPRESS_EXTENSION ".bz2" /* compress's extension */
+@@ -186 +186 @@
+-/* #define DLB */ /* not supported on all platforms */
++#define DLB 1 /* not supported on all platforms */
+@@ -208 +208 @@
+-# define HACKDIR "/usr/games/lib/nethackdir"
++# define HACKDIR "GENTOO_HACKDIR"
+@@ -305 +305 @@
+-/* #define VISION_TABLES */ /* use vision tables generated at compile time */
++#define VISION_TABLES 1 /* use vision tables generated at compile time */
+--- include/unixconf.h.orig 2003-06-21 20:47:54.000000000 -0400
++++ include/unixconf.h 2003-06-21 20:48:39.000000000 -0400
+@@ -40 +40 @@
+-/* #define LINUX */ /* Another Unix clone */
++#define LINUX 1 /* Another Unix clone */
+@@ -135 +135 @@
+-/* #define TIMED_DELAY */ /* usleep() */
++#define TIMED_DELAY 1
+--- src/Makefile.orig 2003-06-21 20:55:36.000000000 -0400
++++ src/Makefile 2003-06-21 20:55:49.000000000 -0400
+@@ -224 +224 @@
+-WINTTYLIB = -ltermlib
++WINTTYLIB = -lncurses
diff --git a/games-roguelike/nethack/files/3.4.1-errno.patch b/games-roguelike/nethack/files/3.4.1-errno.patch
new file mode 100644
index 000000000000..60dcb65b2765
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-errno.patch
@@ -0,0 +1,68 @@
+--- ./src/files.c 2003-03-03 08:29:00.000000000 +0000
++++ ./src/files.c 2003-03-03 08:29:24.000000000 +0000
+@@ -25,7 +25,7 @@
+ # ifdef _DCC
+ const
+ # endif
+-extern int errno;
++#include <errno.h>
+ #endif
+
+ #if defined(UNIX) && defined(QT_GRAPHICS)
+--- ./sys/amiga/winchar.c.orig 2003-02-27 07:23:36.000000000 -0500
++++ ./sys/amiga/winchar.c 2003-02-27 07:24:34.000000000 -0500
+@@ -4,6 +4,7 @@
+ /* Copyright (c) Gregg Wonderly, Naperville Illinois, 1994. */
+ /* NetHack may be freely redistributed. See license for details. */
+
++#include <errno.h>
+ #include <exec/types.h>
+ #include <libraries/iffparse.h>
+ #include <graphics/scale.h>
+@@ -206,7 +207,7 @@
+ {
+ BitMapHeader *bmhd = NULL, bmhds;
+ unsigned char *cmap;
+- extern int errno;
++
+ register int i, j;
+ struct IFFHandle *iff;
+ struct StoredProperty *prop;
+--- ./sys/unix/cpp2.shr.orig 2003-02-27 07:23:36.000000000 -0500
++++ ./sys/unix/cpp2.shr 2003-02-27 07:25:28.000000000 -0500
+@@ -348,6 +348,7 @@
+ X#endif
+ X
+ X#include <stdio.h>
++X#include <errno.h>
+ X#include <ctype.h>
+ X#include "cppdef.h"
+ X#include "cpp.h"
+@@ -1113,7 +1114,6 @@
+ X int i; /* argv[] index */
+ X int j; /* Output index */
+ X int file; /* File_descriptor */
+-X extern int errno; /* Last vms i/o error */
+ X
+ X for (j = i = 1; i < argc; i++) { /* Do all arguments */
+ X switch (*(ap = argv[i])) {
+--- ./sys/unix/unixunix.c.orig 2003-02-27 07:23:36.000000000 -0500
++++ ./sys/unix/unixunix.c 2003-02-27 07:25:59.000000000 -0500
+@@ -41,9 +41,6 @@
+ (void) time(&date);
+ #endif
+ if(date - buf.st_mtime < 3L*24L*60L*60L) { /* recent */
+-#ifndef NETWORK
+- extern int errno;
+-#endif
+ int lockedpid; /* should be the same size as hackpid */
+
+ if(read(fd, (genericptr_t)&lockedpid, sizeof(lockedpid)) !=
+@@ -88,7 +85,6 @@
+ void
+ getlock()
+ {
+- extern int errno;
+ register int i = 0, fd, c;
+ const char *fq_lock;
+
diff --git a/games-roguelike/nethack/files/3.4.1-gentoo-paths.patch b/games-roguelike/nethack/files/3.4.1-gentoo-paths.patch
new file mode 100644
index 000000000000..af86cd1fe637
--- /dev/null
+++ b/games-roguelike/nethack/files/3.4.1-gentoo-paths.patch
@@ -0,0 +1,18 @@
+--- include/unixconf.h.orig 2003-08-07 23:18:03.070299152 -0400
++++ include/unixconf.h 2003-08-07 23:18:39.699730632 -0400
+@@ -96,13 +96,13 @@
+ */
+
+ /* #define NO_FILE_LINKS */ /* if no hard links */
+-/* #define LOCKDIR "/usr/games/lib/nethackdir" */ /* where to put locks */
++#define LOCKDIR "GENTOO_STATEDIR"
+
+ /*
+ * 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 "GENTOO_STATEDIR"
+
+
+ /*
diff --git a/games-roguelike/nethack/files/digest-nethack-3.4.1 b/games-roguelike/nethack/files/digest-nethack-3.4.1
new file mode 100644
index 000000000000..b4a7e712fb68
--- /dev/null
+++ b/games-roguelike/nethack/files/digest-nethack-3.4.1
@@ -0,0 +1 @@
+MD5 aefcbeb20210b2d64511c84bd03c3e4e nethack-341.tgz 3492419
diff --git a/games-roguelike/nethack/files/digest-nethack-3.4.1-r1 b/games-roguelike/nethack/files/digest-nethack-3.4.1-r1
new file mode 100644
index 000000000000..b4a7e712fb68
--- /dev/null
+++ b/games-roguelike/nethack/files/digest-nethack-3.4.1-r1
@@ -0,0 +1 @@
+MD5 aefcbeb20210b2d64511c84bd03c3e4e nethack-341.tgz 3492419
diff --git a/games-roguelike/nethack/files/dot.nethackrc b/games-roguelike/nethack/files/dot.nethackrc
new file mode 100644
index 000000000000..55899338cee7
--- /dev/null
+++ b/games-roguelike/nethack/files/dot.nethackrc
@@ -0,0 +1,92 @@
+#
+# Nethack configuration file.
+#
+# Please read the Guidebook in /usr/share/doc/nethack or at www.nethack.org.
+#
+# Naming this file $(HOME)/.nethackrc or setting the environment
+# variable NETHACKOPTIONS to point to its full path name elsewhere tells
+# NetHack to use X11 windowing (provided the executable was compiled with
+# that ability).
+#
+# SET YOUR WINDOW TYPE
+# Your windowtype choices are: GENTOO_WINDOWTYPES
+#
+OPTIONS=windowtype:GENTOO_DEFWINDOWTYPE
+#OPTIONS=color
+#OPTIONS=name:player
+#OPTIONS=gender:male
+#OPTIONS=fruit:mango
+#OPTIONS=dogname:Izchak
+#OPTIONS=catname:Chun-Li
+#OPTIONS=horsename:Marlon
+
+# Suggested for qt:
+#OPTIONS=number_pad,menustyle:partial,!time,showexp
+#OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
+
+# The font settings below are for X11 untiled
+#
+# 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
diff --git a/games-roguelike/nethack/nethack-3.4.1-r1.ebuild b/games-roguelike/nethack/nethack-3.4.1-r1.ebuild
new file mode 100644
index 000000000000..7b7e69d2c238
--- /dev/null
+++ b/games-roguelike/nethack/nethack-3.4.1-r1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/nethack-3.4.1-r1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games eutils flag-o-matic
+append-flags -fomit-frame-pointer -I../include
+
+MY_PV=${PV//.}
+
+DESCRIPTION="The ultimate old-school single player dungeon exploration game"
+HOMEPAGE="http://www.nethack.org/"
+SRC_URI="mirror://sourceforge/nethack/${PN}-${MY_PV}.tgz"
+#SRC_URI="ftp://ftp.nethack.org/pub/nethack/nh340/src/nethack-340.tgz"
+
+KEYWORDS="x86 ppc"
+SLOT="0"
+LICENSE="nethack"
+IUSE="X qt gnome"
+
+DEPEND="virtual/glibc
+ dev-util/yacc
+ >=sys-libs/ncurses-5.2-r5
+ X? ( x11-base/xfree )
+ qt? ( =x11-libs/qt-2* )
+ gnome? ( >=gnome-base/gnome-libs-1.4.1.4-r2 )"
+
+HACKDIR=${GAMES_DATADIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+
+ # This copies the /sys/unix Makefile.*s to their correct places for
+ # seding and compiling.
+ cd ${S}/sys/unix
+ source setup.sh || die
+
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-gentoo-paths.patch
+ epatch ${FILESDIR}/${PV}-errno.patch
+ epatch ${FILESDIR}/${PV}-GNOME-RTLD_NEXT.patch
+ epatch ${FILESDIR}/${PV}-default-options.patch
+
+ sed -i "s:GENTOO_STATEDIR:${GAMES_STATEDIR}/${PN}:" include/unixconf.h || die "setting statedir"
+ sed -i "s:GENTOO_HACKDIR:${HACKDIR}:" include/config.h || die "seting hackdir"
+
+ if [ `use X` ] ; then
+ epatch ${FILESDIR}/${PV}-X-support.patch
+ if [ `use qt` ] ; then
+ epatch ${FILESDIR}/${PV}-QT-support.patch
+ [ `use gnome` ] && epatch ${FILESDIR}/${PV}-QT-GNOME-support.patch
+ elif [ `use gnome` ] ; then
+ epatch ${FILESDIR}/${PV}-GNOME-support.patch
+ fi
+ fi
+}
+
+src_compile() {
+ cd ${S}/src
+ make \
+ QTDIR=/usr/qt/2 \
+ CC="${CC:-gcc}" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="-L/usr/X11R6/lib" \
+ || die
+ cd ${S}/util
+ make CFLAGS="${CFLAGS}" recover || die
+}
+
+src_install() {
+ make \
+ CC="${CC:-gcc}" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="-L/usr/X11R6/lib" \
+ GAMEPERM=0755 \
+ PREFIX=${D}/usr \
+ GAMEDIR=${D}${HACKDIR} \
+ SHELLDIR=${D}/${GAMES_BINDIR} \
+ install \
+ || die "make install failed"
+ newgamesbin util/recover recover-nethack
+
+ # The final nethack is a sh script. This fixes the hard-coded
+ # HACKDIR directory so it doesn't point to ${D}/usr/share/nethackdir
+ dosed "s:^\(HACKDIR=\).*:\1${HACKDIR}:" ${GAMES_BINDIR}/nethack
+
+ doman doc/*.6
+ dodoc doc/*.txt
+
+ # Can be copied to ~/.nethackrc to set options
+ # Add this to /etc/.skel as well, thats the place for default configs
+ insinto ${HACKDIR}
+ doins ${FILESDIR}/dot.nethackrc
+ local windowtypes="tty"
+ [ `use gnome` ] && windowtypes="${windowtypes} gnome"
+ [ `use qt` ] && windowtypes="${windowtypes} qt"
+ [ `use X` ] && windowtypes="${windowtypes} x11"
+ set -- ${windowtypes}
+ dosed "s:GENTOO_WINDOWTYPES:${windowtypes}:" ${HACKDIR}/dot.nethackrc
+ dosed "s:GENTOO_DEFWINDOWTYPE:$1:" ${HACKDIR}/dot.nethackrc
+ insinto /etc/skel
+ newins ${D}/${HACKDIR}/dot.nethackrc .nethackrc
+
+ if [ `use X` ] ; then
+ # install nethack fonts
+ cd ${S}/win/X11
+ bdftopcf -o nh10.pcf nh10.bdf || die "Converting fonts failed"
+ bdftopcf -o ibm.pcf ibm.bdf || die "Converting fonts failed"
+ insinto ${HACKDIR}/fonts
+ doins *.pcf
+ cd ${D}/${HACKDIR}/fonts
+ mkfontdir || die "The action mkfontdir ${D}${HACKDIR}/fonts failed"
+
+ # copy nethack x application defaults
+ cd ${S}/win/X11
+ insinto /etc/X11/app-defaults
+ newins NetHack.ad NetHack || die "Failed to install NetHack X app defaults"
+ dosed 's:^!\(NetHack.tile_file.*\):\1:' /etc/X11/app-defaults/NetHack
+ fi
+
+ # make sure we dont overwrite previous settings #16428
+ local statedir=${GAMES_STATEDIR}/${PN}
+ dodir ${statedir}
+ mv ${D}/${HACKDIR}/{record,logfile,perm} ${D}/${statedir}/
+ for f in record logfile perm ; do
+ [ ! -e ${statedir}/${f} ] && continue
+ mv ${D}/${statedir}/${f}{,.sample}
+ done
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ touch ${GAMES_STATEDIR}/${PN}/{record,logfile,perm}
+ mkdir -p ${GAMES_STATEDIR}/${PN}/save
+ chmod -R 660 ${GAMES_STATEDIR}/${PN}
+ chmod 770 ${GAMES_STATEDIR}/${PN} ${GAMES_STATEDIR}/${PN}/save
+ einfo "you may want to look at /etc/skel/.nethackrc for interesting options"
+ games_pkg_postinst
+}
diff --git a/games-roguelike/nethack/nethack-3.4.1.ebuild b/games-roguelike/nethack/nethack-3.4.1.ebuild
new file mode 100644
index 000000000000..144a5fdd295d
--- /dev/null
+++ b/games-roguelike/nethack/nethack-3.4.1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/nethack-3.4.1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games eutils flag-o-matic
+append-flags -fomit-frame-pointer -I../include
+
+MY_PV=${PV//.}
+
+DESCRIPTION="The ultimate old-school single player dungeon exploration game"
+HOMEPAGE="http://www.nethack.org/"
+SRC_URI="mirror://sourceforge/nethack/${PN}-${MY_PV}.tgz"
+#SRC_URI="ftp://ftp.nethack.org/pub/nethack/nh340/src/nethack-340.tgz"
+
+KEYWORDS="x86 ppc"
+SLOT="0"
+LICENSE="nethack"
+IUSE="X qt gnome"
+
+DEPEND="virtual/glibc
+ dev-util/yacc
+ >=sys-libs/ncurses-5.2-r5
+ X? ( x11-base/xfree )
+ qt? ( =x11-libs/qt-2* )
+ gnome? ( >=gnome-base/gnome-libs-1.4.1.4-r2 )"
+
+HACKDIR=${GAMES_DATADIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+
+ # This copies the /sys/unix Makefile.*s to their correct places for
+ # seding and compiling.
+ cd ${S}/sys/unix
+ source setup.sh || die
+
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-errno.patch
+ epatch ${FILESDIR}/${PV}-GNOME-RTLD_NEXT.patch
+ epatch ${FILESDIR}/${PV}-default-options.patch
+
+ cp ${S}/include/config.h{,.orig}
+ sed -e "s:GENTOO_HACKDIR:${HACKDIR}:" \
+ ${S}/include/config.h.orig > ${S}/include/config.h
+
+ if [ `use X` ] ; then
+ epatch ${FILESDIR}/${PV}-X-support.patch
+ if [ `use qt` ] ; then
+ epatch ${FILESDIR}/${PV}-QT-support.patch
+ [ `use gnome` ] && epatch ${FILESDIR}/${PV}-QT-GNOME-support.patch
+ elif [ `use gnome` ] ; then
+ epatch ${FILESDIR}/${PV}-GNOME-support.patch
+ fi
+ fi
+}
+
+src_compile() {
+ cd ${S}/src
+ make \
+ QTDIR=/usr/qt/2 \
+ CC="${CC:-gcc}" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="-L/usr/X11R6/lib" \
+ || die
+ cd ${S}/util
+ make CFLAGS="${CFLAGS}" recover || die
+}
+
+src_install() {
+ make \
+ CC="${CC:-gcc}" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="-L/usr/X11R6/lib" \
+ GAMEPERM=0755 \
+ PREFIX=${D}/usr \
+ GAMEDIR=${D}${HACKDIR} \
+ SHELLDIR=${D}/${GAMES_BINDIR} \
+ install \
+ || die "make install failed"
+ newgamesbin util/recover recover-nethack
+
+ # The final nethack is a sh script. This fixes the hard-coded
+ # HACKDIR directory so it doesn't point to ${D}/usr/share/nethackdir
+ dosed "s:^\(HACKDIR=\).*:\1${HACKDIR}:" ${GAMES_BINDIR}/nethack
+
+ doman doc/*.6
+ dodoc doc/*.txt
+
+ # Can be copied to ~/.nethackrc to set options
+ # Add this to /etc/.skel as well, thats the place for default configs
+ insinto ${HACKDIR}
+ doins ${FILESDIR}/dot.nethackrc
+ local windowtypes="tty"
+ [ `use gnome` ] && windowtypes="${windowtypes} gnome"
+ [ `use qt` ] && windowtypes="${windowtypes} qt"
+ [ `use X` ] && windowtypes="${windowtypes} x11"
+ set -- ${windowtypes}
+ dosed "s:GENTOO_WINDOWTYPES:${windowtypes}:" ${HACKDIR}/dot.nethackrc
+ dosed "s:GENTOO_DEFWINDOWTYPE:$1:" ${HACKDIR}/dot.nethackrc
+ insinto /etc/skel
+ newins ${D}/${HACKDIR}/dot.nethackrc .nethackrc
+
+ if [ `use X` ] ; then
+ # install nethack fonts
+ cd ${S}/win/X11
+ bdftopcf -o nh10.pcf nh10.bdf || die "Converting fonts failed"
+ bdftopcf -o ibm.pcf ibm.bdf || die "Converting fonts failed"
+ insinto ${HACKDIR}/fonts
+ doins *.pcf
+ cd ${D}/${HACKDIR}/fonts
+ mkfontdir || die "The action mkfontdir ${D}${HACKDIR}/fonts failed"
+
+ # copy nethack x application defaults
+ cd ${S}/win/X11
+ insinto /etc/X11/app-defaults
+ newins NetHack.ad NetHack || die "Failed to install NetHack X app defaults"
+ dosed 's:^!\(NetHack.tile_file.*\):\1:' /etc/X11/app-defaults/NetHack
+ fi
+
+ keepdir /usr/share/games/nethack/save
+
+ # make sure we dont overwrite previous settings #16428
+ for f in record logfile perm ; do
+ [ ! -e ${HACKDIR}/${f} ] && continue
+ mv ${D}/${HACKDIR}/${f}{,.sample}
+ done
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ touch ${HACKDIR}/{record,logfile,perm}
+ einfo "you may want to look at /etc/skel/.nethackrc for interesting options"
+ games_pkg_postinst
+}