--- /dev/null
+# ChangeLog for app-games/adom
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/adom/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*adom-1.1.1 (11 Jul 2003)
+
+ 11 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Andres Loeh <kosmikus@gentoo.org> #12368.
--- /dev/null
+MD5 34b564d4ab84239b6709486db40bba12 ChangeLog 370
+MD5 4ccf472dd16e31ac44de839cd815fb4e adom-1.1.1.ebuild 796
+MD5 d070375db255e71a004c837e89f7969c files/digest-adom-1.1.1 65
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/adom/adom-1.1.1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games eutils
+
+DESCRIPTION="Ancient Domains Of Mystery rogue-like game"
+HOMEPAGE="http://www.adom.de/"
+SRC_URI="http://www.adom.de/adom/download/linux/${P//.}-elf.tar.gz"
+
+LICENSE="adom"
+SLOT="0"
+KEYWORDS="x86"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5.0"
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ exeinto ${GAMES_PREFIX_OPT}/bin
+ doexe adom
+
+ dodir ${GAMES_DATADIR}/${PN}
+ keepdir ${GAMES_DATADIR}/${PN}
+ echo ${GAMES_DATADIR}/${PN} > adom_ds.cfg
+ insinto /etc
+ doins adom_ds.cfg
+
+ edos2unix adomfaq.txt
+ dodoc adomfaq.txt manual.doc readme.1st
+
+ prepgamesdirs
+}
--- /dev/null
+MD5 801484ba7c7c03b3b999365bc45db053 adom-111-elf.tar.gz 1001683
--- /dev/null
+# ChangeLog for app-games/angband
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/angband/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+ 09 Jun 2003; <msterret@gentoo.org> angband-3.0.3.ebuild:
+ don't mangle myconf when USE=-X; removed DOCDIR (unused)
+
+ 09 Jun 2003; <msterret@gentoo.org> angband-3.0.3.ebuild:
+ DEPEND on sed >= 4; check sed return value
+
+*angband-3.0.3 (19 May 2003)
+
+ 19 May 2003; Martin Holzer <mholzer@gentoo.org> angband-3.0.3.ebuild:
+ Version bumped. Closes #21048
+
+*angband-3.0.1 (06 Nov 2002)
+
+ 06 Nov 2002; Ryan Phillips <rphillips@gentoo.org> angband-3.0.1.ebuild :
+ New version
+
+*angband-3.0.0 (15 Jul 2002)
+
+ 15 Jul 2002; J. Alberto S. L. <bass@gentoo.org> angband-3.0.0.ebuild:
+ First relase
+
--- /dev/null
+MD5 166bf6a071476d096a14cc12f5c634f9 files/digest-angband-3.0.3 66
+MD5 34844b84a0c5a39960ef8380ba9583c4 angband-3.0.3.ebuild 1104
+MD5 59b8a6d7bac1cc0c334664e5634f3bac ChangeLog 822
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/angband/angband-3.0.3.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games
+
+DESCRIPTION="A Roguelike adventure game"
+HOMEPAGE="http://thangorodrim.net/"
+SRC_URI="ftp://clockwork.dementia.org/${PN}/Source/${P}.tar.gz"
+
+LICENSE="Moria | GPL-2"
+SLOT="0"
+KEYWORDS="x86 ppc"
+IUSE="X"
+
+DEPEND="virtual/glibc
+ >=sys-apps/sed-4
+ >=sys-libs/ncurses-5
+ X? ( >=x11-base/xfree-4.0 )"
+
+src_compile() {
+ local myconf="--bindir=/usr/games/bin --with-setgid=games"
+ myconf="${myconf} `use_with X x`"
+ sed -i "s:/games/:/:" configure || die "sed configure failed"
+ chmod +x configure
+ egamesconf ${myconf} || die "configure failed"
+ emake || die "make failed"
+}
+
+pkg_preinst() {
+ rm ${D}/usr/share/games/angband/lib/apex/scores.raw
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ dodoc AUTHORS COPYING THANKS TODO changes.txt compile.txt readme.txt
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ chmod -R g+w /usr/share/games/angband/lib/{apex,save,user}
+}
--- /dev/null
+MD5 5a2796eca8faffe25a519770e7029388 angband-3.0.3.tar.gz 1374750
--- /dev/null
+# ChangeLog for app-games/crossfire-client
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+
+*crossfire-client-1.5.0 (27 Jun 2003)
+
+ 03 Aug 2003; Mike Frysinger <vapier@gentoo.org> :
+ Disable alsa if using newer version #25743.
+
+ 27 Jun 2003; Mike Frysinger <vapier@gentoo.org> :
+ Version bump #22201 + games.eclass support + errno patch.
+ Also reworked optional stuff.
+
+*crossfire-client-1.4.0 (22 Nov 2002)
+
+ 12 Jun 2003; Seemant Kulleen <seemant@gentoo.org>
+ crossfire-client-1.2.1.ebuild, crossfire-client-1.4.0.ebuild:
+ xfree provides xpm
+
+ 22 Nov 2002; Mike Frysinger <vapier@gentoo.org> :
+ Version bump for 10810 and general cleanups
+
+*crossfire-client-1.2.1 (09 May 2002)
+
+ 23 Sep 2002; Mike Frysinger <vapier@gentoo.org> :
+ Updated SRC_URI to use mirror: and LICENSE to GPL-2
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> crossfire-client-1.2.1.ebuild :
+ Added KEYWORDS, SLOT.
+
+ 09 May 2002; J. Alberto Suárez L. <bass@gentoo.org> crossfire-client-1.2.1.ebuild:
+ Added the Crossfire-client to portage.
--- /dev/null
+MD5 d8e0b6aeda4e4938606822e33edf7322 files/digest-crossfire-client-1.5.0 74
+MD5 ad1e49c4a56222488166b9c4f4091a55 files/1.5.0-errno.patch 682
+MD5 a3add6a20959912624ecefb98814b94d crossfire-client-1.5.0.ebuild 1441
+MD5 c86775e8d8951d96331c9ff01f9191d6 ChangeLog 1069
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/crossfire-client/crossfire-client-1.5.0.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games eutils
+
+DESCRIPTION="Client for the nethack-style but more in the line of UO"
+HOMEPAGE="http://crossfire.real-time.com/"
+SRC_URI="mirror://sourceforge/crossfire/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ppc"
+IUSE="sdl gnome gtk alsa"
+
+DEPEND="virtual/x11
+ sdl? ( media-libs/libsdl
+ media-libs/sdl-image )
+ gnome? ( gnome-base/gnome-libs
+ media-libs/gdk-pixbuf )
+ gtk? ( =x11-libs/gtk+-1* )
+ alsa? ( media-libs/alsa-lib )
+ media-libs/libpng"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-errno.patch
+}
+
+src_compile() {
+ # bugs in configure script so we cant use `use_enable`
+ local myconf=""
+ use gtk || myconf="${myconf} --disable-gtk"
+ use sdl || myconf="${myconf} --disable-sdl"
+ use alsa || myconf="${myconf} --disable-alsa"
+ has_version '>=media-libs/alsa-lib-0.9' && myconf="${myconf} --disable-alsa"
+ use gnome || myconf="${myconf} --disable-gnome"
+ egamesconf ${myconf} || die
+ make || die
+}
+
+src_install() {
+ egamesinstall mandir=${T} || die
+ use gtk && newman gtk/gcfclient.man gcfclient.6
+ use gnome && newman gnome/gnome-cfclient.man gnome-cfclient.6
+ newman x11/cfclient.man cfclient.6
+ dodoc CHANGES NOTES README TODO
+ prepgamesdirs
+}
--- /dev/null
+--- common/client.h.orig 2003-06-27 20:15:48.000000000 -0400
++++ common/client.h 2003-06-27 20:16:12.000000000 -0400
+@@ -270,7 +270,7 @@
+ /* We need to declare most of the structs before we can include this */
+ #include <proto.h>
+
+-extern int errno;
++#include <errno.h>
+
+ /* translation of the STAT_RES names into printable names,
+ * in matching order.
+--- common/newsocket.c.orig 2003-06-27 20:15:36.000000000 -0400
++++ common/newsocket.c 2003-06-27 20:15:41.000000000 -0400
+@@ -154,7 +154,6 @@
+ int SockList_ReadPacket(int fd, SockList *sl, int len)
+ {
+ int stat,toread,readsome=0;
+- extern int errno;
+
+ /* We already have a partial packet */
+ if (sl->len<2) {
--- /dev/null
+MD5 8f7e09f18cdbfbf45aea2fc06a6472cb crossfire-client-1.5.0.tar.gz 405044
--- /dev/null
+# ChangeLog for app-games/falconseye
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/falconseye/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+ 02 Aug 2003; Chris Gianelloni <wolf31o2@gentoo.org>
+ falconseye-1.9.3-r1.ebuild:
+ Fixed to use mirror://sourceforge
+
+*falconseye-1.9.3-r1 (11 Jul 2002)
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> falconseye-1.9.3.ebuild :
+ Added LICENSE, KEYWORDS, SLOT.
+
+ 17 jul 2002; Jose Alberto Suárez López <bass@gentoo.org> falconseye-1.9.3-r1.ebuild :
+ Added KEYWORDS.
+
+ 11 Jul 2002; Dan <overridex@punkass.com> falconseye-1.9.3.ebuild-r1:
+ Changed the default config to point at /usr/bin/timidity rather
+ than /usr/local/bin/timidity since that's where it gets installed.
+
+ Enabled some defines to use gzip for saved game compression (the
+ ebuild down has a runtime dependency for gzip).
+
+ Fixes a problem with some systems (hardware related?) where the
+ music player program would switch songs too quickly leaving <defunct> processes,
+ after a few of these built up it would cause saving games to fail, this will be
+ included in the next falconseye upstream release whenever that is.
+
+ Added support to the /usr/bin/falconseye script to look for
+ options in ~/.falconseyerc, and if it doesn't exist create it with some basic
+ options.
+
+
+*falconseye-1.9.3 (18 Feb 2002)
+
+ 18 Feb 2002; F.Meyndert <m0rpheus@gentoo.org> falconseye-1.9.3.ebuild,
+
+ New ebuild for falconseye, a graphical nethack version.
--- /dev/null
+MD5 71a370c3a98164282208f5a5ed3a4bbf ChangeLog 1555
+MD5 77137d26c8d8a2da117ac1f1a5b10293 falconseye-1.9.3-r1.ebuild 1752
+MD5 e67fd1b356a80628b1952bf2486f3d6f files/1.9.3-gzip.diff 941
+MD5 3d5c71f44784a2dec8c8b2b59cc68621 files/1.9.3-midiplayer.diff 608
+MD5 67cd326fbf752c010ddbf51784fd0d5a files/1.9.3-musicsavefix.diff 2287
+MD5 318f6a0cede519e438e67777018e7477 files/digest-falconseye-1.9.3-r1 76
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/falconseye/falconseye-1.9.3-r1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+DESCRIPTION="A graphical version of nethack"
+SRC_URI="mirror://sourceforge/falconseye/nethack_source_331_jtp_193.zip"
+HOMEPAGE="http://falconseye.sourceforge.net/"
+
+KEYWORDS="x86 ppc"
+LICENSE="nethack"
+SLOT="0"
+
+DEPEND="media-libs/libsdl
+ dev-util/yacc
+ app-arch/unzip"
+RDEPEND="media-libs/libsdl
+ sys-apps/gzip
+ media-sound/timidity++"
+
+src_unpack() {
+ unpack ${A}
+ patch -p1 < ${FILESDIR}/${PV}-gzip.diff || die
+ patch -p1 < ${FILESDIR}/${PV}-midiplayer.diff || die
+ patch -p1 < ${FILESDIR}/${PV}-musicsavefix.diff || die
+}
+
+src_compile() {
+ cd ${WORKDIR}/sys/unix
+ source setup.sh
+ cd ../../
+ make PREFIX=/usr GAME=falconseye GAMEDIR=/usr/share/falconseye SHELLDIR=/usr/bin || die
+ cd doc
+ make || die
+}
+
+src_install() {
+ cd ${WORKDIR}
+ make PREFIX=${D}/usr GAME=falconseye GAMEDIR=${D}/usr/share/falconseye SHELLDIR=${D}/usr/bin install
+ # Have to remake the shell script with real path information
+ sed -e 's;/usr/games/lib/nethackdir;/usr/share/falconseye;' \
+ -e 's;HACKDIR/nethack;HACKDIR/falconseye;' \
+ -e '7a\
+ if [ -f ${HOME}/.falconseyerc ]; then\
+ export NETHACKOPTIONS=${HOME}/.falconseyerc;\
+ else\
+ echo 'OPTIONS=noautopickup,toptenwin,showexp,rest_on_space' > ${HOME}/.falconseyerc;\
+ export NETHACKOPTIONS=${HOME}/.falconseyerc;\
+ fi' \
+ < ${WORKDIR}/sys/unix/nethack.sh \
+ > ${D}/usr/bin/falconseye
+ cd doc
+ doman *.6
+}
+
+pkg_postinst() {
+ einfo "Falconseye now supports a ~/.falconseyerc file to set options."
+ einfo "Click ? then 'List of game options' in falconseye for more info."
+}
--- /dev/null
+diff -Naur falconseye-1.9.3/include/config.h falconseye-1.9.3/include/config.h
+--- falconseye-1.9.3/include/config.h 2001-07-03 19:56:52.000000000 -0400
++++ falconseye-1.9.3/include/config.h 2002-07-01 22:00:21.000000000 -0400
+@@ -187,11 +187,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 "/bin/gzip" /* FSF gzip compression */
++#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
+ #endif
+
+ #ifndef COMPRESS
--- /dev/null
+diff -Naur falconseye-1.9.3/win/jtp/gamedata/config/jtp_opts.txt falconseye-1.9.3/win/jtp/gamedata/config/jtp_opts.txt
+--- falconseye-1.9.3/win/jtp/gamedata/config/jtp_opts.txt 2001-06-24 19:57:26.000000000 -0400
++++ falconseye-1.9.3/win/jtp/gamedata/config/jtp_opts.txt 2002-07-01 22:00:19.000000000 -0400
+@@ -49,7 +49,7 @@
+ % files. You can also give your own command; use %s in place of the
+ % filename. Please give the full path to the player binary.
+ %
+-linux_midi_player=/usr/local/bin/timidity -idqq %s
++linux_midi_player=/usr/bin/timidity -idqq -A 30 %s
+ %linux_midi_player=/usr/bin/playmidi %s
+
+
--- /dev/null
+diff -Naur falconseye-1.9.3/win/jtp/jtp_sdl.c falconseye-1.9.3.over/win/jtp/jtp_sdl.c
+--- falconseye-1.9.3/win/jtp/jtp_sdl.c 2001-07-02 08:05:50.000000000 -0400
++++ falconseye-1.9.3.over/win/jtp/jtp_sdl.c 2002-07-01 22:00:19.000000000 -0400
+@@ -131,6 +131,7 @@
+ {
+ if (jtp_sdl_music_player_pid > 0)
+ kill(jtp_sdl_music_player_pid, SIGKILL);
++ waitpid(jtp_sdl_music_player_pid, NULL, 0);
+ jtp_sdl_music_player_pid = -1;
+ }
+ }
+@@ -579,28 +580,32 @@
+ jtp_sdl_audio_wanted.userdata = NULL;
+
+ /* Open the audio device, forcing the desired format */
++ /* Make it so if opening audio device fails, just don't play audio. - Jonathan Hseu */
+ if ( SDL_OpenAudio(&jtp_sdl_audio_wanted, NULL) < 0 )
+ {
+ jtp_SDLWriteLogMessage(JTP_SDL_LOG_ERROR, "[jtp_sdl.c/jtp_SDLEnterGraphicMode/Check1] ERROR: Could not initialize SDL audio device\n");
+ jtp_SDLWriteLogMessage(JTP_SDL_LOG_ERROR, "[SDL Error] ");
+ jtp_SDLWriteLogMessage(JTP_SDL_LOG_ERROR, SDL_GetError());
+ jtp_SDLWriteLogMessage(JTP_SDL_LOG_ERROR, "\n");
+- exit(1);
+- }
+- jtp_sdl_audio_chunk = (Uint8 *)malloc(JTP_SDL_SOUND_BUFFER_SIZE*sizeof(Uint8));
+- jtp_sdl_audio_len = 30000;
+- jtp_sdl_audio_pos = NULL;
+-
+- /* Create the sound cache */
+- jtp_sdl_cached_sounds = (jtp_sdl_cached_sound *)malloc(JTP_SDL_MAX_CACHED_SOUNDS*sizeof(jtp_sdl_cached_sound));
+- for (i = 0; i < JTP_SDL_MAX_CACHED_SOUNDS; i++)
+- {
+- jtp_sdl_cached_sounds[i].length = 0;
+- jtp_sdl_cached_sounds[i].samples = NULL;
+- jtp_sdl_cached_sounds[i].filename = NULL;
++ jtp_play_effects = 0;
++// exit(1);
+ }
+-
++ else
++ {
++ jtp_sdl_audio_chunk = (Uint8 *)malloc(JTP_SDL_SOUND_BUFFER_SIZE*sizeof(Uint8));
++ jtp_sdl_audio_len = 30000;
++ jtp_sdl_audio_pos = NULL;
++
++ /* Create the sound cache */
++ jtp_sdl_cached_sounds = (jtp_sdl_cached_sound *)malloc(JTP_SDL_MAX_CACHED_SOUNDS*sizeof(jtp_sdl_cached_sound));
++ for (i = 0; i < JTP_SDL_MAX_CACHED_SOUNDS; i++)
++ {
++ jtp_sdl_cached_sounds[i].length = 0;
++ jtp_sdl_cached_sounds[i].samples = NULL;
++ jtp_sdl_cached_sounds[i].filename = NULL;
++ }
+ /* SDL_PauseAudio(0); */ /* Start playing sounds */
++ }
+ }
+
+ if (jtp_play_music)
--- /dev/null
+MD5 764f31f32d4ee39ba809f672a86c08ae nethack_source_331_jtp_193.zip 8405675
--- /dev/null
+# ChangeLog for app-games/ivan
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/ivan/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*ivan-0.430 (08 Aug 2003)
+
+ 08 Aug 2003; Michael Sterrett <msterret@gentoo.org> ivan-0.430.ebuild:
+ initial commit. ebuild supplied by Rob Cakebread (modified) bug 26225
+
--- /dev/null
+MD5 2f0a2efa1d42bab7d1adcfec6897340b ivan-0.430.ebuild 565
+MD5 339bb490734f5f7b4f6b28b24c3c9789 ChangeLog 386
+MD5 05b47bb8b097fd0d5ef969fcea193944 files/digest-ivan-0.430 62
--- /dev/null
+MD5 cb1a23574ab18da0a2ff8764c1aa9e37 ivan-0.430.tar.gz 638755
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/ivan/ivan-0.430.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games
+
+DESCRIPTION="Rogue-like game with SDL graphics"
+HOMEPAGE="http://ivan.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ivan/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="x86"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=media-libs/libsdl-1.2.0"
+
+src_install() {
+ egamesinstall || die
+ dodoc AUTHORS ChangeLog LICENSING NEWS README
+ prepgamesdirs
+}
--- /dev/null
+# 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
--- /dev/null
+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
--- /dev/null
+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>
--- /dev/null
+--- 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)
--- /dev/null
+--- 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) */
--- /dev/null
+--- 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)
--- /dev/null
+--- 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)
--- /dev/null
+--- 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
--- /dev/null
+--- ./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\f
+ 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;
+
--- /dev/null
+--- 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"
+
+
+ /*
--- /dev/null
+MD5 aefcbeb20210b2d64511c84bd03c3e4e nethack-341.tgz 3492419
--- /dev/null
+MD5 aefcbeb20210b2d64511c84bd03c3e4e nethack-341.tgz 3492419
--- /dev/null
+#
+# 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
--- /dev/null
+# 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
+}
--- /dev/null
+# 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
+}
--- /dev/null
+# ChangeLog for app-games/noegnud-data
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/noegnud-data/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*noegnud-data-0.7.1 (13 Jul 2003)
+
+ 13 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Clive Crous <entro-p@users.sourceforge.net> #22307.
--- /dev/null
+MD5 d09e58c096b1a20bb3ecc32a825c1daf files/digest-noegnud-data-0.7.1 147
+MD5 50c0b29779af97ada0ec19fd7c861abd ChangeLog 404
+MD5 7830f9f519122de71d30bb2a1a8cd8ac noegnud-data-0.7.1.ebuild 875
--- /dev/null
+MD5 2f2e59c5fe592d01b99be6f548a4768e noegnud-0.7.0-src.tar.gz 42968997
+MD5 a0b0d36a63b85093a30fe82a8a223520 noegnud-0.7.0-noegnud-0.7.1.diff 68318
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/noegnud-data/noegnud-data-0.7.1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games eutils
+
+BASE_PV=0.7.0
+DESCRIPTION="ultimate User Interface for nethack"
+HOMEPAGE="http://noegnud.sourceforge.net/"
+SRC_URI="mirror://sourceforge/noegnud/noegnud-${BASE_PV}-src.tar.gz
+ mirror://sourceforge/noegnud/noegnud-${BASE_PV}-noegnud-${PV}.diff"
+
+LICENSE="nethack"
+SLOT="0"
+KEYWORDS="x86"
+
+S=${WORKDIR}/noegnud-${BASE_PV}/noegnud_data
+
+src_unpack() {
+ unpack noegnud-${BASE_PV}-src.tar.gz
+ epatch ${DISTDIR}/noegnud-${BASE_PV}-noegnud-${PV}.diff
+}
+
+src_install() {
+ dodir ${GAMES_DATADIR}/noegnud_data
+ dodoc README THANKS news
+ rm README THANKS news
+ cp -fr * ${D}/${GAMES_DATADIR}/noegnud_data/
+ prepgamesdirs
+}
--- /dev/null
+# ChangeLog for app-games/noegnud-nethack
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/noegnud-nethack/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*noegnud-nethack-0.7.1 (13 Jul 2003)
+
+ 13 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Clive Crous <entro-p@users.sourceforge.net> #22307.
--- /dev/null
+MD5 5980dfc62f455dbda695dfdfd084b4d9 files/digest-noegnud-nethack-0.7.1 130
+MD5 27f768a6f9cea7b87660884d94baafd9 noegnud-nethack-0.7.1.ebuild 1495
+MD5 752a907932e8cb5f939b1e187e5fe7c7 ChangeLog 413
--- /dev/null
+MD5 bc11db264ba3e42bcac3997762da7150 noegnud-0.7.1-src.tar.gz 110120
+MD5 aefcbeb20210b2d64511c84bd03c3e4e nethack-341.tgz 3492419
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/noegnud-nethack/noegnud-nethack-0.7.1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games
+
+NH_DVER=3.4.1
+NH_VER=${NH_DVER//.}
+DESCRIPTION="an alternate 2D/3D graphical user interface for NetHack"
+HOMEPAGE="http://noegnud.sourceforge.net/"
+SRC_URI="mirror://sourceforge/noegnud/noegnud-${PV}-src.tar.gz
+ mirror://sourceforge/nethack/nethack-${NH_VER}.tgz"
+
+LICENSE="nethack"
+SLOT="0"
+KEYWORDS="x86"
+
+DEPEND="media-libs/libsdl
+ dev-util/yacc"
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-image
+ virtual/opengl
+ app-games/noegnud-data"
+
+S=${WORKDIR}/noegnud-${PV}/variants
+
+src_unpack() {
+ unpack noegnud-${PV}-src.tar.gz
+ ln -s ${DISTDIR}/nethack-${NH_VER}.tgz noegnud-${PV}/variants/tarballs/nethack-${NH_VER}.tgz
+}
+
+src_compile() {
+ make nh${NH_VER} PREFIX=${GAMES_PREFIX} || die
+}
+
+src_install() {
+ make install_nh${NH_VER} PREFIX=${D}/${GAMES_PREFIX} || die
+
+ cd ${D}/${GAMES_BINDIR}
+ rm noegnud-nethack-${NH_DVER}
+ mv noegnud-${PV}-nethack-${NH_DVER} noegnud-nethack
+ dosed "/^HACKDIR/s:=.*:=${GAMES_LIBDIR}/noegnud-${PV}/nethack-${NH_DVER}:" ${GAMES_BINDIR}/noegnud-nethack
+
+ keepdir ${GAMES_LIBDIR}/noegnud-${PV}/nethack-${NH_DVER}/save
+ dodir ${GAMES_DATADIR}/noegnud_data
+ dosym ${GAMES_DATADIR}/noegnud_data ${GAMES_LIBDIR}/noegnud-${PV}/noegnud_data
+
+ prepgamesdirs
+ chmod -R g+w ${D}/${GAMES_LIBDIR}/noegnud-${PV}
+}
--- /dev/null
+# ChangeLog for app-games/noegnud-slashem
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/noegnud-slashem/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*noegnud-slashem-0.7.1 (13 Jul 2003)
+
+ 13 Jul 2003; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Clive Crous <entro-p@users.sourceforge.net> #22307.
--- /dev/null
+MD5 4fb9dd33aeeb33fdf46a253c9491397b files/digest-noegnud-slashem-0.7.1 131
+MD5 ea88a846634f8bf77ae205c85ea65990 noegnud-slashem-0.7.1.ebuild 1478
+MD5 c11abf543fbd3054896d8ef31174e967 ChangeLog 413
--- /dev/null
+MD5 bc11db264ba3e42bcac3997762da7150 noegnud-0.7.1-src.tar.gz 110120
+MD5 2abd847d4f5fc426d6c7ed5a97b0de99 se006e4f8.tar.gz 4331015
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/noegnud-slashem/noegnud-slashem-0.7.1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games
+
+SE_DVER=0.0.6E4F8
+SE_VER=006e4f8
+DESCRIPTION="an alternate 2D/3D graphical user interface for SLASH'EM"
+HOMEPAGE="http://noegnud.sourceforge.net/"
+SRC_URI="mirror://sourceforge/noegnud/noegnud-${PV}-src.tar.gz
+ mirror://sourceforge/slashem/se${SE_VER}.tar.gz"
+
+LICENSE="nethack"
+SLOT="0"
+KEYWORDS="x86"
+
+DEPEND="media-libs/libsdl
+ dev-util/yacc"
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-image
+ virtual/opengl
+ app-games/noegnud-data"
+
+S=${WORKDIR}/noegnud-${PV}/variants
+
+src_unpack() {
+ unpack noegnud-${PV}-src.tar.gz
+ ln -s ${DISTDIR}/se${SE_VER}.tgz noegnud-${PV}/variants/tarballs/se${SE_VER}.tgz
+}
+
+src_compile() {
+ make se${SE_VER} PREFIX=${GAMES_PREFIX} || die
+}
+
+src_install() {
+ make install_se${SE_VER} PREFIX=${D}/${GAMES_PREFIX} || die
+
+ cd ${D}/${GAMES_BINDIR}
+ rm noegnud-slashem-${SE_DVER}
+ mv noegnud-${PV}-slashem-${SE_DVER} noegnud-slashem
+ dosed "/^HACKDIR/s:=.*:=${GAMES_LIBDIR}/noegnud-${PV}/slashem-${SE_DVER}:" ${GAMES_BINDIR}/noegnud-slashem
+
+ keepdir ${GAMES_LIBDIR}/noegnud-${PV}/slashem-${SE_DVER}/save
+ dodir ${GAMES_DATADIR}/noegnud_data
+ dosym ${GAMES_DATADIR}/noegnud_data ${GAMES_LIBDIR}/noegnud-${PV}/noegnud_data
+
+ prepgamesdirs
+ chmod -R g+w ${D}/${GAMES_LIBDIR}/noegnud-${PV}
+}
--- /dev/null
+# 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 :)
--- /dev/null
+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
--- /dev/null
+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\f
+ 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;
--- /dev/null
+--- 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"
+
+
+
--- /dev/null
+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);' \
--- /dev/null
+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
--- /dev/null
+MD5 2abd847d4f5fc426d6c7ed5a97b0de99 se006e4f8.tar.gz 4331015
+MD5 388785f9880bcd471432f79434522a75 conf111s.tar.gz 3852
--- /dev/null
+#
+# 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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+# 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"
+}
--- /dev/null
+# ChangeLog for app-games/tome
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+*tome-2.2.2 (28 Jul 2003)
+
+ 28 Jul 2003; Michael Sterrett <msterret@gentoo.org> tome-2.2.2.ebuild:
+ version bump (bug 23729)
+
+ Note that this version of ToME is not save game compatible with older versions.
+
+ 28 Jul 2003; Michael Sterrett <msterret@gentoo.org> tome-2.2.1.ebuild:
+ added a pkg_postinst() that warns people that the new version of ToME isn't
+ compatible with their old save games.
+
+ 28 Jul 2003; Michael Sterrett <msterret@gentoo.org> tome-1.0.0.ebuild,
+ tome-2.0.0.ebuild, tome-2.1.0.ebuild, tome-2.2.1.ebuild:
+ fix DESCRIPTION
+
+ 01 Jul 2003; <msterret@gentoo.org> tome-2.2.1.ebuild:
+ mark stable for ppc. SpanKY said so.
+
+*tome-2.2.1 (01 Jul 2003)
+
+ 01 Jul 2003; Michael Sterrett <msterret@gentoo.org> tome-2.2.1.ebuild:
+ added ~ppc keyword (bug 23729)
+
+ 30 Jun 2003; Michael Sterrett <msterret@gentoo.org> :
+ version bump - seems to install in roughly the same way as 2.1
+
+ 30 Jun 2003; Michael Sterrett <msterret@gentoo.org> tome-2.1.0.ebuild:
+ use sed -i
+ sed file in unpack
+ install more docs
+ more error checking
+
+*tome-2.1.0 (21 Dec 2002)
+
+ 21 Dec 2002; J.Alberto Suarez L. <bass@gentoo.org> tome-2.1.0.ebuild:
+ New version.
+ Maybe it have a little incompatibility with Tome-2.0.
+
+*tome-2.0.0 (13 Feb 2003)
+
+ 29 Jun 2003; Daniel Ahlberg <aliz@gentoo.org> :
+ Added missing changelog entry.
+
+*tome-1.0.0 (1 Aug 2002)
+
+ 1 Aug 2002; Jose Alberto Suárez López <bass@gentoo.org> tome-1.0.0.ebuild:
+ First release.
--- /dev/null
+MD5 8e844d3eb9a4ddff40c3023b315afbca ChangeLog 1676
+MD5 0ba345df0450737039eb1228fb180e6d tome-1.0.0.ebuild 854
+MD5 156ff921924ffca71b63831bdfbd89ea tome-2.0.0.ebuild 942
+MD5 a8f67b5f6c4ae8de1ec9f3481b7010e2 tome-2.1.0.ebuild 1075
+MD5 c4987715f0d1543bf76a2aa0b49e35a2 tome-2.2.1.ebuild 1389
+MD5 a435d9df9b1a3ac1742e3234d742362f tome-2.2.2.ebuild 1356
+MD5 5febc7a1e153cf2a764178addf34e891 files/digest-tome-1.0.0 62
+MD5 1b4b1dc015a686153a26274633ec38c9 files/digest-tome-2.0.0 62
+MD5 8ea3fc31ec761cfb3238ad54857bc2f7 files/digest-tome-2.1.0 62
+MD5 cb208a82164375060b21cac1bbd4cb4c files/digest-tome-2.2.1 62
+MD5 334beabe3e15932618a421f7881ee8b1 files/digest-tome-2.2.2 62
--- /dev/null
+MD5 e717e2a0738278b2692ef76c5366ae76 tome-100-src.tgz 2550190
--- /dev/null
+MD5 b6eaa8bd38175cce13346baa82ea3a22 tome-200-src.tgz 2755486
--- /dev/null
+MD5 bda364543e66497581d2267e7b99424f tome-210-src.tgz 2961137
--- /dev/null
+MD5 93324048f3c9a9cd43a367ef41bba30b tome-221-src.tgz 3045268
--- /dev/null
+MD5 145686d06c0650951236b859e611d6b2 tome-222-src.tgz 3088530
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-1.0.0.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+IUSE="X"
+
+S=${WORKDIR}/tome100-src
+
+DESCRIPTION="A roguelike game, where you can save the world from Morgoth and battle evil(or become evil;)"
+LICENSE="Moria | GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+SRC_URI="http://t-o-m-e.net/dl/src/tome-100-src.tgz"
+HOMEPAGE="http://t-o-m-e.net/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5
+ X? ( >=x11-base/xfree-4.0 )"
+
+src_unpack() {
+ unpack tome-100-src.tgz
+ cd ${S}
+}
+
+src_compile() {
+ cd ${S}/src
+ emake -f makefile.org BINDIR=/usr/bin LIBDIR=/usr/share/tome/lib || die
+}
+
+src_install () {
+ cd ${S}/src
+ make -f makefile.org BINDIR=${D}/usr/bin LIBDIR=${D}/usr/share/tome/lib install || die
+}
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.0.0.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+MY_PV=${PV//./}
+S="${WORKDIR}/tome-${MY_PV}-src"
+
+DESCRIPTION="A roguelike game, where you can save the world from Morgoth and battle evil (or become evil ;])"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tgz"
+HOMEPAGE="http://t-o-m-e.net/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5
+ >=x11-base/xfree-4.0"
+
+src_compile() {
+ cd ${S}/src
+ cp makefile.org makefile.org.old
+ sed -e "s:-O1:${CFLAGS}:" \
+ makefile.org.old > makefile.org
+ emake -f makefile.org BINDIR=/usr/bin LIBDIR=/usr/share/tome/lib || die "compile failed"
+}
+
+src_install () {
+ cd ${S}/src
+ make -f makefile.org BINDIR=${D}/usr/bin LIBDIR=${D}/usr/share/tome/lib install || die "install failed"
+}
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.1.0.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+MY_PV=${PV//./}
+S="${WORKDIR}/tome-${MY_PV}-src"
+
+DESCRIPTION="A roguelike game, where you can save the world from Morgoth and battle evil (or become evil ;])"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tgz"
+HOMEPAGE="http://t-o-m-e.net/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5
+ >=x11-base/xfree-4.0"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}/src && \
+ sed -i \
+ -e "s:-O1:${CFLAGS}:" \
+ makefile.std || die "sed makefile.std failed"
+}
+
+src_compile() {
+ cd src && \
+ make -f makefile.std \
+ BINDIR=/usr/games/bin \
+ LIBDIR=/usr/share/games/tome/lib || die "make failed"
+}
+
+src_install() {
+ cd ${S}/src && \
+ make -f makefile.std \
+ BINDIR=${D}/usr/games/bin \
+ LIBDIR=${D}/usr/share/games/tome/lib install || \
+ die "make install failed"
+ cd ${S} && \
+ dodoc *.txt || die "dodoc failed"
+}
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.2.1.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+MY_PV=${PV//./}
+S="${WORKDIR}/tome-${MY_PV}-src"
+
+DESCRIPTION="A roguelike game, where you can save the world from Morgoth and battle evil (or become evil ;])"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ppc"
+SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tgz"
+HOMEPAGE="http://t-o-m-e.net/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5
+ >=x11-base/xfree-4.0"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}/src && \
+ sed -i \
+ -e "s:-O1:${CFLAGS}:" \
+ makefile.std || die "sed makefile.std failed"
+}
+
+src_compile() {
+ cd src && \
+ make -f makefile.std \
+ BINDIR=/usr/games/bin \
+ LIBDIR=/usr/share/games/tome/lib || die "make failed"
+}
+
+src_install() {
+ cd ${S}/src && \
+ make -f makefile.std \
+ BINDIR=${D}/usr/games/bin \
+ LIBDIR=${D}/usr/share/games/tome/lib install || \
+ die "make install failed"
+ cd ${S} && \
+ dodoc *.txt || die "dodoc failed"
+}
+
+pkg_postinst() {
+ echo
+ ewarn "ToME 2.2.1 is not save-game compatible with previous versions."
+ echo
+ einfo "If you have older save files and you wish to continue those games,"
+ einfo "you'll need to remerge the version of ToME with which you started"
+ einfo "those save-games."
+ echo
+
+ games_pkg_postinst
+}
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.2.2.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games
+
+MY_PV=${PV//./}
+S="${WORKDIR}/tome-${MY_PV}-src"
+
+DESCRIPTION="A roguelike game, where you can save the world from Morgoth and battle evil (or become evil ;])"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ppc"
+SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tgz"
+HOMEPAGE="http://t-o-m-e.net/"
+
+RDEPEND="virtual/glibc
+ >=sys-libs/ncurses-5
+ >=x11-base/xfree-4.0"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_compile() {
+ cd src && \
+ emake -f makefile.std \
+ COPTS="${CFLAGS}" \
+ BINDIR=${GAMES_BINDIR} \
+ LIBDIR=${GAMES_DATADIR}/tome/lib || \
+ die "emake failed"
+}
+
+src_install() {
+ cd ${S}/src && \
+ make -f makefile.std \
+ BINDIR=${D}${GAMES_BINDIR} \
+ LIBDIR=${D}${GAMES_DATADIR}/tome/lib install || \
+ die "make install failed"
+ cd ${S} && \
+ dodoc *.txt || die "dodoc failed"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ echo
+ ewarn "ToME ${PV} is not save-game compatible with previous versions."
+ echo
+ einfo "If you have older save files and you wish to continue those games,"
+ einfo "you'll need to remerge the version of ToME with which you started"
+ einfo "those save-games."
+ echo
+
+ games_pkg_postinst
+}
--- /dev/null
+# ChangeLog for app-games/zangband
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/zangband/ChangeLog,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+ 10 Jun 2003; <msterret@gentoo.org> zangband-2.7.3.ebuild:
+ DEPEND on sed >= 4
+
+*zangband-2.7.3 (18 May 2003)
+
+ 18 May 2003; Martin Holzer <mholzer@gentoo.org> zangband-2.7.3.ebuild:
+ Version bumped. Ebuild submitted by Frank Straetz <Frank@KTHXBYE.de>
+ in #20994.
+
+*zangband-2.7.2 (16 Mar 2003)
+
+ 16 Mar 2003; José Alberto Suárez López <bass@gentoo.org> zangband-2.7.2.ebuild:
+ bumped version and use game.eclass
+
+*zangband-2.7.1 (15 Jul 2002)
+
+ 07 Sep 2002; J. Alberto S. L. <bass@gentoo.org>
+ zangband-2.7.1.ebuild:
+ Fix problem with PORTAGE_TMPDIR #7292
+
+ 6 Sep 2002; Owen Stampflee <owen@gentoo.org> :
+ Changed "PPC" in keywords, to "ppc".
+
+ 22 Aug 2002; J. Alberto S. L. <bass@gentoo.org> zangband-2.7.1.ebuild:
+ Added PPC KEYWORD.
+
+ Added "ZAngband remember its highscores by touching the file in a
+ more gentle way" by nikai@nikai.net (Nicolas Kaiser)
+
+ 15 Jul 2002; J. Alberto S. L. <bass@gentoo.org> zangband-2.7.1.ebuild:
+ First relase
+
--- /dev/null
+MD5 4eb90a8a0e205c79269fc8900e12ccf7 ChangeLog 1187
+MD5 3cf5421538bd68513c2634206b0a41a1 zangband-2.7.3.ebuild 1658
+MD5 1a295dc9c335ddfe6e7b11b575204879 files/digest-zangband-2.7.3 67
--- /dev/null
+MD5 f3d7f74aec7d04412ea8442603458815 zangband-2.7.3.tar.gz 2723509
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/zangband/zangband-2.7.3.ebuild,v 1.1 2003/09/10 04:59:58 vapier Exp $
+
+inherit games
+
+DESCRIPTION="An enhanced version of the Roguelike game Angband"
+HOMEPAGE="http://www.zangband.org/"
+SRC_URI="ftp://clockwork.dementia.org/angband/Variant/ZAngband/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="Moria GPL-2"
+KEYWORDS="x86 ppc"
+IUSE="X"
+
+DEPEND=">=sys-libs/ncurses-5
+ >=sys-apps/sed-4
+ X? ( >=x11-base/xfree-4.0 )"
+
+S=${WORKDIR}/${PN}
+
+src_compile() {
+ # Version 2.7.3 won't configure without this
+ export WANT_AUTOCONF_2_5=1
+
+ local myconf="--with-setgid=${GAMES_GROUP}"
+ use X || myconf="${myconf} --without-x"
+
+ # Bootstrap and configure Zangband
+ ./bootstrap || die "bootstrapping failed"
+ egamesconf ${myconf} || die
+
+ # This fixes the games/games bug
+ sed -i "s:${GAMES_DATADIR}:/usr/share:" makefile
+ emake || die
+}
+
+src_install() {
+ # Keep some important dirs we want to chmod later
+ keepdir ${GAMES_DATADIR}/zangband/lib/apex
+ keepdir ${GAMES_DATADIR}/zangband/lib/user
+ keepdir ${GAMES_DATADIR}/zangband/lib/save
+
+ # Install the basic files but remove unneeded crap
+ make DESTDIR=${D}/${GAMES_DATADIR}/zangband/ installbase || die
+ rm ${D}/${GAMES_DATADIR}/zangband/{angdos.cfg,readme,z_faq.txt,z_update.txt}
+
+ # Install everything else and fix the permissions
+ exeinto /usr/games/bin
+ doexe zangband
+ dodoc readme z_faq.txt z_update.txt
+
+ prepgamesdirs
+ # All users in the games group need write permissions to some important dirs
+ chmod -R g+w ${D}/${GAMES_DATADIR}/zangband/lib/{apex,save,user}
+}