summaryrefslogtreecommitdiff
blob: ad2620440ddb4e840aa0357bedf81ee14ccf601d (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-engines/scummvm/scummvm-0.5.1.ebuild,v 1.5 2004/02/28 01:48:01 vapier Exp $

inherit eutils games

DESCRIPTION="Reimplementation of the SCUMM game engine used in Lucasarts adventures"
HOMEPAGE="http://scummvm.sourceforge.net/"
SRC_URI="mirror://sourceforge/scummvm/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ppc amd64"
IUSE="alsa oggvorbis mad"

DEPEND="media-libs/libsdl
	>=sys-apps/sed-4
	oggvorbis? ( media-libs/libvorbis )
	alsa? ( media-libs/alsa-lib )
	mad? ( media-libs/libmad )"

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch "${FILESDIR}/${PV}-alsa.patch"
}

src_compile() {
	egamesconf \
		`use_with alsa` \
		`use_with oggvorbis vorbis` \
		`use_with mad` \
		|| die
	if use alsa ; then
		sed -i \
			-e "/^# DEF.*ALSA$/s:# ::" \
			-e "/^# LIBS.*asound$/s:# ::" \
			Makefile || die "sed Makefile (alsa) failed"
	fi
	if use oggvorbis ; then
		sed -i \
			-e "/^# DEF.*VORBIS$/s:# ::" \
			-e "/^# LIBS.*vorbis$/s:# ::" \
			Makefile || die "sed Makefile (oggvorbis) failed"
	fi
	if ! use mad ; then
		sed -i \
			-e "s:^DEF.*MAD$::" \
			-e "s:^LIBS.*mad$::" \
			Makefile || die "sed Makefile (mad) failed"
	fi
	emake || die "emake failed"
}

src_install() {
	dogamesbin scummvm || die "dogamesbin failed"
	doman scummvm.6
	dodoc NEWS README
	prepgamesdirs
}