You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.5 KiB
70 lines
1.5 KiB
7 years ago
|
# Copyright 1999-2017 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
7 years ago
|
EAPI=6
|
||
|
|
||
|
inherit toolchain-funcs
|
||
13 years ago
|
|
||
10 years ago
|
DESCRIPTION="Be a rampaging monster and destroy the city"
|
||
13 years ago
|
HOMEPAGE="http://evlweb.eecs.uic.edu/aej/AndyBattalion.html"
|
||
|
SRC_URI="http://evlweb.eecs.uic.edu/aej/BATTALION/${PN}${PV}.tar.bz2"
|
||
|
|
||
12 years ago
|
LICENSE="battalion HPND"
|
||
13 years ago
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~x86"
|
||
13 years ago
|
IUSE=""
|
||
|
|
||
7 years ago
|
DEPEND="
|
||
10 years ago
|
virtual/glu
|
||
7 years ago
|
virtual/opengl
|
||
10 years ago
|
x11-libs/libX11"
|
||
|
RDEPEND=${DEPEND}
|
||
13 years ago
|
|
||
|
S=${WORKDIR}/${PN}${PV}
|
||
7 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-warning.patch
|
||
|
"${FILESDIR}"/${PN}-1.4b-fix-build-system.patch
|
||
|
)
|
||
13 years ago
|
|
||
|
src_prepare() {
|
||
7 years ago
|
default
|
||
|
|
||
13 years ago
|
# Modify data paths
|
||
|
sed -i \
|
||
7 years ago
|
-e "s:SOUNDS/:${EPREFIX}/usr/share/${PN}/SOUNDS/:" \
|
||
|
-e "s:MUSIC/:${EPREFIX}/usr/share/${PN}/MUSIC/:" \
|
||
10 years ago
|
audio.c || die
|
||
13 years ago
|
sed -i \
|
||
7 years ago
|
-e "s:DATA/:${EPREFIX}/usr/share/${PN}/DATA/:" \
|
||
|
-e "s:/usr/tmp:${EPREFIX}/var/${PN}:" \
|
||
10 years ago
|
battalion.c || die
|
||
13 years ago
|
sed -i \
|
||
7 years ago
|
-e "s:TEXTURES/:${EPREFIX}/usr/share/${PN}/TEXTURES/:" \
|
||
10 years ago
|
graphics.c || die
|
||
13 years ago
|
|
||
|
# Only .raw sound files are used on Linux. The .au files are not needed.
|
||
7 years ago
|
rm {SOUNDS,MUSIC}/*.au || die
|
||
13 years ago
|
}
|
||
|
|
||
7 years ago
|
src_configure() {
|
||
|
tc-export CC
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
7 years ago
|
dobin battalion
|
||
|
einstalldocs
|
||
13 years ago
|
|
||
7 years ago
|
insinto /usr/share/${PN}
|
||
|
doins -r DATA MUSIC SOUNDS TEXTURES
|
||
13 years ago
|
|
||
7 years ago
|
dodir /var/${PN}
|
||
|
touch "${ED%/}"/var/${PN}/battalion_hiscore || die
|
||
|
fperms 660 /var/${PN}/battalion_hiscore
|
||
13 years ago
|
}
|
||
|
|
||
|
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"
|
||
|
}
|