summaryrefslogtreecommitdiff
blob: 649d26d45ce8ea49dfdb0180ab4aa9b394cfff5c (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-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

ESVN_REPO_URI="http://dolphin-emu.googlecode.com/svn/trunk/"

inherit eutils games subversion

DESCRIPTION="Gamecube and Wii emulator"
HOMEPAGE="http://dolphin-emu.com"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="docs lzo openal sfml"

RDEPEND="x11-libs/wxGTK:2.8
	media-gfx/nvidia-cg-toolkit
	media-libs/portaudio
	games-util/wiiuse
	virtual/opengl
	virtual/glu
	lzo? ( dev-libs/lzo )
	openal? ( =media-libs/openal-1* )
	sfml? ( media-libs/libsfml )"
DEPEND="${RDEPEND} 
        dev-util/scons
	dev-util/pkgconfig"

S=${WORKDIR}

SCONSOPTS=""

src_configure() {
	SCONSOPTS=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }")
	use lzo && SCONSOPTS="${SCONSOPTS} shared_lzo=yes"
        use openal && SCONSOPTS="${SCONSOPTS} openal=yes"
        use sfml && SCONSOPTS="${SCONSOPTS} shared_sfml=yes"
}

src_compile() {
	scons \
		install=global \
		prefix=${GAMES_PREFIX} \
		destdir=${D} \
		${SCONSOPTS} || die "scons failed"
}

src_install() {
	scons ${SCONSOPTS} install || die "scons install failed"
	if use docs; then
		insinto ${GAMES_DATADIR}/${PN}
		doins -r docs/*
	fi	
	doicon ${FILESDIR}/Dolphin.png
	make_desktop_entry dolphin-emu "Dolphin Emulator" Dolphin
	prepgamesdirs
}