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.
87 lines
1.9 KiB
87 lines
1.9 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=6
|
||
|
inherit desktop
|
||
13 years ago
|
|
||
|
MY_PV="${PV/./}"
|
||
10 years ago
|
DESCRIPTION="A remake of the SPECTRUM game Nether Earth"
|
||
13 years ago
|
HOMEPAGE="http://www.braingames.getput.com/nether/"
|
||
|
SRC_URI="http://www.braingames.getput.com/nether/sources.zip
|
||
|
http://www.braingames.getput.com/nether/${PN}${MY_PV}.zip"
|
||
|
|
||
11 years ago
|
LICENSE="all-rights-reserved"
|
||
13 years ago
|
SLOT="0"
|
||
6 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
13 years ago
|
IUSE=""
|
||
11 years ago
|
RESTRICT="mirror bindist"
|
||
13 years ago
|
|
||
6 years ago
|
RDEPEND="
|
||
|
>=media-libs/libsdl-1.2.6-r3
|
||
13 years ago
|
>=media-libs/sdl-mixer-1.2.5-r1
|
||
6 years ago
|
media-libs/freeglut
|
||
|
"
|
||
13 years ago
|
DEPEND="${RDEPEND}
|
||
6 years ago
|
app-arch/unzip
|
||
|
"
|
||
13 years ago
|
|
||
6 years ago
|
S="${WORKDIR}/sources"
|
||
13 years ago
|
|
||
6 years ago
|
data="../nether earth v${PV}"
|
||
13 years ago
|
|
||
|
src_unpack() {
|
||
10 years ago
|
unzip -LL "${DISTDIR}/${PN}${MY_PV}.zip" >/dev/null || die
|
||
|
unzip -LL "${DISTDIR}/sources.zip" >/dev/null || die
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
6 years ago
|
default
|
||
|
|
||
|
DATA_DIR=/usr/share/${PN}
|
||
13 years ago
|
|
||
10 years ago
|
cp "${FILESDIR}/Makefile" . || die
|
||
13 years ago
|
|
||
|
# Fix compilation errors/warnings
|
||
6 years ago
|
eapply "${FILESDIR}"/${P}-linux.patch
|
||
13 years ago
|
|
||
6 years ago
|
eapply "${FILESDIR}"/${P}-freeglut.patch \
|
||
13 years ago
|
"${FILESDIR}"/${P}-glibc-212.patch \
|
||
|
"${FILESDIR}"/${P}-ldflags.patch
|
||
|
|
||
|
# Modify dirs and some fopen() permissions
|
||
6 years ago
|
eapply "${FILESDIR}/${P}-gentoo-paths.patch"
|
||
13 years ago
|
sed -i \
|
||
|
-e "s:models:${DATA_DIR}/models:" \
|
||
|
-e "s:textures:${DATA_DIR}/textures:" \
|
||
|
-e "s:maps/\*:${DATA_DIR}/maps/\*:" \
|
||
|
-e "s:\./maps:${DATA_DIR}/maps:" \
|
||
10 years ago
|
mainmenu.cpp || die
|
||
13 years ago
|
sed -i \
|
||
|
-e "s:models:${DATA_DIR}/models:g" \
|
||
|
-e "s:textures:${DATA_DIR}/textures:" \
|
||
|
-e "s:sound/:${DATA_DIR}/sound/:" \
|
||
10 years ago
|
nether.cpp || die
|
||
13 years ago
|
sed -i -e "s:maps:${DATA_DIR}/maps:" \
|
||
10 years ago
|
main.cpp || die
|
||
13 years ago
|
sed -i -e "s:textures/:${DATA_DIR}/textures/:" \
|
||
10 years ago
|
myglutaux.cpp || die
|
||
13 years ago
|
|
||
|
cd "${data}"
|
||
|
rm textures/thumbs.db
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
6 years ago
|
dobin nether_earth
|
||
13 years ago
|
|
||
|
cd "${data}"
|
||
|
|
||
|
# Install all game data
|
||
|
insinto "${DATA_DIR}"
|
||
10 years ago
|
doins -r maps models sound textures
|
||
13 years ago
|
|
||
|
dodoc readme.txt
|
||
|
|
||
6 years ago
|
newicon textures/nuclear.bmp ${PN}.bmp
|
||
|
make_desktop_entry nether_earth "Nether Earth" /usr/share/pixmaps/${PN}.bmp
|
||
13 years ago
|
}
|