summaryrefslogtreecommitdiff
path: root/pcr/bsnes/PKGBUILD
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-05-30 12:41:17 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-05-30 12:41:17 -0300
commite68d976a35ac019eaad2d80b2818748211176d5b (patch)
tree716c653396b08e05e12b6acc97d06bb7cb9fd72c /pcr/bsnes/PKGBUILD
parente855f30d427d16dc9b9eada81e48c6acd2400793 (diff)
parent35c8fd0c42370098fe43db71c93aa22b4d41507b (diff)
downloadabslibre-e68d976a35ac019eaad2d80b2818748211176d5b.tar.gz
abslibre-e68d976a35ac019eaad2d80b2818748211176d5b.tar.bz2
abslibre-e68d976a35ac019eaad2d80b2818748211176d5b.zip
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Conflicts: libre/your-freedom/PKGBUILD
Diffstat (limited to 'pcr/bsnes/PKGBUILD')
-rw-r--r--pcr/bsnes/PKGBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/pcr/bsnes/PKGBUILD b/pcr/bsnes/PKGBUILD
new file mode 100644
index 000000000..34a8031e9
--- /dev/null
+++ b/pcr/bsnes/PKGBUILD
@@ -0,0 +1,63 @@
+# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
+pkgname='bsnes'
+pkgver=088
+pkgrel=1
+pkgdesc="Super Nintendo Entertainment System (SNES) emulator focused on accuracy."
+arch=('i686' 'x86_64')
+url="http://byuu.org/bsnes/"
+license=('GPL3')
+depends=('libao' 'libgl' 'libxv' 'openal' 'sdl' 'qt>=4.7.0')
+makedepends=('pkgconfig' 'mesa')
+install='bsnes.install'
+changelog='bsnes.changelog'
+source=('http://bsnes.googlecode.com/files/bsnes_v088-source.tar.xz' 'add-usr-share-fallback.patch')
+md5sums=('a3b2e9ba28b752768bb9f777049b1239' '8fde2bb14f8dafbd5276f9a6092b7ffb')
+
+
+# Build the accuracy profile (you can also choose 'performance' or 'compatibility')
+__profile='accuracy'
+
+build() {
+ cd "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}"
+
+ # Makefile hacks:
+ # Disable pulseaudio.
+ sed -e 's|audio.pulseaudio ||' \
+ -e 's|audio.pulseaudiosimple ||' \
+ -i 'target-ui/Makefile'
+ # Don't copy the cheat file.
+ sed -e '/mkdir -p ~\/.config\/$(name)/{N;d}' \
+ -e '/cp data\/cheats.xml/{N;d}' \
+ -i 'target-ui/Makefile'
+ # Don't use sudo
+ sed -e 's/sudo install/install/' \
+ -i 'target-ui/Makefile'
+
+ # Apply patch to make bsnes look in /usr/share/bsnes for filters/shaders.
+ patch -p0 < "${srcdir}/add-usr-share-fallback.patch"
+
+ # Fix building with QT >= 4.8.0.
+ moc -i -Iphoenix/qt/ -o phoenix/qt/platform.moc phoenix/qt/platform.moc.hpp
+
+ # Compile bsnes.
+ make flags="$CXXFLAGS -I. -DPROFILE_${__profile^^}" compiler=gcc platform=x profile=${__profile} phoenix=qt
+
+ # Compile the filters.
+ cd "${srcdir}/${pkgname}_v${pkgver}-source/snesfilter"
+ make compiler=gcc platform=x
+}
+
+package() {
+ cd "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}"
+ make install profile=${__profile} DESTDIR="${pkgdir}" prefix=/usr
+
+ # Install the filters/shaders
+ install --directory "${pkgdir}/usr/share/${pkgname}/filters"
+ install -D --mode=644 "${srcdir}/${pkgname}_v${pkgver}-source"/snesfilter/out/*.filter "${pkgdir}/usr/share/${pkgname}/filters"
+ install --directory "${pkgdir}/usr/share/${pkgname}/shaders"
+ install -D --mode=644 "${srcdir}/${pkgname}_v${pkgver}-source"/snesshader/*.shader "${pkgdir}/usr/share/${pkgname}/shaders"
+
+ # Install the user-profile into /usr/share/bsnes/profile.
+ install --directory "${pkgdir}/usr/share/${pkgname}/profile"
+ cp -R "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}"/profile/* "${pkgdir}/usr/share/${pkgname}/profile"
+}