summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-11-19 16:48:51 +0100
committerDavid Seifert <soap@gentoo.org>2017-11-19 16:51:15 +0100
commitacdce5c5b1e2dd043bca0e92c762e9142565922f (patch)
tree8b1a60f06d6f47b8032e5e4a9c802f8cded3a52e /games-action/battalion/battalion-1.4b-r1.ebuild
parentgames-action/barrage: Remove old (diff)
downloadgentoo-acdce5c5b1e2dd043bca0e92c762e9142565922f.tar.gz
gentoo-acdce5c5b1e2dd043bca0e92c762e9142565922f.tar.bz2
gentoo-acdce5c5b1e2dd043bca0e92c762e9142565922f.zip
games-action/battalion: Update to EAPI 6
* Remove games.eclass * Respect user variables Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'games-action/battalion/battalion-1.4b-r1.ebuild')
-rw-r--r--games-action/battalion/battalion-1.4b-r1.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/games-action/battalion/battalion-1.4b-r1.ebuild b/games-action/battalion/battalion-1.4b-r1.ebuild
new file mode 100644
index 000000000000..d601672cf212
--- /dev/null
+++ b/games-action/battalion/battalion-1.4b-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Be a rampaging monster and destroy the city"
+HOMEPAGE="http://evlweb.eecs.uic.edu/aej/AndyBattalion.html"
+SRC_URI="http://evlweb.eecs.uic.edu/aej/BATTALION/${PN}${PV}.tar.bz2"
+
+LICENSE="battalion HPND"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="
+ virtual/glu
+ virtual/opengl
+ x11-libs/libX11"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${PN}${PV}
+PATCHES=(
+ "${FILESDIR}"/${P}-warning.patch
+ "${FILESDIR}"/${PN}-1.4b-fix-build-system.patch
+)
+
+src_prepare() {
+ default
+
+ # Modify data paths
+ sed -i \
+ -e "s:SOUNDS/:${EPREFIX}/usr/share/${PN}/SOUNDS/:" \
+ -e "s:MUSIC/:${EPREFIX}/usr/share/${PN}/MUSIC/:" \
+ audio.c || die
+ sed -i \
+ -e "s:DATA/:${EPREFIX}/usr/share/${PN}/DATA/:" \
+ -e "s:/usr/tmp:${EPREFIX}/var/${PN}:" \
+ battalion.c || die
+ sed -i \
+ -e "s:TEXTURES/:${EPREFIX}/usr/share/${PN}/TEXTURES/:" \
+ graphics.c || die
+
+ # Only .raw sound files are used on Linux. The .au files are not needed.
+ rm {SOUNDS,MUSIC}/*.au || die
+}
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ dobin battalion
+ einstalldocs
+
+ insinto /usr/share/${PN}
+ doins -r DATA MUSIC SOUNDS TEXTURES
+
+ dodir /var/${PN}
+ touch "${ED%/}"/var/${PN}/battalion_hiscore || die
+ fperms 660 /var/${PN}/battalion_hiscore
+}
+
+pkg_postinst() {
+ elog "Sound and music are not enabled by default."
+ elog "Use the S and M keys to enable them in-game, or start the game with"
+ elog "the -s and -m switches: battalion -s -m"
+}