commit:     49d5fab6297f9dc2b76446ec58cc2ffe710809d2
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 13 01:24:13 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Sep 13 01:38:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49d5fab6

games-action/battalion: EAPI6->8, fix and keyword for ~amd64

Upstream subtly fixed this game for amd64 in the same tarball
without releasing a new version (thus -r1 tarball).

Also fix highscore file (gamestat), and add missing man page
plus .sho data file.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-action/battalion/Manifest                 |  2 +
 games-action/battalion/battalion-1.4b-r2.ebuild | 73 +++++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/games-action/battalion/Manifest b/games-action/battalion/Manifest
index 5714ea24368..148db2f77c1 100644
--- a/games-action/battalion/Manifest
+++ b/games-action/battalion/Manifest
@@ -1 +1,3 @@
+DIST battalion1.4b-r1.tar.bz2 1103031 BLAKE2B 
393561b879813244c90cba1fe1186a65920bf383926c06c28f1ce3a04afa66eab08f3b35925495bf4ca9b0d37eb1925bad5cbace602a8cb575cc4d6c5410fd01
 SHA512 
5c2acf7941cfd4ae4c7f46b3df7c7e6090dfd099276c67b0de83a4e6e14de00b099814980a12bddf1349407e7e1e62f91da5d0da842fd26f240b9a6cb37ecb04
 DIST battalion1.4b.tar.bz2 942342 BLAKE2B 
6a4bd9afc7202d68c2cf62fbfe5b3b8377069263d71adaad006d2b4803d5989b130e0ef7fd5b1479a7698d79c819bc463ab19f2fa1493d4caf616708091e2c83
 SHA512 
c3c615772012c63a709aaeaf4f23246760bf577b82eeec7cf5b2a479c6240fe4a2f839aca50540299ed4bee9b297f61fb8b7e1f5af74ea357f0d7e749d86f84b
+DIST battalionSUN4.tar.gz 1593265 BLAKE2B 
239dff49c4d2c33a440594c113f45d347e598935257e30a04a18bd0f6b440b7790436000213fcbacfa862187f4760b9927539977f144ff5e92d7dfddbb7f3d7e
 SHA512 
1e1ea7c7232b99b01a85fdf0660877944d64172b751df1dcd63a6cbeb4179078e80879aca77d84bb37b68fcf082680243987d5b65c77e5ea48e8f5645f9b2ef0

diff --git a/games-action/battalion/battalion-1.4b-r2.ebuild 
b/games-action/battalion/battalion-1.4b-r2.ebuild
new file mode 100644
index 00000000000..4d03d116cfb
--- /dev/null
+++ b/games-action/battalion/battalion-1.4b-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Be a rampaging monster and destroy the city"
+HOMEPAGE="https://www.evl.uic.edu/aej/AndyBattalion.html";
+SRC_URI="
+       https://www.evl.uic.edu/aej/BATTALION/${PN}${PV}.tar.bz2 -> 
${PN}${PV}-r1.tar.bz2
+       https://www.evl.uic.edu/aej/BATTALION/${PN}SUN4.tar.gz";
+S="${WORKDIR}/${PN}${PV}"
+
+LICENSE="battalion HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       acct-group/gamestat
+       virtual/glu
+       virtual/opengl
+       x11-libs/libX11"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-warning.patch
+       "${FILESDIR}"/${P}-fix-build-system.patch
+)
+
+src_prepare() {
+       default
+
+       sed -e "/getenv.*DATADIR/s|= .*|= \"${EPREFIX}/usr/share/${PN}\";|" \
+               -e "/getenv.*SCOREDIR/s|= .*|= \"${EPREFIX}/var/games\";|" \
+               -i battalion.c || die
+
+       sed '1s/1/6/' ../${PN}SUN4/${PN}.man > "${T}"/${PN}.6
+
+       # Only .raw sound files are used on Linux. The .au files are not needed.
+       rm {SOUNDS,MUSIC}/*.au || die
+}
+
+src_compile() {
+       tc-export CC PKG_CONFIG
+
+       emake clean
+       emake
+}
+
+src_install() {
+       dobin ${PN}
+       doman "${T}"/${PN}.6
+       einstalldocs
+
+       insinto /usr/share/${PN}
+       doins -r DATA MUSIC SOUNDS TEXTURES ../${PN}SUN4/${PN}.data/${PN}.sho
+
+       dodir /var/games
+       > "${ED}"/var/games/${PN}_hiscore || die
+
+       fowners :gamestat /usr/bin/${PN} /var/games/${PN}_hiscore
+       fperms g+s /usr/bin/${PN}
+       fperms 660 /var/games/${PN}_hiscore
+}
+
+pkg_postinst() {
+       if [[ ! ${REPLACING_VERSIONS} ]]; then
+               elog "Note that sound and music are not enabled by default,"
+               elog "and require OSS support (/dev/dsp) to function."
+       fi
+}

Reply via email to