diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/bsnes/APKBUILD | 45 | ||||
-rw-r--r-- | main/bsnes/nall-strlcpy.patch | 31 | ||||
-rw-r--r-- | main/bsnes/no-pulseaudio.patch | 11 |
3 files changed, 87 insertions, 0 deletions
diff --git a/main/bsnes/APKBUILD b/main/bsnes/APKBUILD new file mode 100644 index 0000000000..49be44f5eb --- /dev/null +++ b/main/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=1 +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 libxv-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 profile=performance || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" prefix=/usr profile=performance install || return 1 +} + +md5sums="77cd5f73733060c0c19dfe0f5a33e0b6 bsnes_v077-source.tar.bz2 +d5017142f2cbccac878bbfc799b3445f nall-strlcpy.patch +07caea846bf49ee6f5deaf999dffbd5f no-pulseaudio.patch" diff --git a/main/bsnes/nall-strlcpy.patch b/main/bsnes/nall-strlcpy.patch new file mode 100644 index 0000000000..dd4a005a63 --- /dev/null +++ b/main/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/main/bsnes/no-pulseaudio.patch b/main/bsnes/no-pulseaudio.patch new file mode 100644 index 0000000000..5a5dea3e1e --- /dev/null +++ b/main/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) |