summaryrefslogtreecommitdiff
blob: e44396393a211af8a53f7a889e963dc954d03ac0 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/mupen64-riceplugin/mupen64-riceplugin-5.1.0.ebuild,v 1.12 2009/01/20 10:41:01 tupone Exp $

inherit toolchain-funcs eutils flag-o-matic games

DESCRIPTION="an graphics plugin for mupen64"
SRC_URI="http://mupen64.emulation64.com/files/0.4/riceplugin.tar.bz2"
HOMEPAGE="http://mupen64.emulation64.com/"

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

RDEPEND="sys-libs/zlib
	=x11-libs/gtk+-2*
	media-libs/libsdl
	virtual/glu
	virtual/opengl"
DEPEND="${RDEPEND}
	dev-lang/nasm"

S=${WORKDIR}/riceplugin

src_unpack() {
	unpack ${A}
	cd "${S}"
	edos2unix DLParser.h ROM.h
	epatch \
		"${FILESDIR}"/${PN}-makefile.patch \
		"${FILESDIR}"/${PN}-gtk2.patch \
		"${FILESDIR}"/${PN}-compile.patch \
		"${FILESDIR}"/${PN}-gcc4.patch \
		"${FILESDIR}"/${P}-gcc43.patch
}

src_compile() {
	[[ $(gcc-major-version) -ge 4 ]] && ! is-flag -msse && append-flags -msse
	emake || die "emake failed"
}

src_install() {
	exeinto "$(games_get_libdir)"/mupen64/plugins
	doexe *.so || die "doexe failed"
	insinto "$(games_get_libdir)"/mupen64/plugins
	doins *.ini || die "doins failed"
	prepgamesdirs
}