blob: f685c464e861c3922797cd2dedb5aa8287fff856 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils games
MY_PN=mcd
MY_PV=${PV//./_}
DESCRIPTION="The Physics Centipede Invasion. Smashup waggly shmup, 'Mu-cade'."
HOMEPAGE="http://www.asahi-net.or.jp/~cs8k-cyu/windows/mcd_e.html"
SRC_URI="http://www.asahi-net.or.jp/~cs8k-cyu/windows/${MY_PN}${MY_PV}.zip"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~ppc ~x86"
IUSE=""
DEPEND="media-libs/libsdl
media-libs/mesa
media-libs/sdl-mixer
<dev-games/ode-10.1
dev-libs/bulletss"
RDEPEND=""
S=${WORKDIR}/${MY_PN}
pkg_setup() {
games_pkg_setup
# gcc must be built with "d" USE-FLAG
if ! built_with_use sys-devel/gcc:4.1 d; then
ewarn "sys-devel/gcc must be built with d for this package"
ewarn "to function."
die "recompile gcc with USE=\"d\""
fi
if [ "$(gcc-major-version)" == "4" ] && [ "$(gcc-minor-version)" == "2" ] ; then
die "gdc doesn't work with sys-devel/gcc-4.2 currently - use 4.1 instead"
fi
}
src_unpack(){
unpack ${A}
epatch "${FILESDIR}"/${P}.diff
sed -i \
-e 's:"\(images/[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i mcd/src/abagames/util/sdl/texture.d \
-e 's:"\(barrage[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i mcd/src/abagames/mcd/barrage.d \
-e 's:"\(sounds/[^"]*\)":"'${GAMES_DATADIR}'/'${PN}'/\1":g' -i mcd/src/abagames/util/sdl/sound.d \
-e 's:"\(mcd.prf[^"]*\)":"'${GAMES_STATEDIR}'/'${PN}'/\1":g' -i mcd/src/abagames/mcd/prefmanager.d \
|| die "sed failed"
}
src_install() {
dogamesbin ${PN}
dodir "${GAMES_STATEDIR}/${PN}" "${GAMES_STATEDIR}/${PN}/replay"
if [ ! -e ${D}"${GAMES_STATEDIR}"/${PN}/mcd.prf ]; then
touch ${D}"${GAMES_STATEDIR}"/${PN}/mcd.prf
chmod ug+rw ${D}"${GAMES_STATEDIR}"/${PN}/mcd.prf
fi
local datadir="${GAMES_DATADIR}"/${PN}
dodir ${datadir}
insinto "${GAMES_DATADIR}"/${PN}
doins -r barrage images sounds || die
newicon "${FILESDIR}"/${PN}.png ${PN}.png
make_desktop_entry ${PN} ${PN}
dodoc readme*
prepgamesdirs
}
pkg_postinst() {
games_pkg_postinst
}
|