diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-09-16 22:05:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-09-16 22:05:01 +0100 |
commit | cc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch) | |
tree | 125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /games-action/battalion/battalion-1.4b-r2.ebuild | |
parent | 677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff) |
gentoo resync : 16.09.2021
Diffstat (limited to 'games-action/battalion/battalion-1.4b-r2.ebuild')
-rw-r--r-- | games-action/battalion/battalion-1.4b-r2.ebuild | 75 |
1 files changed, 75 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..cf5a5613754a --- /dev/null +++ b/games-action/battalion/battalion-1.4b-r2.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop 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 || die + + # 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 + + make_desktop_entry ${PN} ${PN^} applications-games +} + +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 +} |