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/slashem
parentrepoman: fix leading whitespace (diff)
downloadhistorical-0bb76cbaabcb2e024867417795e8c6b19786b020.tar.gz
historical-0bb76cbaabcb2e024867417795e8c6b19786b020.tar.bz2
historical-0bb76cbaabcb2e024867417795e8c6b19786b020.zip
hello rogues
Diffstat (limited to 'games-roguelike/slashem')
-rw-r--r--games-roguelike/slashem/ChangeLog9
-rw-r--r--games-roguelike/slashem/Manifest11
-rw-r--r--games-roguelike/slashem/files/0.0.6E4F8-errno.patch197
-rw-r--r--games-roguelike/slashem/files/0.0.6E4F8-gentoo-paths.patch26
-rw-r--r--games-roguelike/slashem/files/0.0.6E4F8-makefile.patch219
-rw-r--r--games-roguelike/slashem/files/X11.configure28
-rw-r--r--games-roguelike/slashem/files/digest-slashem-0.0.6482
-rw-r--r--games-roguelike/slashem/files/dot.slashemrc105
-rw-r--r--games-roguelike/slashem/files/gnome.configure14
-rw-r--r--games-roguelike/slashem/files/gtk.configure14
-rw-r--r--games-roguelike/slashem/files/qt.configure10
-rw-r--r--games-roguelike/slashem/slashem-0.0.648.ebuild139
12 files changed, 774 insertions, 0 deletions
diff --git a/games-roguelike/slashem/ChangeLog b/games-roguelike/slashem/ChangeLog
new file mode 100644
index 000000000000..897825a513e2
--- /dev/null
+++ b/games-roguelike/slashem/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for app-games/slashem
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/slashem/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*slashem-0.0.648 (14 Aug 2003)
+
+ 14 Aug 2003; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Pekka Rousu <prousu@despammed.com>. #11692
+ This entire package is his doing and daaaaaaaaamn is it *good*. Many thanks :)
diff --git a/games-roguelike/slashem/Manifest b/games-roguelike/slashem/Manifest
new file mode 100644
index 000000000000..3f559b3c5c0d
--- /dev/null
+++ b/games-roguelike/slashem/Manifest
@@ -0,0 +1,11 @@
+MD5 7042d07dab18e8ce6bf5f99c2497db44 files/0.0.6E4F8-errno.patch 4788
+MD5 c0702cf01cb9b34fb41418616181e7e8 files/0.0.6E4F8-gentoo-paths.patch 818
+MD5 a7d2ae8f086e4eaf658e35e261ac9766 files/0.0.6E4F8-makefile.patch 6981
+MD5 18340044152321018649d5b65c31278b files/X11.configure 630
+MD5 9393ce3bf57372ec847503f8c806a072 files/digest-slashem-0.0.648 120
+MD5 7e5fae501e9a74fb3bc3eb1569308cdc files/dot.slashemrc 3491
+MD5 582f28b3c2d30a80415ff9c92ca6e77b files/gnome.configure 275
+MD5 b38854e3518f58d3deb1751abf1049d9 files/gtk.configure 238
+MD5 07f0de2a5c98da1af7a9e3ca3ce377fd files/qt.configure 182
+MD5 7721189d4a5a7ff05a3873430d1dc5d0 ChangeLog 464
+MD5 f2bdd6a783b0fb49828f7ac2dcb0382f slashem-0.0.648.ebuild 4368
diff --git a/games-roguelike/slashem/files/0.0.6E4F8-errno.patch b/games-roguelike/slashem/files/0.0.6E4F8-errno.patch
new file mode 100644
index 000000000000..5c05c6f5e4e6
--- /dev/null
+++ b/games-roguelike/slashem/files/0.0.6E4F8-errno.patch
@@ -0,0 +1,197 @@
+diff -Naurd slashem-0.0.6E4F8-old/src/do.c slashem-0.0.6E4F8/src/do.c
+--- slashem-0.0.6E4F8-old/src/do.c 2002-04-01 01:05:53.000000000 +0300
++++ slashem-0.0.6E4F8/src/do.c 2003-07-28 17:21:50.000000000 +0300
+@@ -17,7 +17,7 @@
+ #ifdef _DCC
+ const
+ #endif
+-extern int errno;
++#include <errno.h>
+ #endif
+
+ #ifdef SINKS
+diff -Naurd slashem-0.0.6E4F8-old/src/files.c slashem-0.0.6E4F8/src/files.c
+--- slashem-0.0.6E4F8-old/src/files.c 2002-04-01 01:05:54.000000000 +0300
++++ slashem-0.0.6E4F8/src/files.c 2003-07-28 17:21:33.000000000 +0300
+@@ -17,7 +17,7 @@
+ #if defined(UNIX) || defined(VMS)
+ #include <errno.h>
+ # ifndef SKIP_ERRNO
+-extern int errno;
++#include <errno.h>
+ # endif
+ #include <signal.h>
+ #endif
+diff -Naurd slashem-0.0.6E4F8-old/sys/unix/cpp2.shr slashem-0.0.6E4F8/sys/unix/cpp2.shr
+--- slashem-0.0.6E4F8-old/sys/unix/cpp2.shr 2002-04-01 01:06:10.000000000 +0300
++++ slashem-0.0.6E4F8/sys/unix/cpp2.shr 2003-07-28 17:21:01.000000000 +0300
+@@ -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])) {
+diff -Naurd slashem-0.0.6E4F8-old/sys/unix/unixres.c slashem-0.0.6E4F8/sys/unix/unixres.c
+--- slashem-0.0.6E4F8-old/sys/unix/unixres.c 2002-04-01 01:06:10.000000000 +0300
++++ slashem-0.0.6E4F8/sys/unix/unixres.c 2003-07-28 17:19:23.000000000 +0300
+@@ -13,51 +13,47 @@
+ * so temporarily dropping privileges on these systems is sufficient to
+ * hide them.
+ */
++#ifdef __GNUC__
++#define _GNU_SOURCE
++#endif
+
+ #include "config.h"
+
+ #ifdef GETRES_SUPPORT
+
+-#if defined(LINUX)
++# if defined(LINUX)
+
+-static _syscall3(int, getresuid, unsigned short *, ruid, \
+- unsigned short *, euid, unsigned short *, suid)
+-static _syscall3(int, getresgid, unsigned short *, rgid, \
+- unsigned short *, egid, unsigned short *, sgid)
++/* requires dynamic linking with libc */
++#include <dlfcn.h>
+
+ static int
+ real_getresuid(ruid, euid, suid)
+ uid_t *ruid, *euid, *suid;
+ {
+- int retval;
+- unsigned short r, e, s;
+- retval = getresuid(&r, &e, &s);
+- if (!retval) {
+- *ruid = r;
+- *euid = e;
+- *suid = s;
+- }
+- return retval;
++ int (*f)(uid_t *, uid_t *, uid_t *); /* getresuid signature */
++
++ f = dlsym(RTLD_NEXT, "getresuid");
++ if (!f) return -1;
++
++ return f(ruid, euid, suid);
+ }
+
+ static int
+ real_getresgid(rgid, egid, sgid)
+ gid_t *rgid, *egid, *sgid;
+ {
+- int retval;
+- unsigned short r, e, s;
+- retval = getresgid(&r, &e, &s);
+- if (!retval) {
+- *rgid = r;
+- *egid = e;
+- *sgid = s;
+- }
+- return retval;
++ int (*f)(gid_t *, gid_t *, gid_t *); /* getresgid signature */
++
++ f = dlsym(RTLD_NEXT, "getresgid");
++ if (!f) return -1;
++
++ return f(rgid, egid, sgid);
+ }
+
+-#elif defined(BSD) || defined(SVR4)
++# else
++# if defined(BSD) || defined(SVR4)
+
+-#ifdef SYS_getresuid
++# ifdef SYS_getresuid
+
+ static int
+ real_getresuid(ruid, euid, suid)
+@@ -66,7 +62,7 @@
+ return syscall(SYS_getresuid, ruid, euid, suid);
+ }
+
+-#else /* SYS_getresuid */
++# else /* SYS_getresuid */
+
+ static int
+ real_getresuid(ruid, euid, suid)
+@@ -88,9 +84,9 @@
+ return retval;
+ }
+
+-#endif /* SYS_getresuid */
++# endif /* SYS_getresuid */
+
+-#ifdef SYS_getresgid
++# ifdef SYS_getresgid
+
+ static int
+ real_getresgid(rgid, egid, sgid)
+@@ -99,7 +95,7 @@
+ return syscall(SYS_getresgid, rgid, egid, sgid);
+ }
+
+-#else /* SYS_getresgid */
++# else /* SYS_getresgid */
+
+ static int
+ real_getresgid(rgid, egid, sgid)
+@@ -121,8 +117,9 @@
+ return retval;
+ }
+
+-#endif /* SYS_getresgid */
+-#endif /* LINUX || BSD || SVR4 */
++# endif /* SYS_getresgid */
++# endif /* BSD || SVR4 */
++# endif /* LINUX */
+
+ static unsigned int hiding_privileges = 0;
+
+@@ -199,11 +196,13 @@
+
+ #else /* GETRES_SUPPORT */
+
++# ifdef GNOME_GRAPHICS
+ int
+ hide_privileges(flag)
+ boolean flag;
+ {
+ return 0;
+ }
++# endif
+
+ #endif /* GETRES_SUPPORT */
+diff -Naurd slashem-0.0.6E4F8-old/sys/unix/unixunix.c slashem-0.0.6E4F8/sys/unix/unixunix.c
+--- slashem-0.0.6E4F8-old/sys/unix/unixunix.c 2002-04-01 01:06:10.000000000 +0300
++++ slashem-0.0.6E4F8/sys/unix/unixunix.c 2003-07-28 17:25:21.000000000 +0300
+@@ -134,7 +134,7 @@
+ #endif
+ if(date - buf.st_mtime < 3L*24L*60L*60L) { /* recent */
+ #ifndef NETWORK
+- extern int errno;
++#include <errno.h>
+ #endif
+ int lockedpid; /* should be the same size as hackpid */
+
+@@ -188,7 +188,8 @@
+ void
+ getlock()
+ {
+- extern int errno;
++/*#include <errno.h>
++ extern int errno;*/
+ register int i = 0, fd, c;
+ #ifndef FILE_AREAS
+ const char *fq_lock;
diff --git a/games-roguelike/slashem/files/0.0.6E4F8-gentoo-paths.patch b/games-roguelike/slashem/files/0.0.6E4F8-gentoo-paths.patch
new file mode 100644
index 000000000000..d170854f68f0
--- /dev/null
+++ b/games-roguelike/slashem/files/0.0.6E4F8-gentoo-paths.patch
@@ -0,0 +1,26 @@
+--- include/unixconf.h.orig 2003-08-14 21:40:11.533226120 -0400
++++ include/unixconf.h 2003-08-14 21:40:46.557901560 -0400
+@@ -154,13 +154,7 @@
+
+ /* #define NO_FILE_LINKS */ /* if no hard links */
+
+-#ifdef NO_FILE_LINKS
+-# ifdef FILE_AREAS
+-# define LOCKDIR FILE_AREA_VAR /* where to put locks */
+-# else
+-# define LOCKDIR "/usr/games/lib/nethackdir" /* where to put locks */
+-# endif
+-#endif
++# define LOCKDIR "GENTOO_STATEDIR" /* where to put locks */
+
+ /*
+ * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
+@@ -174,7 +168,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 "GENTOO_STATEDIR"
+
+
+
diff --git a/games-roguelike/slashem/files/0.0.6E4F8-makefile.patch b/games-roguelike/slashem/files/0.0.6E4F8-makefile.patch
new file mode 100644
index 000000000000..5d461a5e331a
--- /dev/null
+++ b/games-roguelike/slashem/files/0.0.6E4F8-makefile.patch
@@ -0,0 +1,219 @@
+diff -Naurd slashem-0.0.6E4F8-old/sys/unix/Makefile.src slashem-0.0.6E4F8/sys/unix/Makefile.src
+--- slashem-0.0.6E4F8-old/sys/unix/Makefile.src 2002-04-01 01:06:31.000000000 +0300
++++ slashem-0.0.6E4F8/sys/unix/Makefile.src 2003-07-28 20:06:27.000000000 +0300
+@@ -134,25 +134,35 @@
+ #LD = gcc
+ #LFLAGS = -Xlinker -soname=_APP_
+
++# flags for debugging:
++# CFLAGS = -g -I../include
++
++CFLAGS = -O -I../include
++LFLAGS =
++
++TTY_SUPPORT=y
++#X11_SUPPORT=y
++#QT_SUPPORT=y
++#GNOME_SUPPORT=y
++#GTK_SUPPORT=y
++
+ # Only used for the Gnome interface.
+ # When including the Gnome interface, you need to include gnome specific
+ # directories. The ones given below is the usual spot for linux systems.
+ # The paths are for glibconfig.h and gnomesupport.h respectively.
+ #
++ifdef GNOME_SUPPORT
+ #GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs/include -I../win/gnome
+ GNOMEINC=`gnome-config gnome --cflags` -I../win/gnome
++endif # GNOME_SUPPORT
+
+-# flags for debugging:
+-# CFLAGS = -g -I../include
+-
+-CFLAGS = -O -I../include
+-LFLAGS =
++ifdef QT_SUPPORT
+
+ # QT windowing system
+ # SuSE 6.1
+-# QTDIR=/usr/lib/qt
++# QTDIR = /usr/qt/2
+ # RedHat 6.1
+-# QTDIR=/usr/lib/qt-2.0.1
++# QTDIR = /usr/lib/qt-2.0.1
+ #
+ QTLIBDIR=$(QTDIR)/lib
+ QTINCDIR=$(QTDIR)/include
+@@ -174,18 +184,25 @@
+ CXX=g++
+ #LD=g++
+
++endif # QT_SUPPORT
++
++ifdef GTK_SUPPORT
+ # GTK windowing system
+ WINGTKCONFIG=gtk-config
+ WINGTKCFLAGS=`$(WINGTKCONFIG) --cflags`
++endif #GTK_SUPPORT
+
+ # Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
+ # combination of windowing systems. Also set windowing systems in config.h.
+ #
+ # files for a straight tty port using no native windowing system
++ifdef TTY_SUPPORT
+ WINTTYSRC = ../win/tty/getline.c ../win/tty/termcap.c ../win/tty/topl.c \
+ ../win/tty/wintty.c
+ WINTTYOBJ = getline.o termcap.o topl.o wintty.o
+-#
++endif # TTY_SUPPORT
++
++ifdef X11_SUPPORT
+ # files for an X11 port
+ # (tile.c is included in the defn. for WINCSRC, below)
+ WINX11SRC = ../win/X11/Window.c ../win/X11/dialogs.c ../win/X11/winX.c \
+@@ -194,23 +211,32 @@
+ ../win/X11/winval.c
+ WINX11OBJ = Window.o dialogs.o winX.o winmap.o winmenu.o winmesg.o \
+ winmisc.o winstat.o wintext.o winval.o nhwin.a
++endif # X11_SUPPORT
++
++ifdef QT_SUPPORT
+ #
+ # Files for a Qt port
+ #
+ WINQTSRC = ../win/Qt/qt_win.cpp ../win/Qt/qt_clust.cpp
+ WINQTOBJ = qt_win.o qt_clust.o nhwin.a
++endif # QT_SUPPORT
++
+ #
+ # files for a GTK port
+ #
++ifdef GTK_SUPPORT
+ WINGTKSRC = ../win/gtk/gtk.c ../win/gtk/gtkgetlin.c ../win/gtk/gtkstatus.c \
+ ../win/gtk/gtkmenu.c ../win/gtk/gtkyn.c ../win/gtk/gtkextcmd.c \
+ ../win/gtk/gtkmap.c ../win/gtk/gtkmessage.c ../win/gtk/gtkmisc.c \
+ ../win/gtk/xshmmap.c ../win/gtk/xshm.c
+ WINGTKOBJ = gtk.o gtkgetlin.o gtkstatus.o gtkmenu.o gtkyn.o gtkextcmd.o \
+ gtkmap.o gtkmessage.o gtkmisc.o xshmmap.o xshm.o nhwin.a
++endif # GTK_SUPPORT
++
+ #
+ # Files for a Gnome port
+ #
++ifdef GNOME_SUPPORT
+ WINGNOMESRC = ../win/gnome/gnaskstr.c ../win/gnome/gnbind.c \
+ ../win/gnome/gnglyph.c ../win/gnome/gnmain.c ../win/gnome/gnmap.c \
+ ../win/gnome/gnmenu.c ../win/gnome/gnmesg.c ../win/gnome/gnopts.c \
+@@ -219,6 +245,8 @@
+ WINGNOMEOBJ = gnaskstr.o gnbind.o gnglyph.o gnmain.o gnmap.o gnmenu.o \
+ gnmesg.o gnopts.o gnplayer.o gnsignal.o gnstatus.o gntext.o \
+ gnyesno.o nhwin.a
++endif # GNOME_SUPPORT
++
+ #
+ # Files for a Gem port
+ WINGEMSRC = ../win/gem/wingem.c ../win/gem/wingem1.c ../win/gem/load_img.c
+@@ -235,8 +263,8 @@
+ WINSRC = $(WINTTYSRC)
+ WINOBJ = $(WINTTYOBJ)
+ # Use these declarations if you want to support the X11 windowing system
+-# WINSRC = $(WINTTYSRC) $(WINX11SRC)
+-# WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
++# WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGTKSRC) $(WINQTSRC) $(WINGNOMESRC)
++# WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINGTKOBJ) $(WINQTOBJ) $(WINGNOMEOBJ)
+ # Use these declarations if you want to support the Qt windowing system
+ # WINSRC = $(WINTTYSRC) $(WINQTSRC)
+ # WINOBJ = $(WINTTYOBJ) $(WINQTOBJ)
+@@ -255,32 +283,42 @@
+ # Linux uses -ltermcap or -lncurses
+ # Be uses -ltermcap
+ #
++ifdef TTY_SUPPORT
+ # libraries for tty ports
+ # WINTTYLIB = -ltermcap
+ # WINTTYLIB = -lcurses
+ # WINTTYLIB = -lcurses16
+ # WINTTYLIB = -lncurses
+ WINTTYLIB = -ltermlib
+-#
++endif # TTY_SUPPORT
++
++ifdef X11_SUPPORT
+ # 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 -lXt -lX11
+ # WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
+ # WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
+-#
++endif # X11_SUPPORT
++
++ifdef QT_SUPPORT
+ # libraries for Qt
+ WINQTLIB = -L$(QTLIBDIR) -lqt
+ #
+ # libraries for KDE (with Qt)
+ WINKDELIB = -lkdecore -lkdeui -lXext
+-#
++endif # QT_SUPPORT
++
++ifdef GTK_SUPPORT
+ # libraries for GTK
+ WINGTKLIB = `$(WINGTKCONFIG) --libs`
+-#
++endif #GTK_SUPPORT
++
++ifdef GNOME_SUPPORT
+ # libraries for Gnome
+ WINGNOMELIB = -lgnomeui -lgnome -lart_lgpl -lgtk -lgdk -lpopt
+-#
++endif # GNOME_SUPPORT
++
+ # libraries for Gem port
+ WINGEMLIB = -le_gem -lgem
+ #
+@@ -290,7 +328,7 @@
+ # Use this declaration if you only want to support the TTY windowing system
+ WINLIB = $(WINTTYLIB)
+ # Use this declaration if you want to support the X11 windowing system
+-# WINLIB = $(WINTTYLIB) $(WINX11LIB)
++# WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINGTKLIB) $(WINQTLIB) $(WINGNOMELIB)
+ # Use this declaration if you want to support the Qt windowing system
+ # WINLIB = $(WINTTYLIB) $(WINQTLIB)
+ # Use these declarations if you want to support the GTK windowing system
+diff -Naurd slashem-0.0.6E4F8-old/sys/unix/Makefile.top slashem-0.0.6E4F8/sys/unix/Makefile.top
+--- slashem-0.0.6E4F8-old/sys/unix/Makefile.top 2002-04-01 01:06:10.000000000 +0300
++++ slashem-0.0.6E4F8/sys/unix/Makefile.top 2003-07-28 20:06:39.000000000 +0300
+@@ -72,6 +72,14 @@
+ # KDEDIR = /opt/kde
+ # SHELLDIR = $(KDEDIR)/bin
+
++#SMALLTILES=x11tiles
++#BIGTILES=x11bigtiles
++#BIG3DTILES=x11big3dtiles
++#PETMARK=pet_mark.xbm
++#RIP=rip.xpm
++#GTKFILES=credit.xpm gtkrc
++#MAPBG=mapbg.xpm
++
+ # Shareable (architecture independent) data files which are not candidates
+ # for inclusion in DLB libraries (ND) and which are (D). Port specific files
+ # per discussions in Install.X11, Install.Qt and Install.GTK
+@@ -89,7 +97,7 @@
+ # CNF_SHARE_DATND = $(CNF_SHARE_X11ND)
+ # CNF_SHARE_DATND = $(CNF_SHARE_QTND)
+ # CNF_SHARE_DATND = $(CNF_SHARE_GTKND)
+-CNF_SHARE_DATND =
++CNF_SHARE_DATND = $(SMALLTILES) $(BIGTILES) $(BIG3DTILES) $(PETMARK) $(RIP) $(GTKFILES) $(MAPBG)
+
+ CNF_SHARE_DATD = data oracles options quest.dat rumors
+ CNF_SHARE_DAT = $(CNF_SHARE_DATD) $(CNF_SHARE_DATND)
+@@ -239,7 +247,7 @@
+ -e '$$s/.*/nodlb/p' < dat/options` ; \
+ $(MAKE) dofiles-$${target-nodlb}
+ cp src/$(GAME) $(FILE_AREA_UNSHARE)
+- cp license doc/Guidebook.txt $(FILE_AREA_DOC)
++# cp license doc/Guidebook.txt $(FILE_AREA_DOC)
+ # cp win/Qt/KDE/kslashem.kdelnk $(KDEDIR)/share/applnk/Games
+ -rm -f $(SHELLDIR)/$(GAME)
+ sed -e 's;/usr/games/lib/nethackdir;$(FILE_AREA_UNSHARE);' \
diff --git a/games-roguelike/slashem/files/X11.configure b/games-roguelike/slashem/files/X11.configure
new file mode 100644
index 000000000000..16d478452d52
--- /dev/null
+++ b/games-roguelike/slashem/files/X11.configure
@@ -0,0 +1,28 @@
+configure config_h $toplevel/include/config.h
+BEGIN
+ define X11_GRAPHICS
+ undefine QT_GRAPHICS
+ undefine GTK_GRAPHICS
+ undefine GNOME_GRAPHICS
+ define USE_XPM
+END
+
+configure src_Makefile $toplevel/src/Makefile
+BEGIN
+ undefine WINSRC
+ undefine WINOBJ
+ undefine WINLIB
+ define -C "to support the X11 windowing system" WINSRC
+ define -C "to support the X11 windowing system" WINOBJ
+ define -C "to support the X11 windowing system" WINLIB
+ redefine WINX11LIB "-lXaw -lXmu -lXext -lXt -lXpm -lX11"
+ define X11_SUPPORT
+END
+
+configure Makefile $toplevel/Makefile
+BEGIN
+ define SMALLTILES
+ define BIGTILES
+ define PETMARK
+ define RIP
+END
diff --git a/games-roguelike/slashem/files/digest-slashem-0.0.648 b/games-roguelike/slashem/files/digest-slashem-0.0.648
new file mode 100644
index 000000000000..d1d470e1bb70
--- /dev/null
+++ b/games-roguelike/slashem/files/digest-slashem-0.0.648
@@ -0,0 +1,2 @@
+MD5 2abd847d4f5fc426d6c7ed5a97b0de99 se006e4f8.tar.gz 4331015
+MD5 388785f9880bcd471432f79434522a75 conf111s.tar.gz 3852
diff --git a/games-roguelike/slashem/files/dot.slashemrc b/games-roguelike/slashem/files/dot.slashemrc
new file mode 100644
index 000000000000..d61a983025b5
--- /dev/null
+++ b/games-roguelike/slashem/files/dot.slashemrc
@@ -0,0 +1,105 @@
+#
+# Slash'EM configuration file.
+#
+# Naming this file $(HOME)/.slashemrc (for UNIX) or setting the environment
+# variable SLASHEMOPTIONS to point to its full path name elsewhere tells
+# Slash'EM to use X11 windowing and fonts (provided the executable was
+# compiled with that ability).
+#
+# SET YOUR WINDOW TYPE
+# Your windowtype choices are: GENTOO_WINDOWTYPES
+#
+OPTIONS=windowtype:tty
+TILESET=name:Small, file:x11tiles
+TILESET=name:Big, file:x11bigtiles, transparent
+TILESET=name:Big 3D, file:x11big3dtiles, transparent, pseudo3D
+OPTIONS=tiles:Big
+#
+#
+#OPTIONS=toptenwin,hilite_pet,color,number_pad,verbose,news
+#OPTIONS=confirm,fixinv,noautopickup,safe_pet,sortpack,tombstone
+#OPTIONS=fruit:pineapple,dogname:Dhairrhuwyth
+#OPTIONS=male,catname:Ghisteslwchlohm
+#
+# 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 \
+# 143 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 \
+# 171 172 173 174 175 176 177 178 179 \
+# 171 172 173 174 175 176 177 178 179 \
+# 171 172 173 174 175 176 177 178 179 \
+# 171 172 173 174 175 176 177 178 179 \
+# 171 172 173 174 175 176 177 178 179 \
+# 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 \
+# 154 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 \
+# 181 182 183 184 185 186 187 188 189 \
+# 181 182 183 184 185 186 187 188 189 \
+# 181 182 183 184 185 186 187 188 189 \
+# 181 182 183 184 185 186 187 188 189 \
+# 181 182 183 184 185 186 187 188 189 \
+# 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 \
+# 092 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 \
+# 047 064 092 064 064 064 092 064 047 \
+# 047 064 092 064 064 064 092 064 047 \
+# 047 064 092 064 064 064 092 064 047 \
+# 047 064 092 064 064 064 092 064 047 \
+# 047 064 092 064 064 064 092 064 047 \
+# 047 064 092 064 064 064 092 064 047
diff --git a/games-roguelike/slashem/files/gnome.configure b/games-roguelike/slashem/files/gnome.configure
new file mode 100644
index 000000000000..37d9ee3049e6
--- /dev/null
+++ b/games-roguelike/slashem/files/gnome.configure
@@ -0,0 +1,14 @@
+configure config_h $toplevel/include/config.h
+BEGIN
+ define GNOME_GRAPHICS
+END
+configure src_Makefile $toplevel/src/Makefile
+BEGIN
+ define GNOME_SUPPORT
+ redefine GNOMEINC "\`gnome-config --cflags gnomeui\`"
+END
+
+configure Makefile $toplevel/Makefile
+BEGIN
+ define MAPBG
+END
diff --git a/games-roguelike/slashem/files/gtk.configure b/games-roguelike/slashem/files/gtk.configure
new file mode 100644
index 000000000000..91d278f907b9
--- /dev/null
+++ b/games-roguelike/slashem/files/gtk.configure
@@ -0,0 +1,14 @@
+configure config_h $toplevel/include/config.h
+BEGIN
+ define GTK_GRAPHICS
+END
+configure src_Makefile $toplevel/src/Makefile
+BEGIN
+ define GTK_SUPPORT
+END
+
+configure Makefile $toplevel/Makefile
+BEGIN
+ define BIG3DTILES
+ define GTKFILES
+END
diff --git a/games-roguelike/slashem/files/qt.configure b/games-roguelike/slashem/files/qt.configure
new file mode 100644
index 000000000000..9fe9531c4236
--- /dev/null
+++ b/games-roguelike/slashem/files/qt.configure
@@ -0,0 +1,10 @@
+configure config_h $toplevel/include/config.h
+BEGIN
+ define QT_GRAPHICS
+END
+configure src_Makefile $toplevel/src/Makefile
+BEGIN
+ define QT_SUPPORT
+ define QTDIR
+ define LD "g++"
+END
diff --git a/games-roguelike/slashem/slashem-0.0.648.ebuild b/games-roguelike/slashem/slashem-0.0.648.ebuild
new file mode 100644
index 000000000000..6945a0f89aa0
--- /dev/null
+++ b/games-roguelike/slashem/slashem-0.0.648.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+inherit games eutils flag-o-matic
+append-flags -I../include -I/usr/X11R6/include
+
+SE_VER=0.0.6E4F8
+SE_PN=se006e4f8.tar.gz
+SE_CONF=conf111s.tar.gz
+
+DESCRIPTION="Super Lotsa Added Stuff Hack - Extended Magic. A Nethack Variant."
+HOMEPAGE="http://www.slashem.org/"
+#SRC_URI="http://www.juiblex.co.uk/nethack/slashem/${SE_PN}"
+SRC_URI="mirror://sourceforge/slashem/${SE_PN}
+ http://www.juiblex.co.uk/nethack/config/${SE_CONF}"
+
+KEYWORDS="x86"
+SLOT="0"
+LICENSE="nethack"
+IUSE="X qt gnome gtk"
+
+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 )
+ gtk? ( =x11-libs/gtk+-1.2* )"
+
+HACKDIR=${GAMES_STATEDIR}/${PN}
+S=${WORKDIR}/slashem-${SE_VER}
+
+src_unpack() {
+ unpack ${SE_PN}
+ epatch ${FILESDIR}/${SE_VER}-makefile.patch
+ epatch ${FILESDIR}/${SE_VER}-errno.patch
+ cd ${S}
+ epatch ${FILESDIR}/${SE_VER}-gentoo-paths.patch
+ sed -i "s:GENTOO_STATEDIR:${GAMES_STATEDIR}/${PN}:" include/unixconf.h
+
+ # This copies the /sys/unix Makefile.*s to their correct places for
+ # seding and compiling.
+
+ cd ${S}/sys/unix
+ source setup.sh || die
+
+ unpack ${SE_CONF}
+ cp -f ${FILESDIR}/*.configure . || die
+ ./config RedHat ../..
+ ./config FHS20 ../..
+
+ if [ `use X` ] ; then
+ ./config X11 ../.. || die "X config"
+ [ `use qt` ] && { ./config qt ../.. || die "qt config"; }
+ [ `use gtk` ] && { ./config gtk ../.. || die "gtk config"; }
+ [ `use gnome` ] && { ./config gnome ../.. || die "gnome config"; }
+ fi
+
+ cd ${S}
+ sed -i -e "s:^\(\# define HACKDIR \).*:\1 \"${HACKDIR}\":" include/config.h || die "config.h sed"
+ sed -i -e "s:^\(CFLAGS =\).*:\1 ${CFLAGS}:" src/Makefile || die "src/makefile sed"
+ sed -i -e "s:^\(FILE_AREA_UNSHARE =\).*:\1 ${GAMES_LIBDIR}/${PN}:" Makefile || die "makefile sed"
+ sed -i -e "s:^\(\#define FILE_AREA_UNSHARE \).*:\1\"${GAMES_LIBDIR}/${PN}/\":" include/unixconf.h || die "unixconf.h sed"
+}
+
+src_compile() {
+ make all || die "make all"
+ cd ${S}/util
+ make recover || die "make recover"
+}
+
+src_install() {
+ make GAMEPERM=0750 \
+ SHELLDIR=${D}/${GAMES_BINDIR} \
+ FILE_AREA_VAR=${D}/${HACKDIR} \
+ FILE_AREA_SAVE=${D}/${HACKDIR}/save \
+ FILE_AREA_SHARE=${D}/${GAMES_DATADIR}/${PN} \
+ FILE_AREA_UNSHARE=${D}/${GAMES_LIBDIR}/${PN} \
+ FILE_AREA_DOC=${D}/usr/share/doc/${PF} \
+ install || die "make install failed"
+
+ dodoc doc/*.txt
+ dodoc dat/license
+ doman doc/*.6
+
+ # The final /usr/bin/slashem is a sh script. This fixes the hard-coded
+ # HACKDIR directory so it doesn't point to ${D}/usr/share/slashemdir
+ dosed "s:^\(HACKDIR=\).*:\1${HACKDIR}:" ${GAMES_BINDIR}/${PN}
+ dosed "s:^\(HACK=\).*:\1${GAMES_LIBDIR}/${PN}/${PN}:" ${GAMES_BINDIR}/${PN}
+
+ newgamesbin util/recover recover-slashem
+
+ if [ `use X` ] ; then
+ # install slashem fonts
+ dodir ${GAMES_DATADIR}/${PN}/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 ${GAMES_DATADIR}/${PN}/fonts
+ doins *.pcf
+ cd ${D}${GAMES_DATADIR}/${PN}/fonts
+ mkfontdir || die "The action mkfontdir ${D}{GAMES_DATADIR}/${PN}/fonts failed"
+
+ # copy slashem X application defaults
+ cd ${S}/win/X11
+ cp SlashEM.ad SlashEM.ad.orig
+ sed -e 's/^\(SlashEM\*font:\).*/\1 fixed/' \
+ -e 's/^\(SlashEM\*map\*font:\).*/\1 fixed/' \
+ -e 's:^!\(SlashEM.tile_file.*\):\1:' \
+ SlashEM.ad.orig >SlashEM.ad || die "Patching SlashEM.ad for X failed"
+ cp SlashEM.ad SlashEM
+
+ insinto /etc/X11/app-defaults
+ newins SlashEM.ad SlashEM || die "Failed to install SlashEM X app defaults"
+ fi
+
+ insinto ${GAMES_DATADIR}/${PN}
+ doins ${FILESDIR}/dot.slashemrc
+
+ local windowtypes="tty"
+ [ `use gnome` ] && windowtypes="${windowtypes} gnome"
+ [ `use qt` ] && windowtypes="${windowtypes} qt"
+ [ `use X` ] && windowtypes="${windowtypes} x11"
+ [ `use gtk` ] && windowtypes="${windowtypes} gtk"
+ set -- ${windowtypes}
+ dosed "s:GENTOO_WINDOWTYPES:${windowtypes}:" ${GAMES_DATADIR}/${PN}/dot.slashemrc
+ insinto /etc/skel
+ newins ${D}/${GAMES_DATADIR}/${PN}/dot.slashemrc .slashemrc
+
+ keepdir ${HACKDIR}/save
+ prepgamesdirs
+ chmod -R g+w ${D}/${HACKDIR}
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ einfo "You may want to look at /etc/skel/.slashemrc for interesting options"
+}