summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Harmon <russ@eatnumber1.com>2010-01-01 15:47:27 -0500
committerRussell Harmon <russ@eatnumber1.com>2010-01-01 21:37:36 -0500
commit259bd75b39a0b6cf96e71007de14d4d109010cea (patch)
tree64ea2a3cfb54b691a3731e2e6038e2a6e05ba30c /games-emulation/bsnes
parentAdd compcache-tools ebuild (diff)
downloadeatnumber1-259bd75b39a0b6cf96e71007de14d4d109010cea.tar.gz
eatnumber1-259bd75b39a0b6cf96e71007de14d4d109010cea.tar.bz2
eatnumber1-259bd75b39a0b6cf96e71007de14d4d109010cea.zip
Add bsnes-0.058
Diffstat (limited to 'games-emulation/bsnes')
-rw-r--r--games-emulation/bsnes/Manifest3
-rw-r--r--games-emulation/bsnes/bsnes-0.058.ebuild82
-rw-r--r--games-emulation/bsnes/files/bsnes-0.058_gentoo.patch34
3 files changed, 119 insertions, 0 deletions
diff --git a/games-emulation/bsnes/Manifest b/games-emulation/bsnes/Manifest
new file mode 100644
index 0000000..bfbe30c
--- /dev/null
+++ b/games-emulation/bsnes/Manifest
@@ -0,0 +1,3 @@
+EBUILD bsnes-0.058.ebuild 1974 RMD160 e801048ed304b0fb81506f7c9165bc2d88d28648 SHA1 527a211eb956be0e9170225c56603494187c0d1a SHA256 98c6f4217753fe69e37821fd1010632d831cf7e0a79e6df385763f28f8616c88
+AUX bsnes-0.058_gentoo.patch 930 RMD160 66bf30b179accdf842294369db290eeb1d973aee SHA1 551d35a75a7e59941fb7569385c04fd1cd193249 SHA256 78fff536958fd2ae40724dad107cfe1c3dc04af062179b4bb2eb071add0b7d6e
+DIST bsnes_v058.tar.bz2 450201 RMD160 40eac219f7b298356088b14aadbc46e412c9b1b5 SHA1 366826f188d66165aa3965da21ea4ce74ca9072f SHA256 448ec9170628deca66bf3b9260441489418f695f13f2e78b184bed100c11c93e
diff --git a/games-emulation/bsnes/bsnes-0.058.ebuild b/games-emulation/bsnes/bsnes-0.058.ebuild
new file mode 100644
index 0000000..0df0d7c
--- /dev/null
+++ b/games-emulation/bsnes/bsnes-0.058.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils confutils games toolchain-funcs
+
+DESCRIPTION="A Super Famicom/SNES emulator written with absolute accuracy in mind"
+HOMEPAGE="http://byuu.org/bsnes/"
+MY_PV="${PV/0./}"
+SRC_URI="http://byuu.org/files/${PN}_v${MY_PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ao alsa debug openal opengl oss pulseaudio sdl sgb snesfilter +snesreader xv"
+
+DEPEND="ao? ( media-libs/libao )
+ openal? ( media-libs/openal )
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )
+ xv? ( x11-libs/libXv )
+ opengl? ( virtual/opengl )
+ sdl? ( media-libs/libsdl[joystick] )
+ snesfilter? ( >=dev-games/snesfilter-0.006 )
+ >=x11-libs/qt-gui-4.4
+ snesreader? ( >=dev-games/snesreader-0.010 )
+ sgb? ( >=dev-games/supergameboy-0.014 )
+ x11-libs/libX11
+ x11-libs/libXext"
+
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/src
+
+disable_module() {
+ sed -i Makefile -e "s|$1||"
+}
+
+pkg_setup() {
+ confutils_require_any ao openal alsa pulseaudio oss
+ confutils_require_any xv opengl sdl
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}_gentoo.patch
+
+ if use debug
+ then
+ einfo "Enabling debugger..."
+ sed -e "s://\(#define DEBUGGER\):\\1:" -i "base.hpp" \
+ || die "sed failed"
+ fi
+}
+
+src_compile() {
+ # audio modules
+ use ao || disable_module audio.ao
+ use openal || disable_module audio.openal
+ use pulseaudio || disable_module audio.pulseaudio
+ use oss || disable_module audio.oss
+ use alsa || disable_module audio.alsa
+
+ # video modules
+ use opengl || disable_module video.glx
+ use xv || disable_module video.xv
+ use sdl || disable_module video.sdl
+
+ # input modules
+ use sdl || disable_module input.sdl
+
+ emake platform=x compiler="$(tc-getCC)" cpp="$(tc-getCXX)" || die "emake failed"
+}
+
+src_install() {
+ dogamesbin ../${PN} || die "failed bin"
+ doicon data/${PN}.png || die "failed icon"
+ make_desktop_entry ${PN}
+
+ prepgamesdirs
+}
diff --git a/games-emulation/bsnes/files/bsnes-0.058_gentoo.patch b/games-emulation/bsnes/files/bsnes-0.058_gentoo.patch
new file mode 100644
index 0000000..c621c8d
--- /dev/null
+++ b/games-emulation/bsnes/files/bsnes-0.058_gentoo.patch
@@ -0,0 +1,34 @@
+diff -ur a/Makefile b/Makefile
+--- a/Makefile 2010-01-01 17:04:05.082926765 -0500
++++ b/Makefile 2010-01-01 17:17:27.232927324 -0500
+@@ -7,9 +7,10 @@
+ ################
+
+ c := $(compiler)
+-cpp := $(subst cc,++,$(compiler))
+-flags := -O3 -fomit-frame-pointer -Ilib
+-link :=
++cpp ?= $(subst cc,++,$(compiler))
++flags := $(CXXFLAGS) -Ilib
++cflags := $(CFLAGS) -Ilib
++link := $(LDFLAGS)
+
+ # profile-guided instrumentation:
+ # flags += -fprofile-generate
+@@ -24,6 +25,7 @@
+
+ ifeq ($(platform),x)
+ link += -s
++ link += -ldl `pkg-config --libs x11 xext`
+
+ ruby := video.glx video.xv video.qtraster video.sdl
+ ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.ao
+@@ -90,7 +92,7 @@
+ compile = \
+ $(strip \
+ $(if $(filter %.c,$<), \
+- $(c) $(flags) $1 -c $< -o $@, \
++ $(c) $(cflags) $1 -c $< -o $@, \
+ $(if $(filter %.cpp,$<), \
+ $(cpp) $(flags) $1 -c $< -o $@ \
+ ) \