diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2024-08-08 19:54:49 +0200 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2024-08-08 20:36:05 +0100 |
commit | 997696c70ecf6e9e65b4bf86d528199e6f294cad (patch) | |
tree | 009668b09c70785b0109aee9a52c8fb6a938aca2 /games-roguelike | |
parent | dev-libs/libclc: Add 20.0.0_pre20240808 snapshot (diff) | |
download | gentoo-997696c70ecf6e9e65b4bf86d528199e6f294cad.tar.gz gentoo-997696c70ecf6e9e65b4bf86d528199e6f294cad.tar.bz2 gentoo-997696c70ecf6e9e65b4bf86d528199e6f294cad.zip |
games-roguelike/angband: add 4.2.5
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-roguelike')
-rw-r--r-- | games-roguelike/angband/Manifest | 1 | ||||
-rw-r--r-- | games-roguelike/angband/angband-4.2.5.ebuild | 104 |
2 files changed, 105 insertions, 0 deletions
diff --git a/games-roguelike/angband/Manifest b/games-roguelike/angband/Manifest index 11db3055f54f..c3cae4aedbc4 100644 --- a/games-roguelike/angband/Manifest +++ b/games-roguelike/angband/Manifest @@ -1,2 +1,3 @@ DIST angband-4.2.4-man.tar.gz 116832 BLAKE2B 1ae72aa88b38e4f13b6f2c1131dc53367a28d60440b03f9eb655ba5d06e1bc41e0ec9575194b7ab7892727268a11800d65175bedd73ae296f8babd3174bdf127 SHA512 92391b32cb619dae8f5274b9390593530c0138c250ddfe5642a450d35f810b0fa5c24c0e888c836975eba3981346469a43b3ba15ff36b750d4ced8bdf2377385 DIST angband-4.2.4.tar.gz 25271611 BLAKE2B 97c19f23aff3aa1e9aedcbe33da0e9806f923c251e80dde54492d62dc5d54c58943483ea3b0da1913043deef9d3d52f89bdc3dced0870142f06c6ab6edc33615 SHA512 5b47cfa95f779aa3f1e89f02f203b8eafd2dc1376b7aab1b62e37122fb83640d1de25f39817863a74c246d7de35bb3f26868f5f5e8906e92788a6dd74a85a4c5 +DIST angband-4.2.5.tar.gz 25801900 BLAKE2B 00bfc6a23f785ca524807cee595c71cb64dc642263092270338f1e39ff6fe00e53e27a8df7f66bd200afd949e91f2026bac0557b602e4b5825c76604b732ac4d SHA512 4bd92f583cbebe5b0159ef9af9cd1df2ddf136e226b0560408d1409ac57a84c49302983ca44b0bc25b749b8c6120c892a557d0021b015b405cc8f17143f08119 diff --git a/games-roguelike/angband/angband-4.2.5.ebuild b/games-roguelike/angband/angband-4.2.5.ebuild new file mode 100644 index 000000000000..d4223af2b843 --- /dev/null +++ b/games-roguelike/angband/angband-4.2.5.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop xdg-utils + +DESCRIPTION="Roguelike dungeon exploration game based on the books of J.R.R. Tolkien" +HOMEPAGE="https://rephial.org/" +SRC_URI="https://github.com/angband/angband/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~steils/distfiles/${PN}-4.2.4-man.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86" +IUSE="+ncurses sdl sound +X" + +REQUIRED_USE="sound? ( sdl ) + || ( X ncurses )" + +RDEPEND="X? ( + media-fonts/font-misc-misc + x11-libs/libX11 + ) + ncurses? ( sys-libs/ncurses:=[unicode(+)] ) + sdl? ( + media-libs/libsdl2[video,X] + media-libs/sdl2-image[png] + media-libs/sdl2-ttf + sound? ( + media-libs/libsdl2[sound] + media-libs/sdl2-mixer[mp3] + ) + )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + sed -i -e '/libpath/s#datarootdir#datadir#' configure.ac || die + sed -i -e "/^.SILENT/d" mk/buildsys.mk.in || 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=( + --bindir="${EPREFIX}"/usr/bin + --with-private-dirs + $(use_enable X x11) + $(use_enable ncurses curses) + ) + if use sdl; then + myconf+=( + --enable-sdl2 + $(use_enable sound sdl2-mixer) + ) + fi + + econf "${myconf[@]}" +} + +src_install() { + default + + dodoc changes.txt README.md + doman "${WORKDIR}"/${PN}.1 + doenvd "${T}"/99${PN} + + if use X || use sdl; then + use X && make_desktop_entry "angband -mx11" "Angband (X11)" "${PN}" + use sdl && make_desktop_entry "angband -msdl2" "Angband (SDL2)" "${PN}" + + 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_postinst() { + if use X || use sdl; then + xdg_icon_cache_update + fi +} + +pkg_postrm() { + if use X || use sdl; then + xdg_icon_cache_update + fi +} |