1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
| # Contributor: [wisp558] <wisp558@gmail.com>
pkgname=bsnes-phoenix
pkgver=0.080
pkgrel=1
pkgdesc="Super Nintendo Entertainment System (SNES) emulator focused on accuracy, with a minimalistic GTK based user interface."
arch=('i686' 'x86_64')
url="http://byuu.org/bsnes/"
license=('GPL2' 'LGPL') # The phoenix port doesn't support archived roms.
depends=('libao' 'libgl' 'libxv' 'openal' 'sdl' 'gtk2')
makedepends=('pkgconfig' 'mesa')
replaces=('supergameboy' 'bsnes')
source=("http://bsnes.googlecode.com/files/bsnes_v080-source.tar.bz2"
"gcc_4.6.0_build_fix.patch")
md5sums=('a5697cc0a15cb22e628eea2c74396e88'
'cbafabe538a5360612b412b885e11d2f')
build() {
cd "${srcdir}/bsnes_v080-source/bsnes"
# Build fixes for GCC 4.6.0
patch -p0 < "${srcdir}/gcc_4.6.0_build_fix.patch"
# Makefile hacks
# Disable pulseaudio.
sed -e 's|audio.pulseaudio ||' \
-e 's|audio.pulseaudiosimple ||' \
-i "${srcdir}/bsnes_v080-source/bsnes/ui/Makefile" || return 1
# Don't run gconftool
sed -e 's|gconftool-2 --type bool|#gconftool-2 --type bool|' \
-i "${srcdir}/bsnes_v080-source/bsnes/Makefile" || return 1
# Build the different profiles and install them
for profile in compatibility performance accuracy; do
msg "Building profile: ${profile}"
make clean
make compiler=gcc platform=x profile=${profile} || return 1
make install profile=${profile} DESTDIR=${pkgdir} prefix=/usr || return 1
mv ${pkgdir}/usr/bin/bsnes ${pkgdir}/usr/bin/bsnes-${profile}
done
# The phoenix port has no launcher, so I set a symbolic link of bsnes to point to the compatibility profile.
msg "Linking default profile..."
ln -s ${pkgdir}/usr/bin/bsnes-compatibility ${pkgdir}/usr/bin/bsnes
##
# Now lets build and install the plugins, you can remove any of the below if
# you don't want/need them.
##
# snesfilter :: output filters
##
# msg "Building plugin: snesfilter"
# cd "${srcdir}/snesfilter"
# sed -e 's|\(libsnesfilter.*\) $(DESTDIR)$(prefix)/lib|\1 $(DESTDIR)$(prefix)/lib/\1|' \
# -i "${srcdir}/snesfilter/Makefile" || return 1
# make compiler=gcc || return 1
# make install DESTDIR=${pkgdir} prefix=/usr || return 1
# chmod 644 "${pkgdir}/usr/lib/libsnesfilter.a" || return 1
##
# snesreader :: handle compressed files
##
#msg "Building plugin: snesreader"
#cd "${srcdir}/snesreader"
#sed -e 's|\(libsnesreader.*\) $(DESTDIR)$(prefix)/lib|\1 $(DESTDIR)$(prefix)/lib/\1|' -i "${srcdir}/snesreader/Makefile" || return 1
# make compiler=gcc || return 1
# make install DESTDIR=${pkgdir} prefix=/usr || return 1
# chmod 644 "${pkgdir}/usr/lib/libsnesreader.a" || return 1
# Licenses
# mkdir -p "${pkgdir}/usr/share/licenses/bsnes"
# install -m644 "${srcdir}/snesreader/7z_C/lzma.txt" "${pkgdir}/usr/share/licenses/bsnes/license-7zip.txt"
# install -m644 "${srcdir}/snesreader/unrar/license.txt" "${pkgdir}/usr/share/licenses/bsnes/license-unrar.txt"
##
msg "Building snespurify"
cd "${srcdir}/bsnes_v080-source/snespurify"
sed -e 's|g++-4.5|g++|' -i ./cc-gtk.sh
sh ./cc-gtk.sh
install -m755 "${srcdir}/bsnes_v080-source/snespurify/snespurify-gtk" "${pkgdir}/usr/bin/snespurify-gtk"
}
|