Commit 829b4207 authored by Ariadne Conill's avatar Ariadne Conill

testing/bsnes: new aport

parent 5ea6fbd1
# 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"
--- 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();
}
--- 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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment