diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2021-09-12 21:24:13 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2021-09-12 21:38:39 -0400 |
commit | 49d5fab6297f9dc2b76446ec58cc2ffe710809d2 (patch) | |
tree | 8c911a6042fe6dd870c347e74ddf5633a945569f /games-action/battalion/battalion-1.4b-r2.ebuild | |
parent | dev-perl/Specio: keyword ~riscv (diff) | |
download | gentoo-49d5fab6297f9dc2b76446ec58cc2ffe710809d2.tar.gz gentoo-49d5fab6297f9dc2b76446ec58cc2ffe710809d2.tar.bz2 gentoo-49d5fab6297f9dc2b76446ec58cc2ffe710809d2.zip |
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@gentoo.org>
Diffstat (limited to 'games-action/battalion/battalion-1.4b-r2.ebuild')
-rw-r--r-- | games-action/battalion/battalion-1.4b-r2.ebuild | 73 |
1 files changed, 73 insertions, 0 deletions
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 000000000000..4d03d116cfbb --- /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 +} |