summaryrefslogtreecommitdiff
blob: 296dcf387e2545f7fef188c419304ab0d6c4a0f0 (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/abe/abe-1.0.ebuild,v 1.1 2004/05/30 07:22:24 mr_bones_ Exp $

inherit eutils games

MY_P="${P/./_}"
DESCRIPTION="A scrolling, platform-jumping, key-collecting, ancient pyramid exploring game"
HOMEPAGE="http://abe.sourceforge.net"
SRC_URI="mirror://sourceforge/abe/${MY_P}.tar.gz"

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

RDEPEND=">=media-libs/libsdl-1.2.3
	>=media-libs/sdl-mixer-1.2.5"

DEPEND="${RDEPEND}
	>=sys-apps/sed-4"

S="${WORKDIR}/${MY_P}"
DEST_DIR="${GAMES_DATADIR}/${PN}"

src_unpack() {
	unpack ${A}
	cd "${S}/src"

	# Modify paths to resources
	sed -i \
		-e "s:\"images\":\"${DEST_DIR}/images\":" Image.h \
		|| die "sed Image.h failed"
	sed -i \
		-e "s:\"maps\":\"${DEST_DIR}/maps\":" Map.h MapIO.h \
		|| die "sed Map.h MapIO.h failed"
	sed -i \
		-e "s:\"sounds\":\"${DEST_DIR}/sounds\":" Sound.h \
		|| die "sed Sound.h failed"
	epatch "${FILESDIR}/${PV}-gentoo-paths.patch"
}

src_compile() {
	./autogen.sh || die "autogen.sh failed"
	egamesconf || die
	emake || die "emake failed"
}

src_install() {
	dogamesbin abe || die "dogamesbin failed"
	dodir "${DEST_DIR}"
	cp -R images sounds maps "${D}${DEST_DIR}" || die "cp failed"
	dodoc README
	prepgamesdirs
}