1 # Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
3 # Fool AUR since it doesn't support split PKGBUILDS (shamelessly stolen from kernel26-git PKGBUILD).
4 (( 1 )) && pkgname=('bsnes' 'snespurify')
7 pkgdesc="Super Nintendo Entertainment System (SNES) emulator focused on accuracy."
9 url="http://byuu.org/bsnes/"
11 depends=('libao' 'libgl' 'libxv' 'openal' 'sdl' 'qt>=4.7.0')
12 makedepends=('pkgconfig' 'mesa')
13 source=('http://bsnes.googlecode.com/files/bsnes_v085-source.tar.bz2' 'add-usr-share-fallback.patch')
14 md5sums=('2419710087ba28c894e5aa1c3c41b6e7' '032e01298f3034ad621522e771fd9fa9')
16 # Build the accuracy profile (you can also choose 'performance' or 'compatibility')
20 cd "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}"
24 sed -e 's|audio.pulseaudio ||' \
25 -e 's|audio.pulseaudiosimple ||' \
27 # Don't copy the cheat file.
28 sed -e '/mkdir -p ~\/.config\/$(name)/{d}' \
29 -e '/cp data\/cheats.xml/{N;d}' \
32 # Apply patch to make bsnes look in /usr/share/bsnes for filters/shaders.
33 patch -p0 < "${srcdir}/add-usr-share-fallback.patch"
35 # Fix building with QT 4.8.0.
36 moc -i -Iphoenix/qt/ -o phoenix/qt/platform.moc phoenix/qt/platform.moc.hpp
39 make flags="$CXXFLAGS -I. -DPROFILE_${__profile^^}" compiler=gcc platform=x profile=${__profile} phoenix=qt
41 # Compile the filters.
42 cd "${srcdir}/${pkgname}_v${pkgver}-source/snesfilter"
43 make compiler=gcc platform=x
46 cd "${srcdir}/${pkgname}_v${pkgver}-source/snespurify"
47 sed -e 's|g++-4.5|g++|' -i cc-gtk.sh
51 package_snespurify() {
54 pkgdesc='Utility to clean game files so they are compatible with bsnes.'
57 cd "${srcdir}/bsnes_v085-source/${pkgname}"
58 install -D --mode 755 snespurify-gtk "${pkgdir}/usr/bin/snespurify-gtk"
64 pkgdesc="Super Nintendo Entertainment System (SNES) emulator focused on accuracy."
65 changelog='bsnes.changelog'
66 depends=('libao' 'libgl' 'libxv' 'openal' 'sdl' 'qt>=4.7.0')
68 cd "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}"
69 make install profile=${__profile} DESTDIR="${pkgdir}" prefix=/usr
71 # Install the filters/shaders
72 install --directory "${pkgdir}/usr/share/${pkgname}/filters"
73 install -D --mode=644 "${srcdir}/${pkgname}_v${pkgver}-source"/snesfilter/out/*.filter "${pkgdir}/usr/share/${pkgname}/filters"
74 install --directory "${pkgdir}/usr/share/${pkgname}/shaders"
75 install -D --mode=644 "${srcdir}/${pkgname}_v${pkgver}-source"/snesshader/*.shader "${pkgdir}/usr/share/${pkgname}/shaders"