From 997696c70ecf6e9e65b4bf86d528199e6f294cad Mon Sep 17 00:00:00 2001 From: Michael Mair-Keimberger Date: Thu, 8 Aug 2024 19:54:49 +0200 Subject: [PATCH 1/4] games-roguelike/angband: add 4.2.5 Signed-off-by: Michael Mair-Keimberger Signed-off-by: James Le Cuirot --- games-roguelike/angband/Manifest | 1 + games-roguelike/angband/angband-4.2.5.ebuild | 104 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 games-roguelike/angband/angband-4.2.5.ebuild diff --git a/games-roguelike/angband/Manifest b/games-roguelike/angband/Manifest index 11db3055f54fe..c3cae4aedbc4e 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 0000000000000..d4223af2b8433 --- /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 +} From e4e5c98df6a1c65cb3b5673024f4003b231549d4 Mon Sep 17 00:00:00 2001 From: Michael Mair-Keimberger Date: Thu, 8 Aug 2024 19:55:35 +0200 Subject: [PATCH 2/4] games-roguelike/angband: add missing remote-id Signed-off-by: Michael Mair-Keimberger Closes: https://github.com/gentoo/gentoo/pull/38019 Signed-off-by: James Le Cuirot --- games-roguelike/angband/metadata.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/games-roguelike/angband/metadata.xml b/games-roguelike/angband/metadata.xml index 29b7d95473a1f..6e5d6f0e6e82e 100644 --- a/games-roguelike/angband/metadata.xml +++ b/games-roguelike/angband/metadata.xml @@ -12,4 +12,7 @@ Enable and install sounds + + angband/angband + From ee46c33ce6e4e3f0e9d3912cd6aa7d7d88a63645 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Thu, 8 Aug 2024 20:34:33 +0100 Subject: [PATCH 3/4] games-roguelike/angband: Add new man page with note on how to generate it Signed-off-by: James Le Cuirot --- games-roguelike/angband/Manifest | 1 + games-roguelike/angband/angband-4.2.5.ebuild | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/games-roguelike/angband/Manifest b/games-roguelike/angband/Manifest index c3cae4aedbc4e..77d03f98313d0 100644 --- a/games-roguelike/angband/Manifest +++ b/games-roguelike/angband/Manifest @@ -1,3 +1,4 @@ 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-man.tar.gz 120256 BLAKE2B 76846be139835d5979e777d9e02b2232f36457eff4555ceb40b8ec271804829f3b4fd83c00dff2cd7853e071296e39b617f192383cc0f1c4dd7a3d33eb3f5baf SHA512 18ab4cfa3cf2cb9273cc9e5abc7c2059382b8ca3c7934498333dd200f91ec38a9486905adcc8751274eb6e229aa78faf43c389e4abe1e471015d6964bb56c05f 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 index d4223af2b8433..8e5d46e4301ec 100644 --- a/games-roguelike/angband/angband-4.2.5.ebuild +++ b/games-roguelike/angband/angband-4.2.5.ebuild @@ -3,12 +3,16 @@ EAPI=8 +# Generate the man page from the source tree with: +# sudo emerge -u dev-python/sphinx +# DOC_HTML_THEME=classic sphinx-build -b man docs . + 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" + https://dev.gentoo.org/~chewi/distfiles/${P}-man.tar.gz" LICENSE="GPL-2" SLOT="0" From 1d6b382a0bf47b71a33129f81d69bacc98b912f1 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Thu, 8 Aug 2024 20:35:02 +0100 Subject: [PATCH 4/4] games-roguelike/angband: Drop old 4.2.4 Signed-off-by: James Le Cuirot --- games-roguelike/angband/Manifest | 2 - games-roguelike/angband/angband-4.2.4.ebuild | 104 ------------------- 2 files changed, 106 deletions(-) delete mode 100644 games-roguelike/angband/angband-4.2.4.ebuild diff --git a/games-roguelike/angband/Manifest b/games-roguelike/angband/Manifest index 77d03f98313d0..f349a3d2c7d86 100644 --- a/games-roguelike/angband/Manifest +++ b/games-roguelike/angband/Manifest @@ -1,4 +1,2 @@ -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-man.tar.gz 120256 BLAKE2B 76846be139835d5979e777d9e02b2232f36457eff4555ceb40b8ec271804829f3b4fd83c00dff2cd7853e071296e39b617f192383cc0f1c4dd7a3d33eb3f5baf SHA512 18ab4cfa3cf2cb9273cc9e5abc7c2059382b8ca3c7934498333dd200f91ec38a9486905adcc8751274eb6e229aa78faf43c389e4abe1e471015d6964bb56c05f DIST angband-4.2.5.tar.gz 25801900 BLAKE2B 00bfc6a23f785ca524807cee595c71cb64dc642263092270338f1e39ff6fe00e53e27a8df7f66bd200afd949e91f2026bac0557b602e4b5825c76604b732ac4d SHA512 4bd92f583cbebe5b0159ef9af9cd1df2ddf136e226b0560408d1409ac57a84c49302983ca44b0bc25b749b8c6120c892a557d0021b015b405cc8f17143f08119 diff --git a/games-roguelike/angband/angband-4.2.4.ebuild b/games-roguelike/angband/angband-4.2.4.ebuild deleted file mode 100644 index 95c89f792a687..0000000000000 --- a/games-roguelike/angband/angband-4.2.4.ebuild +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools desktop xdg-utils - -DESCRIPTION="A 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/${P}-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 -}