summaryrefslogtreecommitdiff
blob: 3862d4d3cc092f067600028463e3fb115f95f671 (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-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/smclone/smclone-0.95.ebuild,v 1.4 2005/05/03 09:33:53 dholm Exp $

inherit games eutils

DESCRIPTION="clone of Super Mario World"
HOMEPAGE="http://smclone.arturh.com/"
SRC_URI="mirror://sourceforge/smclone/SMC_${PV}.zip
	mirror://sourceforge/smclone/music_2.0_RC_1.zip"

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

RDEPEND="media-libs/libsdl
	media-libs/sdl-image
	media-libs/sdl-mixer
	media-libs/sdl-ttf
	media-libs/sdl-gfx"
DEPEND="${RDEPEND}
	app-arch/unzip
	>=sys-apps/portage-2.0.51"

S="${WORKDIR}/SMC 0.95 Preview 1"

src_unpack() {
	unpack SMC_${PV}.zip
	cd "${S}"
	unpack music_2.0_RC_1.zip

	find . '(' -name '*.dll' -o -name '*.exe' ')' -exec rm {} \;
	cd src/unix
	chmod go+rw *
	edos2unix Makefile.am autogen.sh configure.ac ../savegame.cpp
	epatch "${FILESDIR}"/${P}-gentoo-paths.patch
	sed -i \
		-e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:g" \
		configure.ac
	chmod a+x autogen.sh
	./autogen.sh || die "autogen failed"
	cd ..
	epatch "${FILESDIR}"/${P}-use-HOME.patch
}

src_compile() {
	cd src/unix
	egamesconf || die
	emake || die
}

src_install() {
	dogamesbin src/unix/smc || die "smc"
	insinto "${GAMES_DATADIR}/${PN}"
	doins -r data/* levels world || die "doins"
	dodoc *.txt ../readme-linux.txt
	cd ..
	dohtml *.html *.css
	prepgamesdirs
}