summaryrefslogtreecommitdiff
path: root/games-roguelike/angband
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-roguelike/angband
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-roguelike/angband')
-rw-r--r--games-roguelike/angband/Manifest4
-rw-r--r--games-roguelike/angband/angband-4.0.5-r1.ebuild115
-rw-r--r--games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch13
-rw-r--r--games-roguelike/angband/metadata.xml11
4 files changed, 143 insertions, 0 deletions
diff --git a/games-roguelike/angband/Manifest b/games-roguelike/angband/Manifest
new file mode 100644
index 000000000000..efba74be21fa
--- /dev/null
+++ b/games-roguelike/angband/Manifest
@@ -0,0 +1,4 @@
+AUX angband-4.0.5-pie-gcc.patch 453 BLAKE2B f303fd00ae875a12159027c1e4f7c48017dcddd300b72095c2d91ad3a532bf40b7a2c3267bfa6906e27452651ccd99e05aa26108e44ddabeb9107cbc9c85de06 SHA512 1173ab1e5eebfba393d34085d6896b9633ec5be4914cfe3925082b6ff8ba8194b6a85970c998dc268d84e71ac524b885a66becbaa2a28ee17acfc11d4957fb3a
+DIST angband-4.0.5.tar.gz 19886562 BLAKE2B 3b8410187a66dacc5f2310e116f3abe8ca04e1363701d455df68f3daaf2a23b0ad4811cee2a50129e1f8e096c6ee9e40f8879b25e97510946b4e4ac2a9124631 SHA512 9ad46430d7e3c4b7676042b28107a2a5b9b2ed967dd1f45b91ca37583fa2d5e9ba25d963a6510ee091b8fdb3a704a60002d851d7898a6298567f804dce36a88b
+EBUILD angband-4.0.5-r1.ebuild 2650 BLAKE2B eea5b92cbf3a3ae69b0a01dacbfcdfd61804acf75ede21be3c16f81d4b884a1421025fb7e7bf8349eb1a4409bfb6beaa7166c3f1aeb469705b3122bc9ddbe15e SHA512 0dcb532baf61ee94461b055b6a3b63f5b17d42f849ea318815d8960b7c0ba6b3b31c2b72d42e7788481357bb9b0c8f0694849d44c0c7641ccb094f6ef5d5701c
+MISC metadata.xml 322 BLAKE2B 121663252d3cc2808c692febb987b8220f8f8b507598833bc42d31cf72566ac9c9c6cf01f54ea5ccdb18a011ee08ddcc21d6a33a85b7609be8b54b4520783483 SHA512 0f2cb75c7386183901d5790e27da590b8e529807f9c0ea1781d072645bf5605fd66589851189ec4b58ff7d711c00c3c0df2ab88acb96ed01079dbe2f8ac17b24
diff --git a/games-roguelike/angband/angband-4.0.5-r1.ebuild b/games-roguelike/angband/angband-4.0.5-r1.ebuild
new file mode 100644
index 000000000000..d8830482e592
--- /dev/null
+++ b/games-roguelike/angband/angband-4.0.5-r1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils gnome2-utils versionator
+
+MAJOR_PV=$(get_version_component_range 1-2)
+
+DESCRIPTION="A roguelike dungeon exploration game based on the books of J.R.R. Tolkien"
+HOMEPAGE="http://rephial.org/"
+SRC_URI="http://rephial.org/downloads/${MAJOR_PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ncurses sdl +sound X"
+
+RDEPEND="X? ( x11-libs/libX11 )
+ !ncurses? ( !X? ( !sdl? ( sys-libs/ncurses:0=[unicode] ) ) )
+ ncurses? ( sys-libs/ncurses:0=[unicode] )
+ sdl? ( media-libs/libsdl[video,X]
+ media-libs/sdl-image
+ media-libs/sdl-ttf
+ sound? ( media-libs/libsdl[sound] )
+ media-libs/sdl-mixer[mp3] )"
+DEPEND="${RDEPEND}
+ dev-python/docutils
+ virtual/pkgconfig"
+
+PATCHES=("${FILESDIR}"/${P}-pie-gcc.patch)
+
+src_prepare() {
+ default
+
+ sed -i -e '/libpath/s#datarootdir#datadir#' configure.ac || die
+ sed -i -e "/^.SILENT/d" mk/buildsys.mk.in || die
+ sed -i -e '/^DOC =/s/=.*/=/' doc/Makefile || die
+
+ if use !sound ; then
+ sed -i -e 's/sounds//' lib/Makefile || die
+ fi
+
+ # Game constant files are now system config files in Angband, but
+ # users will be hidden from applying updates by default
+ {
+ echo "CONFIG_PROTECT_MASK=\"/etc/${PN}/customize/\""
+ echo "CONFIG_PROTECT_MASK=\"/etc/${PN}/gamedata/\""
+ } > "${T}"/99${PN} || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use sdl; then
+ myconf="$(use_enable sound sdl-mixer)"
+ else
+ myconf="--disable-sdl-mixer"
+ fi
+
+ ac_cv_path_NCURSES_CONFIG="pkg-config ncursesw" \
+ econf \
+ --bindir="${EPREFIX}"/usr/bin \
+ --with-private-dirs \
+ $(use_enable X x11) \
+ $(use_enable sdl) \
+ $(use_enable ncurses curses) \
+ $(use !sdl && use !ncurses && use !X && \
+ echo --enable-curses) \
+ ${myconf}
+}
+
+src_install() {
+ DOCS="changes.txt faq.txt readme.txt thanks.txt" \
+ default
+
+ dodoc doc/manual.html
+ doenvd "${T}"/99${PN}
+
+ if use X || use sdl ; then
+ if use X; then
+ make_desktop_entry "angband -mx11" "Angband (X11)" "${PN}"
+ fi
+
+ if use sdl; then
+ make_desktop_entry "angband -msdl" "Angband (SDL)" "${PN}"
+ fi
+
+ local s
+ for s in 16 32 128 256 512
+ do
+ newicon -s ${s} lib/icons/att-${s}.png "${PN}.png"
+ done
+ newicon -s scalable lib/icons/att.svg "${PN}.svg"
+ fi
+}
+
+pkg_preinst() {
+ if use X || use sdl ; then
+ gnome2_icon_savelist
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "Angband now uses private savefiles instead of system-wide ones."
+ elog "This version of Angband is not compatible with the save files"
+ elog "of previous versions."
+ echo
+
+ if use X || use sdl ; then
+ gnome2_icon_cache_update
+ fi
+}
diff --git a/games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch b/games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch
new file mode 100644
index 000000000000..b4f3c5707d43
--- /dev/null
+++ b/games-roguelike/angband/files/angband-4.0.5-pie-gcc.patch
@@ -0,0 +1,13 @@
+Allow gcc to construct correct partial linking command to ld.
+Otherwise ld gets an incompatible mix of '-pie -r'.
+
+https://bugs.gentoo.org/617982
+diff --git a/src/Makefile b/src/Makefile
+index 79be4cc..d27bb91 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -33,3 +33,3 @@ win/$(PROGNAME).res: win/$(PROGNAME).rc
+ $(PROGNAME).o: $(OBJECTS)
+- $(LD) -nostdlib -Wl,-r -o $@ $(OBJECTS)
++ $(LD) -nostdlib -r -o $@ $(OBJECTS)
+ @printf "%10s %-20s\n" LINK $@
diff --git a/games-roguelike/angband/metadata.xml b/games-roguelike/angband/metadata.xml
new file mode 100644
index 000000000000..dc2d1c7d2794
--- /dev/null
+++ b/games-roguelike/angband/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="sound">Enable and install sounds</flag>
+ </use>
+</pkgmetadata>