1 # Maintainer : Alucryd <alucryd at gmail dot com>
2 # Thx vEX for the Qt 4.8.0 fix
6 pkgdesc="SNES emulator focused on accuracy, debugging functionality, and clean code. Includes snespurify, bps, filters, shaders and cheats database."
8 url="http://byuu.org/bsnes/"
10 depends=('gtk2' 'qt>=4.7.0' 'pulseaudio' 'libao' 'libgl' 'libxv' 'openal' 'sdl')
12 source=('http://bsnes.googlecode.com/files/bsnes_v085-source.tar.bz2' 'http://byuu.org/files/bps_v03.tar.bz2')
13 md5sums=('2419710087ba28c894e5aa1c3c41b6e7' '65c425a5843556bef6f333c4084af8c6')
14 provides=('bsnes' 'snespurify' 'bps')
15 conflicts=('bsnes' 'snesfilter')
19 cd "${srcdir}/bsnes_v$pkgver-source/bsnes/ui/general"
20 sed -i 's/application->basepath/"\/usr\/share\/bsnes\/"/g' main-window.cpp
23 cd "${srcdir}/bsnes_v$pkgver-source/bsnes/ui/tools"
24 sed -i 's/application->path("cheats.xml")/"\/usr\/share\/bsnes\/cheats.xml"/g' cheat-database.cpp
27 cd "${srcdir}/bsnes_v$pkgver-source/bsnes"
28 msg "Please select a version"
29 select bp in "Accuracy (Slower)" "Compatibility" "Performance (Faster)"; do
31 "Accuracy (Slower)" ) msg "Building the accuracy version..."; break;;
32 "Compatibility" ) sed -i 's/accuracy/compatibility/g' Makefile && msg "Building the compatibility version..."; break;;
33 "Performance (Faster)" ) sed -i 's/accuracy/performance/g' Makefile && msg "Building the performance version..."; break;;
38 cd "${srcdir}/bsnes_v$pkgver-source/bsnes"
39 msg "Please select your preferred interface"
40 select pi in "GTK" "Qt"; do
42 "GTK" ) msg "Building the GTK interface..." && make compiler=gcc platform=x phoenix=gtk; break;;
43 "Qt" ) moc -i -Iphoenix/qt/ -o phoenix/qt/platform.moc phoenix/qt/platform.moc.hpp && msg "Building the Qt interface..." && make compiler=gcc platform=x phoenix=qt; break;;
48 cd "${srcdir}/bsnes_v$pkgver-source/snespurify"
49 sed -e 's|g++-4.5|g++|' -i cc-gtk.sh
53 cd "${srcdir}/bsnes_v$pkgver-source/snesfilter"
58 sed -e 's|g++-4.5|g++|' -i cc-gtk.sh
63 cd "${srcdir}/bsnes_v$pkgver-source/bsnes"
64 sed -i 's/~\/.config/$(DESTDIR)$(prefix)\/share/g' ui/Makefile
65 make install DESTDIR="${pkgdir}" prefix=/usr
67 cd "${srcdir}/bsnes_v$pkgver-source/snespurify"
68 install -Dm755 snespurify-gtk "${pkgdir}/usr/bin/snespurify-gtk"
70 cd "${srcdir}/bsnes_v$pkgver-source/snesfilter"
71 sed -i 's/~\/.config/$(DESTDIR)$(prefix)\/share/g' Makefile
72 make install DESTDIR="${pkgdir}" prefix=/usr
74 cd "${srcdir}/bsnes_v$pkgver-source/snesshader"
75 sed -i 's/~\/.config/$(DESTDIR)$(prefix)\/share/g' Makefile
76 make install DESTDIR="${pkgdir}" prefix=/usr
79 install -Dm755 bps-gtk "${pkgdir}/usr/bin/bps-gtk"