blob: 04c61bc30bee0b171a0a9046e9b52876f4907896 (
plain)
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
|
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
# Split-package support hack for AUR.
pkgname='bsnes'
true && pkgbase='bsnes'
true && pkgname=('bsnes' 'bsnes-purify')
pkgver=090
pkgrel=2
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.8.0')
makedepends=('pkgconfig' 'mesa')
install='bsnes.install'
changelog='bsnes.changelog'
source=('http://bsnes.googlecode.com/files/bsnes_v090-source.tar.xz')
md5sums=('c9642dae4255f5c6022b2217d64d3bc5')
__base_path="${srcdir}/${pkgbase}_v${pkgver}-source"
# Build the accuracy profile (you can also choose 'performance' or 'compatibility').
__profile='accuracy'
build() {
cd "${__base_path}/${pkgname}"
# Makefile hacks:
# Disable pulseaudio.
sed -e 's|audio.pulseaudio ||' \
-e 's|audio.pulseaudiosimple ||' \
-i 'target-ethos/Makefile'
# Don't copy the cheat file.
sed -e '/mkdir -p ~\/.config\/$(name)/{N;d}' \
-e '/cp data\/cheats.xml/{N;d}' \
-i 'target-ethos/Makefile'
# Don't use sudo
sed -e 's/sudo install/install/' \
-i 'target-ethos/Makefile'
# 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 target=ethos
# Compile purify.
cd "${__base_path}/purify"
moc -i -Iphoenix/qt/ -o phoenix/qt/platform.moc phoenix/qt/platform.moc.hpp
sed -e 's|link := -s|link := -s -lX11|' -i 'Makefile'
make compiler=gcc platform=x phoenix=qt
}
package_bsnes-purify() {
pkgver=01
pkgdesc='ROM cleanup utility for bsnes.'
install=''
cd "${__base_path}/purify"
install --directory "${pkgdir}/usr/bin"
install --mode=755 "${__base_path}/purify/purify" "${pkgdir}/usr/bin/${pkgbase}-purify"
}
package_bsnes() {
pkgver=090
pkgrel=2
pkgdesc='Super Nintendo Entertainment System (SNES) emulator focused on accuracy.'
url='http://byuu.org/bsnes/'
cd "${__base_path}/${pkgname}"
make install profile=${__profile} DESTDIR="${pkgdir}" prefix=/usr
# Install the user-profile into /usr/share/bsnes/profile.
install --directory "${pkgdir}/usr/share/${pkgname}/profile"
cp -R "${__base_path}/${pkgname}"/profile/* "${pkgdir}/usr/share/${pkgname}/profile"
}
|