summaryrefslogtreecommitdiff
blob: 461fd8edb7d7713b21f095e71b7fd8e9e6a466c1 (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
62
63
64
65
66
67
# Copyright 1999-2005 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.8 2005/05/30 18:37:50 swegener Exp $

inherit games eutils libtool

IUSE="gtk2"

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"

RDEPEND="sys-libs/zlib
	!gtk2? ( =x11-libs/gtk+-1.2* )
	gtk2? ( =x11-libs/gtk+-2* )
	media-libs/libsdl
	dev-lang/nasm
	virtual/glu
	virtual/opengl"

DEPEND="${RDEPEND}
	>=sys-apps/sed-4"

S="${WORKDIR}/riceplugin"

src_unpack() {
	unpack ${A}

	cd ${S}

	epatch ${FILESDIR}/${PN}-makefile.patch || die "patch failed"

	if use gtk2 ; then
		epatch ${FILESDIR}/${PN}-gtk2.patch || die "patch failed"
	fi

	epatch ${FILESDIR}/${PN}-compile.patch || die "patch failed"
	epatch ${FILESDIR}/${PN}-gcc4.patch || die "patch failed"

	# the riceplugin requires sse support
	#echo "#include <xmmintrin.h>" > ${T}/test.c
	#$(gcc-getCC) ${CFLAGS} -o ${T}/test.s -S ${T}/test.c >&/dev/null || die
	#"failed sse test"

}

src_compile() {

	emake || die "emake failed"

}

src_install() {
	local dir=${GAMES_LIBDIR}/mupen64
	dodir ${dir}

	exeinto ${dir}/plugins
	doexe *.so
	insinto ${dir}/plugins
	doins *.ini

	prepgamesdirs
}