aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-03-24 13:16:16 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2011-03-24 13:16:35 -0500
commit829b420705341c8c319b372cd1ce7c6c5f907eeb (patch)
tree61ba7c823f4371e534c174693aed730f17080064
parent5ea6fbd1ad92a56ab5e2f3188f27c3c1415184e6 (diff)
downloadaports-829b420705341c8c319b372cd1ce7c6c5f907eeb.tar.bz2
aports-829b420705341c8c319b372cd1ce7c6c5f907eeb.tar.xz
testing/bsnes: new aport
-rw-r--r--testing/bsnes/APKBUILD45
-rw-r--r--testing/bsnes/nall-strlcpy.patch31
-rw-r--r--testing/bsnes/no-pulseaudio.patch11
3 files changed, 87 insertions, 0 deletions
diff --git a/testing/bsnes/APKBUILD b/testing/bsnes/APKBUILD
new file mode 100644
index 0000000000..fa80d9f117
--- /dev/null
+++ b/testing/bsnes/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=bsnes
+pkgver=0.77
+_x=${pkgver%.*}
+_y=${pkgver#*.}
+_pkgver="v${_x}${_y}"
+pkgrel=0
+pkgdesc="high accuracy SNES emulator"
+url="http://byuu.org/bsnes/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="qt-dev openal-soft-dev sdl-dev alsa-lib-dev mesa-dev libao-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=
+source="http://bsnes.googlecode.com/files/${pkgname}_${_pkgver}-source.tar.bz2
+ nall-strlcpy.patch
+ no-pulseaudio.patch"
+
+_builddir="${srcdir}/${pkgname}_${_pkgver}-source/bsnes"
+prepare() {
+ local i
+ cd "$_builddir/.."
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make compiler=gcc prefix=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" prefix=/usr install || return 1
+}
+
+md5sums="77cd5f73733060c0c19dfe0f5a33e0b6 bsnes_v077-source.tar.bz2
+d5017142f2cbccac878bbfc799b3445f nall-strlcpy.patch
+07caea846bf49ee6f5deaf999dffbd5f no-pulseaudio.patch"
diff --git a/testing/bsnes/nall-strlcpy.patch b/testing/bsnes/nall-strlcpy.patch
new file mode 100644
index 0000000000..dd4a005a63
--- /dev/null
+++ b/testing/bsnes/nall-strlcpy.patch
@@ -0,0 +1,31 @@
+--- bsnes_v077-source/bsnes/snes/system/serialization.cpp
++++ bsnes_v077-source/bsnes/snes/system/serialization.cpp
+@@ -7,7 +7,7 @@
+ char profile[16], description[512];
+ memset(&profile, 0, sizeof profile);
+ memset(&description, 0, sizeof description);
+- strlcpy(profile, Info::Profile, sizeof profile);
++ nall::strlcpy(profile, Info::Profile, sizeof profile);
+
+ s.integer(signature);
+ s.integer(version);
+--- bsnes_v077-source/bsnes/ui/tools/state-manager.cpp
++++ bsnes_v077-source/bsnes/ui/tools/state-manager.cpp
+@@ -130,7 +130,7 @@
+ string StateManager::slotLoadDescription(unsigned i) {
+ if(slot[i].capacity() == 0) return "(empty)";
+ char text[512];
+- strlcpy(text, (const char*)slot[i].data() + HeaderLength, 512);
++ nall::strlcpy(text, (const char*)slot[i].data() + HeaderLength, 512);
+ return text;
+ }
+
+@@ -138,7 +138,7 @@
+ if(stateList.selected() == false) return;
+ string text = descEdit.text();
+ if(slot[stateList.selection()].capacity() > 0) {
+- strlcpy((char*)slot[stateList.selection()].data() + HeaderLength, (const char*)text, 512);
++ nall::strlcpy((char*)slot[stateList.selection()].data() + HeaderLength, (const char*)text, 512);
+ }
+ refresh();
+ }
diff --git a/testing/bsnes/no-pulseaudio.patch b/testing/bsnes/no-pulseaudio.patch
new file mode 100644
index 0000000000..5a5dea3e1e
--- /dev/null
+++ b/testing/bsnes/no-pulseaudio.patch
@@ -0,0 +1,11 @@
+--- bsnes_v077-source.orig/bsnes/ui/Makefile
++++ bsnes_v077-source/bsnes/ui/Makefile
+@@ -14,7 +14,7 @@
+ link += `pkg-config --libs QtCore QtGui`
+
+ ruby := video.glx video.xv video.sdl
+- ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
++ ruby += audio.alsa audio.openal audio.oss audio.ao
+ ruby += input.sdl input.x
+
+ link += $(if $(findstring audio.openal,$(ruby)),-lopenal)