summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Vermeulen <swift@gentoo.org>2015-06-09 08:34:33 +0000
committerSven Vermeulen <swift@gentoo.org>2015-06-09 08:34:33 +0000
commitd50b9d6ebfa9bbbf28b0e0b031e6a366830ddbea (patch)
treed73ccd1d8676b57c3646661a4a3c44f8dddf967e /games-roguelike
parentVersion bump (diff)
downloadhistorical-d50b9d6ebfa9bbbf28b0e0b031e6a366830ddbea.tar.gz
historical-d50b9d6ebfa9bbbf28b0e0b031e6a366830ddbea.tar.bz2
historical-d50b9d6ebfa9bbbf28b0e0b031e6a366830ddbea.zip
Move executable from /usr/share/games to /usr/games/bin and fix bug #551176
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0x2EDD52403B68AF47
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/nethack/ChangeLog7
-rw-r--r--games-roguelike/nethack/Manifest29
-rw-r--r--games-roguelike/nethack/nethack-3.4.3-r4.ebuild231
3 files changed, 252 insertions, 15 deletions
diff --git a/games-roguelike/nethack/ChangeLog b/games-roguelike/nethack/ChangeLog
index 4edb80284761..fc20d75360c7 100644
--- a/games-roguelike/nethack/ChangeLog
+++ b/games-roguelike/nethack/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-roguelike/nethack
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/ChangeLog,v 1.40 2015/02/20 16:29:51 swift Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/ChangeLog,v 1.41 2015/06/09 08:34:25 swift Exp $
+
+*nethack-3.4.3-r4 (09 Jun 2015)
+
+ 09 Jun 2015; Sven Vermeulen <swift@gentoo.org> +nethack-3.4.3-r4.ebuild:
+ Move executable from /usr/share/games to /usr/games/bin and fix bug #551176
20 Feb 2015; Sven Vermeulen <swift@gentoo.org> -nethack-3.4.3-r1.ebuild,
-nethack-3.4.3-r2.ebuild:
diff --git a/games-roguelike/nethack/Manifest b/games-roguelike/nethack/Manifest
index eeb1edad930a..ead169a13e52 100644
--- a/games-roguelike/nethack/Manifest
+++ b/games-roguelike/nethack/Manifest
@@ -11,22 +11,23 @@ AUX nethack-3.4.3-gibc210.patch 330 SHA256 5c74be994e8c5622b0c97f6178ef123ef614c
AUX nethack-3.4.3-recover.patch 2542 SHA256 ce309d4b1d4ebb2c865754de905e5e16470f05c19460fc9491d98386a8015f63 SHA512 f3ecd7e59254fea509fecb9517c47b029c9293443b81e36e94699026d31f0f3c83212b8bf372059761173397e3a6817b6e36ce099aa4223fe0e6cc0283879627 WHIRLPOOL e5b07ca7c0d2b3f8dd0b4a9417060268a94ae345443e00620f72f083b75eaf9125aec30e266db576bf7052136bee5c12c9382b7c4404b606e63ef68f3c792316
DIST nethack-343-src.tgz 3497458 SHA256 bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4 SHA512 052342c19619219f291571d48cf7799f962eb6ec6f8a276427225c0abbd833eada18abeff9fbd647919f2a9e3bb097d7f154675e283fe48abc4752f24c192d8f WHIRLPOOL 397c787f83149d96ddbfa6a2235c20c3724ed67946889d432774901cb7ddc71b177e2cbd6c3029f4eb0b4df21c81c6a427494dad550fdbace01876a3d9c79d75
EBUILD nethack-3.4.3-r3.ebuild 5935 SHA256 ca1c8e16270f593f24d791361763a653f22d9d4ef4240464f9e33cf065746570 SHA512 d686eae04c6281a89822ad2d3bcc126c9cea63e731f3e6f4e6d870e7d0df4ef35314cd538a55f3bfe20a6ddbc05b4f156aa9e8bbbb0321e89592a2f8142978d9 WHIRLPOOL 50179bc4e560058090ab09f2cc29629862714b0b47bbf6879e68e8c97439ad16f6a713680e776ac4a80c3e0820392daa64fa5f9b19b10e3d862cbbbe024c221f
-MISC ChangeLog 8328 SHA256 89f221e549840fde88fac72999c56e6b3f7d62e86e36c192c603ec9bc9245410 SHA512 8da39c0efa146bf68873d7c0b6f0e4f42a20c3efc47195b7c4b00f83853f84ee57ae1fd2cbcbdfe4fabed21c39efd841b18cf93b7d5e69dd1280912c61a23799 WHIRLPOOL 834e2e85b855e26b8ead57ef7df4e9a3ed6254e1e7ae9e3aa00b3eb3d396582851dbb62dca7f406435c9393a001e0de7bfead5bf6d86f482d2142f170bd5b25d
+EBUILD nethack-3.4.3-r4.ebuild 6249 SHA256 d87cf04c255760bfeb2b9effe4a98f61ae8141958e07ace1a78a802d04efe557 SHA512 3efb8200c35900acecd242a4fed9f1b8823ad953bc0e85c4f87dc67dce772121e5005267563bf1a928377f888d57a380bdbfba03449ed8aae23d2c5a053c896c WHIRLPOOL f3a24b8b8bf2984b5191045caddab9bb5952602d00a349603c3f4f6726ca9e0472fc32f50819e83b8a0557ff65156f7f9ab6620479cf8ae1a2582570d8254e6b
+MISC ChangeLog 8515 SHA256 7ea9b91f1a1fabc200f1f52b9f1e463c2b4276722ce6afb9b361732099338160 SHA512 11ad53155f4b403a5b3375e6d1abe10856a57ce1898bc72e7c93dcbe320efff68061ef83a7205169ee8144b9acc34c2428b6cf606e7118a8c74b43fa211dd6d4 WHIRLPOOL 9055a53af9e273431a7508fb25a1d0349297e6ea14c155da729af53ae65c1907d73619b5df7bad6880b7ed78c69ca51397c7a20b28a862da0b10ee76bca43928
MISC metadata.xml 309 SHA256 2005cc1606b9c79a29209548d26024b75235e819bd5d96ce12a27ebf6b96c545 SHA512 5e4b98d6a3acf460bca83b8e0f0a08cfc4e8c932b59b6b5f0496e9892c5736a467048d3f3cc3e501055978d1a5b33f22073b9cdb9fc03249c7ffbbe19fc5158a WHIRLPOOL e54645a988abc7dc96c7ded87f278ce73fab73b53a9a3e03bfda3997abddb3a913a747222a23a045d37a77bc8052b3aba7b2864358e08e83a0265120ce82e185
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0
-iQIcBAEBCAAGBQJU52CPAAoJEC7dUkA7aK9H70wP/2U6s9bW29Nv2REPvlFGwrl9
-W1W/567wleBVKwoDwFveyE+TIOXLKr1OElNNP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6u5FhoFbgvLT5G+4FYFcLxlD3IvfnCsz/
+FkQWV3UpmYobdXWwB95XbxKnDdN+IkvgM7G5pE2R2qAqfS5gQEHcStHyS9MfbhWw
+w9tHKg4KV0AsXD2DUhb9tfReeJyaBFReMvBAOtRx6WFA7Rc58JW7GpdoYUbU4t1/
+/awWZrQpJ1pChFQUc/Xv+P1npXrxDTXjlF5PZMNTuvQDoZhRXUNr8QOc5UPETyHL
+qzNaYi37wBKa8bEOs8tlEGbNtqC+DXwYchFDmweeupUnFq7XyWr5V/4fWkt/dDDb
+wFbbASKbgVecYhUM8VTJ
+=UfS8
-----END PGP SIGNATURE-----
diff --git a/games-roguelike/nethack/nethack-3.4.3-r4.ebuild b/games-roguelike/nethack/nethack-3.4.3-r4.ebuild
new file mode 100644
index 000000000000..3a72a523e6ff
--- /dev/null
+++ b/games-roguelike/nethack/nethack-3.4.3-r4.ebuild
@@ -0,0 +1,231 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/nethack/nethack-3.4.3-r4.ebuild,v 1.1 2015/06/09 08:34:25 swift Exp $
+
+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="X"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r5
+ 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/games/bin"
+HACKDIR="/usr/share/games/${PN}"
+STATEDIR="/var/games/${PN}"
+
+NETHACK_GROUP="gamestat"
+
+pkg_setup() {
+ enewgroup gamestat 36
+}
+
+src_prepare() {
+ # This copies the /sys/unix Makefile.*s to their correct places for
+ # seding and compiling.
+ cd "sys/unix" || die "Could not go into sys/unix directory"
+ source setup.sh || die
+
+ cd ../.. || die "Failed to get back to main directory"
+ epatch \
+ "${FILESDIR}"/${PV}-gentoo-paths.patch \
+ "${FILESDIR}"/${PV}-default-options.patch \
+ "${FILESDIR}"/${PV}-bison.patch \
+ "${FILESDIR}"/${PV}-macos.patch \
+ "${FILESDIR}"/${P}-gibc210.patch \
+ "${FILESDIR}"/${P}-recover.patch
+
+ epatch_user
+
+ mv doc/recover.6 doc/nethack-recover.6 || die "Could not rename recover.6 to nethack-recover.6"
+
+ sed -i \
+ -e "s:GENTOO_STATEDIR:${STATEDIR}:" include/unixconf.h \
+ || die "setting statedir"
+ sed -i \
+ -e "s:GENTOO_HACKDIR:${HACKDIR}:" include/config.h \
+ || die "setting hackdir"
+ # set the default pager from the environment bug #52122
+ if [[ -n "${PAGER}" ]] ; then
+ sed -i \
+ -e "115c\#define DEF_PAGER \"${PAGER}\"" \
+ include/unixconf.h \
+ || die "setting statedir"
+ # bug #57410
+ sed -i \
+ -e "s/^DATNODLB =/DATNODLB = \$(DATHELP)/" Makefile \
+ || die "sed Makefile failed"
+ fi
+
+ # sys-libs/ncurses[tinfo]
+ sed -i \
+ -e '/^WINTTYLIB/s| = .*| = '"$(
+ $(tc-getPKG_CONFIG) --libs ncurses
+ )"'|g' \
+ src/Makefile || die
+
+ if use X ; then
+ epatch "${FILESDIR}/${PV}-X-support.patch"
+ fi
+}
+
+src_compile() {
+ local lflags="${LDFLAGS}"
+
+ cd "${S}"/src || die "Failed to enter src directory"
+ append-flags -I../include
+
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="${lflags}" \
+ ../util/makedefs
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="${lflags}"
+ cd "${S}"/util || die "Failed to enter util directory"
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="${lflags}" \
+ recover
+}
+
+src_install() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LFLAGS="-L/usr/X11R6/lib" \
+ GAMEPERM=02755 \
+ GAMEUID="root" GAMEGRP="${NETHACK_GROUP}" \
+ PREFIX="${D}/usr" \
+ GAMEDIR="${D}/${HACKDIR}" \
+ SHELLDIR="${D}/${BINDIR}" \
+ install
+
+ # We keep this stuff in STATEDIR instead so tidy up.
+ rm -rf "${D}/${HACKDIR}/"{nethack,recover,save}
+
+ exeinto "${BINDIR}"
+ newexe src/nethack nethack-bin
+ newexe 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
+ # and points HACK to BINDIR/nethack-bin (see above)
+ sed -i \
+ -e "s:^\(HACKDIR=\).*$:\1${HACKDIR}:;
+ s:^\(HACK=\).*$:\1${BINDIR}/nethack-bin:" \
+ "${D}/${BINDIR}/nethack" \
+ || die "sed /${BINDIR}/nethack failed"
+
+ 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 X && windowtypes="${windowtypes} x11"
+ set -- ${windowtypes}
+ sed -i \
+ -e "s:GENTOO_WINDOWTYPES:${windowtypes}:" \
+ -e "s:GENTOO_DEFWINDOWTYPE:$1:" \
+ "${D}${HACKDIR}/dot.nethackrc" \
+ || die "sed ${HACKDIR}/dot.nethackrc failed"
+ insinto /etc/skel
+ newins "${D}/${HACKDIR}/dot.nethackrc" .nethackrc
+
+ if use X ; then
+ # install nethack fonts
+ cd "${S}/win/X11" || die "Failed to enter win/X11 directory"
+ 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"
+
+ # copy nethack x application defaults
+ cd "${S}/win/X11" || die "Failed to enter win/X11 directory again"
+ insinto /etc/X11/app-defaults
+ newins NetHack.ad NetHack
+ sed -i \
+ -e 's:^!\(NetHack.tile_file.*\):\1:' \
+ "${D}/etc/X11/app-defaults/NetHack" \
+ || die "sed /etc/X11/app-defaults/NetHack failed"
+ fi
+
+ keepdir "${STATEDIR}/save"
+ rm "${D}/${HACKDIR}/"{logfile,perm,record}
+ make_desktop_entry nethack "Nethack"
+
+ fowners -R "root:${NETHACK_GROUP}" "${STATEDIR}"
+ fperms -R 660 "${STATEDIR}"
+ fperms 770 "${STATEDIR}" "${STATEDIR}/save"
+
+ fowners "root:${NETHACK_GROUP}" ${BINDIR}/nethack-bin
+ fperms g+s ${BINDIR}/nethack-bin
+}
+
+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"
+
+ chown -R root:"${NETHACK_GROUP}" . && \
+ chmod -R 660 . && \
+ chmod 770 . save || \
+ die "Adjustment of file permissions in ${ROOT}/${STATEDIR} failed"
+ fi
+
+ # we don't want to overwrite existing files, as they contain user data
+ local files="logfile perm record"
+
+ touch $files && \
+ chmod 660 $files && \
+ chown root:"${NETHACK_GROUP}" $files || \
+ die "Adjustment of file permissions in "${ROOT}/${STATEDIR}" failed"
+
+ elog "You may want to look at /etc/skel/.nethackrc for interesting options"
+}