summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2016-01-16 10:38:30 +0800
committerIan Delaney <idella4@gentoo.org>2016-01-16 10:39:43 +0800
commit5debca4189c632f89bbcca9deab76e1a1c8455e0 (patch)
tree9d86fd3911a9012f7bd5ca149ff2cbe2c253a5c3
parentnet-misc/nxplayer: bump for security bug #572048 (diff)
parentgames-roguelike/nethack: Improved nethackrc for 3.6 (diff)
downloadgentoo-5debca41.tar.gz
gentoo-5debca41.tar.bz2
gentoo-5debca41.zip
Merge remote-tracking branch 'remotes/atlaua/aranea/nethack'
Pull request: https://github.com/gentoo/gentoo/pull/657
-rw-r--r--games-roguelike/nethack/files/nethack-3.4.3-nethackrc (renamed from games-roguelike/nethack/files/dot.nethackrc)0
-rw-r--r--games-roguelike/nethack/files/nethack-3.6.0-nethackrc103
-rw-r--r--games-roguelike/nethack/metadata.xml3
-rw-r--r--games-roguelike/nethack/nethack-3.4.3-r5.ebuild2
-rw-r--r--games-roguelike/nethack/nethack-3.6.0-r1.ebuild164
-rw-r--r--games-roguelike/nethack/nethack-3.6.0.ebuild2
6 files changed, 272 insertions, 2 deletions
diff --git a/games-roguelike/nethack/files/dot.nethackrc b/games-roguelike/nethack/files/nethack-3.4.3-nethackrc
index 55899338cee7..55899338cee7 100644
--- a/games-roguelike/nethack/files/dot.nethackrc
+++ b/games-roguelike/nethack/files/nethack-3.4.3-nethackrc
diff --git a/games-roguelike/nethack/files/nethack-3.6.0-nethackrc b/games-roguelike/nethack/files/nethack-3.6.0-nethackrc
new file mode 100644
index 000000000000..33c98064341f
--- /dev/null
+++ b/games-roguelike/nethack/files/nethack-3.6.0-nethackrc
@@ -0,0 +1,103 @@
+## This is an example nethackrc file (courtesy of nethack.alt.org).
+##
+## You should edit it to suit your needs.
+## Please read the Guidebook in /usr/share/doc/nethack or at www.nethack.org.
+##
+## Options which are enabled by default (like autoopen) can be disabled
+## by prefixing them with a !
+
+## If USE=X is enabled, this can be changed to x11
+#OPTIONS=windowtype:tty
+
+## Custom fruit and pet names
+#OPTIONS=fruit:mango
+#OPTIONS=dogname:Izchak
+#OPTIONS=catname:Chun-Li
+#OPTIONS=horsename:Marlon
+
+## Colored output
+#OPTIONS=color
+
+## Automatically dig if you are wielding a digging tool and moving
+## into a place that can be dug
+#OPTIONS=autodig
+
+## Walking into a door attempts to open it
+#OPTIONS=autoopen
+
+## Automatically pick up stuff
+#OPTIONS=autopickup
+
+## Only use autopickup for these item types
+#OPTIONS=pickup_types:$!?/"=
+
+## Allow saving and loading bones files.
+#OPTIONS=bones
+
+## Show out-of-sight areas of lit rooms
+#OPTIONS=dark_room
+
+## Use inverse for pets
+#OPTIONS=hilite_pet
+
+## Use inverse for piles of items
+#OPTIONS=hilite_pile
+
+## Show experience
+#OPTIONS=showexp
+
+## Show elapsed game time (in turns)
+#OPTIONS=time
+
+## How recalled messages (ctrl-p) are displayed.
+#OPTIONS=msg_window:reversed
+
+## use IBMgraphics or DECgraphics
+#OPTIONS=symset:DECgraphics
+#OPTIONS=symset:IBMgraphics
+
+## If you don't like some default glyphs, these can be changed
+#SYMBOLS=S_boulder:0
+#SYMBOLS=S_lava:~
+#SYMBOLS=S_pool:~
+#SYMBOLS=S_water:~
+#SYMBOLS=S_ghost:8
+#SYMBOLS=S_golem:7
+
+## Sort items by name. One of "none", "loot", or "full"
+#OPTIONS=sortloot:full
+
+## Require explicit yes for some prompts
+#OPTIONS=paranoid_confirmation:Confirm quit attack pray wand Remove
+
+## Conducts
+#OPTIONS=nudist
+#OPTIONS=blind
+
+
+## Colored menus. Regular expressions allowed.
+#OPTIONS=menucolors
+#MENUCOLOR=" blessed "=green
+#MENUCOLOR=" holy "=green
+#MENUCOLOR=" cursed "=red
+#MENUCOLOR=" unholy "=red
+#MENUCOLOR=" cursed .* (being worn)"=orange&underline
+
+
+## Messagetypes
+
+## displacing pets. hide the message.
+#MSGTYPE=hide "You swap places with your .*"
+
+## items on floor. don't repeat the message.
+#MSGTYPE=norep "You see here a .*"
+#MSGTYPE=norep "You see here an .*"
+
+## delayed instadeaths. always prompt for -more-
+#MSGTYPE=stop "You are slowing down."
+#MSGTYPE=stop "You find it hard to breathe."
+#MSGTYPE=stop "You are turning a little .*"
+
+## moving up or down stairs
+#MSGTYPE=hide "You descend .*"
+#MSGTYPE=hide "You (climb|fly) (up|down) .*"
diff --git a/games-roguelike/nethack/metadata.xml b/games-roguelike/nethack/metadata.xml
index 28f26f28ac64..5570ca33dc3e 100644
--- a/games-roguelike/nethack/metadata.xml
+++ b/games-roguelike/nethack/metadata.xml
@@ -10,4 +10,7 @@
<upstream>
<remote-id type="sourceforge">nethack</remote-id>
</upstream>
+ <use>
+ <flag name="experimental">Enable experimental features (showscore and status_hilite)</flag>
+ </use>
</pkgmetadata>
diff --git a/games-roguelike/nethack/nethack-3.4.3-r5.ebuild b/games-roguelike/nethack/nethack-3.4.3-r5.ebuild
index 6762a44a77c8..3746bd966d84 100644
--- a/games-roguelike/nethack/nethack-3.4.3-r5.ebuild
+++ b/games-roguelike/nethack/nethack-3.4.3-r5.ebuild
@@ -143,7 +143,7 @@ src_install() {
dodoc doc/*.txt
insinto /etc/skel
- newins "${FILESDIR}/dot.nethackrc" .nethackrc
+ newins "${FILESDIR}/${P}-nethackrc" .nethackrc
local windowtypes="tty"
use X && windowtypes="${windowtypes} x11"
diff --git a/games-roguelike/nethack/nethack-3.6.0-r1.ebuild b/games-roguelike/nethack/nethack-3.6.0-r1.ebuild
new file mode 100644
index 000000000000..01e66e84fa88
--- /dev/null
+++ b/games-roguelike/nethack/nethack-3.6.0-r1.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs flag-o-matic user
+
+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}-src.tgz"
+
+LICENSE="nethack"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="experimental X"
+
+RDEPEND="sys-libs/ncurses:0=
+ X? (
+ x11-libs/libXaw
+ x11-libs/libXpm
+ x11-libs/libXt
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? (
+ x11-proto/xproto
+ x11-apps/bdftopcf
+ x11-apps/mkfontdir
+ )"
+
+BINDIR="/usr/bin"
+STATEDIR="/var/games/${PN}"
+
+NETHACK_GROUP="gamestat"
+
+pkg_setup() {
+ HACKDIR="/usr/$(get_libdir)/${PN}"
+
+ enewgroup gamestat 36
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-recover.patch"
+ epatch_user
+
+ cp "${FILESDIR}/${P}-hint-$(usex X x11 tty)" hint || die "Failed to copy hint file"
+ sys/unix/setup.sh hint || die "Failed to run setup.sh"
+}
+
+src_compile() {
+ append-cflags -I../include -DDLB -DSECURE -DLINUX -DTIMED_DELAY -DVISION_TABLES
+ append-cflags '-DCOMPRESS=\"/bin/gzip\"' '-DCOMPRESS_EXTENSION=\".gz\"'
+ append-cflags "-DHACKDIR=\\\"${HACKDIR}\\\"" "-DVAR_PLAYGROUND=\\\"${STATEDIR}\\\""
+ append-cflags "-DDEF_PAGER=\\\"${PAGER}\\\""
+ append-cflags -DSYSCF "-DSYSCF_FILE=\\\"/etc/nethack.sysconf\\\""
+
+ use X && append-cflags -DX11_GRAPHICS -DUSE_XPM
+ use experimental &&
+ append-cflags -DSTATUS_VIA_WINDOWPORT -DSTATUS_HILITES -DSCORE_ON_BOTL
+
+ makeopts=(
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LFLAGS="${LDFLAGS}"
+ WINTTYLIB="$($(tc-getPKG_CONFIG) --libs ncurses)"
+ HACKDIR="${HACKDIR}" INSTDIR="${D}/${HACKDIR}"
+ SHELLDIR="${D}/${BINDIR}" VARDIR="${D}/${STATEDIR}"
+ )
+
+ emake "${makeopts[@]}" nethack recover Guidebook spec_levs
+
+ # Upstream still has some parallel compilation bugs
+ emake -j1 "${makeopts[@]}" all
+}
+
+src_install() {
+ emake "${makeopts[@]}" install
+
+ exeinto "${BINDIR}"
+ newexe util/recover recover-nethack
+ rm "${D}/${HACKDIR}/recover" || die "Failed to remove HACKDIR/recover"
+
+ doman doc/nethack.6
+ newman doc/recover.6 recover-nethack.6
+ dodoc doc/Guidebook.txt
+
+ insinto /etc
+ newins sys/unix/sysconf nethack.sysconf
+
+ insinto /etc/skel
+ newins "${FILESDIR}/${P}-nethackrc" .nethackrc
+
+ if use X ; then
+ cd "${S}/win/X11" || die "Failed to enter win/X11 directory"
+
+ # copy nethack x application defaults
+ insinto /etc/X11/app-defaults
+ newins NetHack.ad NetHack
+ rm "${D}/${HACKDIR}/NetHack.ad" || die "Failed to remove NetHack.ad"
+
+ newicon nh_icon.xpm nethack.xpm
+ make_desktop_entry ${PN} Nethack
+
+ # install nethack fonts
+ 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" || die "Failed to enter fonts directory"
+ mkfontdir || die "The action mkfontdir ${HACKDIR}/fonts failed"
+ fi
+
+ rm -r "${D}/${STATEDIR}" || die "Failed to clean STATEDIR"
+ keepdir "${STATEDIR}/save"
+
+ fowners -R "root:${NETHACK_GROUP}" "${STATEDIR}"
+ fperms 770 "${STATEDIR}" "${STATEDIR}/save"
+
+ fowners "root:${NETHACK_GROUP}" "${HACKDIR}/nethack"
+ fperms g+s "${HACKDIR}/nethack"
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-3.4.3-r3" ; then
+ migration=true
+
+ # preserve STATEDIR/{logfile,record}
+ # (previous ebuild rev mistakenly removes it)
+ for f in "${ROOT}/${STATEDIR}/"{logfile,record} ; do
+ if [[ -e "$f" ]] ; then
+ cp "$f" "$T" || die "Failed to preserve ${ROOT}/${STATEDIR} files"
+ else
+ touch "$T/$f" || die "Failed to preserve ${ROOT}/${STATEDIR} files"
+ fi
+ done
+ fi
+}
+
+pkg_postinst() {
+ cd "${ROOT}/${STATEDIR}" || die "Failed to enter ${STATEDIR} directory"
+
+ if [[ -v migration ]] ; then
+ cp "$T/"{logfile,record} . ||
+ die "Failed to preserve ${ROOT}/${STATEDIR} files"
+ fi
+
+ touch logfile perm record xlogfile || die "Failed to create log files"
+
+ chown -R root:"${NETHACK_GROUP}" . &&
+ chmod -R 660 . &&
+ chmod 770 . save ||
+ die "Adjustment of file permissions in ${ROOT}/${STATEDIR} failed"
+
+ touch -c bones* save/* # non-critical
+
+ elog "A minimal default .nethackrc has been placed in /etc/skel/"
+ elog "The sysconf file is at /etc/nethack.sysconf"
+
+ if has_version "<${CATEGORY}/${PN}-3.6.0" ; then
+ elog
+ elog "Nethack 3.6 includes many new features."
+ elog "You might want to review your options and local patchset."
+ elog "Have a look at http://www.nethack.org/v360/release.html"
+ fi
+}
diff --git a/games-roguelike/nethack/nethack-3.6.0.ebuild b/games-roguelike/nethack/nethack-3.6.0.ebuild
index 11c43ea42cc4..f627cad5b44b 100644
--- a/games-roguelike/nethack/nethack-3.6.0.ebuild
+++ b/games-roguelike/nethack/nethack-3.6.0.ebuild
@@ -93,7 +93,7 @@ src_install() {
newins sys/unix/sysconf nethack.sysconf
insinto /etc/skel
- newins "${FILESDIR}/dot.nethackrc" .nethackrc
+ newins "${FILESDIR}/${PN}-3.4.3-nethackrc" .nethackrc
local windowtypes="tty"
use X && windowtypes="x11 ${windowtypes}"