summaryrefslogtreecommitdiff
blob: b8e8173012087d78fe6c457ab9fa85eea8658df8 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/mupen64-alsasnd/mupen64-alsasnd-0.4-r1.ebuild,v 1.3 2008/07/27 21:20:19 carlo Exp $

EAPI=1

inherit eutils qt3 games

DESCRIPTION="Alsa plugin for the mupen64 N64 emulator"
HOMEPAGE="http://www.emutalk.net/showthread.php?threadid=16895"
SRC_URI="mirror://gentoo/alsa-plugin-${PV}fix.tar.bz2"

LICENSE="as-is"
SLOT="0"
KEYWORDS="-* x86"
IUSE="gtk qt3"

DEPEND="media-libs/alsa-lib
	gtk? ( =x11-libs/gtk+-2* )
	qt3? ( x11-libs/qt:3 )
	!gtk? ( !qt3? ( =x11-libs/gtk+-2* ) )"

S=${WORKDIR}/alsa_plugin

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch \
		"${FILESDIR}"/${PV}-gentoo.patch \
		"${FILESDIR}"/${PV}-gtk.patch \
		"${FILESDIR}"/${P}-gcc41.patch
}

src_compile() {
	export GRAPHICAL_INTERFACE=gtk2
	use qt3 && export GRAPHICAL_INTERFACE=qt3
	use gtk && export GRAPHICAL_INTERFACE=gtk2
	emake || die "emake failed"
	unset GRAPHICAL_INTERFACE
}

src_install() {
	exeinto "$(games_get_libdir)"/mupen64/plugins
	doexe mupen64_alsasnd-${PV}.so || die "doexe failed"
	dodoc README
	prepgamesdirs
}