summaryrefslogtreecommitdiff
blob: 122db71c7ac40514a48fdb72c0f31bfb4c5b6d16 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-action/formido/formido-1.0.ebuild,v 1.4 2004/12/20 12:50:56 josejx Exp $

inherit eutils games

DESCRIPTION="A shooting game in the spirit of Phobia games"
HOMEPAGE="http://www.mhgames.cjb.net/"
SRC_URI="http://koti.mbnet.fi/lsoft/formido/${P}.tar.bz2
	http://koti.mbnet.fi/lsoft/formido/formido-music.tar.bz2"

LICENSE="GPL-2"
KEYWORDS="x86 ppc"
SLOT=0
IUSE=""

RDEPEND=">=media-libs/libsdl-1.2.5
	>=media-libs/sdl-image-1.2.2
	>=media-libs/sdl-mixer-1.2.4"
DEPEND="${RDEPEND}
	>=sys-apps/sed-4"

src_unpack() {
	unpack ${P}.tar.bz2

	cd ${S}
	epatch "${FILESDIR}/homedir.patch"

	sed -i \
		-e "/^FLAGS/ s:$: ${CXXFLAGS}:" Makefile || \
			die "sed Makefile failed"

	cd ${S}/data
	unpack ${PN}-music.tar.bz2
}

src_compile() {
	emake \
		CONFIGDIR="${GAMES_DATADIR}/${PN}" \
		DATDIR="${GAMES_DATADIR}/${PN}/data" \
		HISCOREDIR="${GAMES_STATEDIR}/${PN}" || die "emake failed"
}

src_install() {
	dogamesbin formido     || die "dogamesbin failed"
	dodoc README           || die "dodoc failed"

	insinto "${GAMES_DATADIR}/${PN}"
	doins "${PN}.cfg"      || die "doins failed (cfg)"

	insinto "${GAMES_DATADIR}/${PN}/data"
	doins data/*           || die "doins failed (data)"
	# no need to install this twice.
	rm -f "${D}${GAMES_DATADIR}/${PN}/data/hiscore.dat"

	insinto "${GAMES_STATEDIR}/${PN}"
	insopts -m 664
	doins data/hiscore.dat || die "doins failed (hiscore)"

	prepgamesdirs
}