commit:     83a81ccad1ae3e8c76ad759ef0978d35b71e4839
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 26 09:43:41 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 09:43:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83a81cca

games-roguelike/zangband: fix games.eclass migration

- Add missing deps

- Use /var/games to fix games.eclass migration.

  Bit cheesy but I don't see an alternative here.

  Unlike the actively developed(!) games-roguelike/angband, the build
  system (and code) is pretty brittle and it hardcodes in one
  hierarchy and doesn't allow easy splitting.

  Startup & saving games should work now.

I should've noticed when merging the PR but apparently
I didn't try running. Oh well.

Fixes: 104ca58ef4e5af8d7978dd78327c102e32d9c4c3
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-roguelike/zangband/zangband-2.7.4c-r1.ebuild | 82 ++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/games-roguelike/zangband/zangband-2.7.4c-r1.ebuild 
b/games-roguelike/zangband/zangband-2.7.4c-r1.ebuild
new file mode 100644
index 000000000000..d1fb2671077c
--- /dev/null
+++ b/games-roguelike/zangband/zangband-2.7.4c-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="An enhanced version of the Roguelike game Angband"
+HOMEPAGE="http://www.zangband.org/";
+SRC_URI="ftp://ftp.sunet.se/pub/games/Angband/Variant/ZAngband/${P}.tar.gz";
+S="${WORKDIR}"/${PN}
+
+LICENSE="Moria"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tk"
+
+RDEPEND="
+       acct-group/gamestat
+       sys-libs/ncurses:=
+       x11-libs/libX11
+       x11-libs/libXaw
+       x11-libs/libXt
+       tk? (
+               dev-lang/tcl:=
+               dev-lang/tk:=
+       )
+"
+DEPEND="
+       ${RDEPEND}
+       x11-base/xorg-proto
+"
+BDEPEND="acct-group/gamestat"
+
+DOCS=( readme z_faq.txt z_update.txt )
+
+PATCHES=(
+       "${FILESDIR}"/${P}-tk85.patch
+       "${FILESDIR}"/${P}-rng.patch
+       "${FILESDIR}"/${P}-tinfo.patch
+       "${FILESDIR}"/${P}-configure.patch
+       "${FILESDIR}"/${P}-makefile.patch
+)
+
+src_prepare() {
+       default
+
+       mv configure.in configure.ac || die
+       eautoreconf
+}
+
+src_configure() {
+       local myconf=(
+               --datadir="${EPREFIX}"/var
+               --with-setgid=gamestat
+               --without-gtk
+               $(use_with tk tcltk)
+       )
+
+       econf "${myconf[@]}"
+}
+
+src_install() {
+       dodir /var/games/${PN}
+
+       # Install the basic files but remove unneeded bits to install ourselves
+       emake DESTDIR="${ED}"/var/games/${PN}/ installbase
+       # Covered via DOCS
+       rm "${ED}"/var/games/${PN}/{angdos.cfg,readme,z_faq.txt,z_update.txt} 
|| die
+
+       # Install everything else and fix the permissions
+       dobin zangband
+
+       keepdir /var/games/zangband/lib/{bone,info,user,save,xtra/{,help,music}}
+
+       # All users in the games group need write permissions to
+       # some important dirs
+       fowners -R :gamestat /var/games/${PN}/lib/{apex,data,save,user}
+       fperms -R g+w /var/games/${PN}/lib/{apex,data,save,user}
+
+       einstalldocs
+}

Reply via email to