zangband-2.7.4c.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils games
  5. DESCRIPTION="An enhanced version of the Roguelike game Angband"
  6. HOMEPAGE="http://www.zangband.org/"
  7. SRC_URI="ftp://ftp.sunet.se/pub/games/Angband/Variant/ZAngband/${P}.tar.gz"
  8. LICENSE="Moria"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86 ~x86-fbsd"
  11. IUSE="tk"
  12. RDEPEND="
  13. tk? (
  14. dev-lang/tcl:0=
  15. dev-lang/tk:0=
  16. )
  17. x11-libs/libXaw"
  18. DEPEND="${RDEPEND}
  19. x11-proto/xextproto"
  20. S=${WORKDIR}/${PN}
  21. src_prepare() {
  22. epatch "${FILESDIR}"/${P}-tk85.patch \
  23. "${FILESDIR}"/${P}-rng.patch \
  24. "${FILESDIR}"/${P}-configure.patch \
  25. "${FILESDIR}"/${P}-makefile.patch
  26. mv configure.in configure.ac || die
  27. eautoreconf
  28. }
  29. src_configure() {
  30. egamesconf \
  31. --datadir="${GAMES_DATADIR_BASE}" \
  32. --with-setgid="${GAMES_GROUP}" \
  33. --without-gtk \
  34. $(use_with tk tcltk)
  35. }
  36. src_install() {
  37. # Keep some important dirs we want to chmod later
  38. keepdir "${GAMES_DATADIR}"/${PN}/lib/{apex,user,save,bone,info,xtra/help,xtra/music}
  39. # Install the basic files but remove unneeded crap
  40. emake DESTDIR="${D}/${GAMES_DATADIR}"/${PN}/ installbase
  41. rm "${D}${GAMES_DATADIR}"/${PN}/{angdos.cfg,readme,z_faq.txt,z_update.txt}
  42. # Install everything else and fix the permissions
  43. dogamesbin zangband
  44. dodoc readme z_faq.txt z_update.txt
  45. find "${D}${GAMES_DATADIR}/zangband/lib" -type f -exec chmod a-x \{\} +
  46. prepgamesdirs
  47. # All users in the games group need write permissions to
  48. # some important dirs
  49. fperms -R g+w "${GAMES_DATADIR}"/zangband/lib/{apex,data,save,user}
  50. }