desktop/bsnes/PKGBUILD

60 lines
2.1 KiB
Bash

# Apps Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
pkgname='bsnes'
pkgver=087
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=('pkg-config' 'mesa' 'libpulse')
categories=('games')
source=("http://bsnes.googlecode.com/files/bsnes_v${pkgver}-source.tar.bz2" 'add-usr-share-fallback.patch')
md5sums=('e2a7b33d47ecdb015e01fdad5835a71d'
'730ca5572ed2ea5c0a2d0c09a48ba195')
# 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)/{d}' \
-e '/cp data\/cheats.xml/{N;d}' \
-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 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"
}