From e34f519a15c787fe306d3e46d8d87e0ce414889d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Tue, 7 Aug 2012 23:14:40 -0300 Subject: bsnes-090-2: updating version --- pcr/bsnes/PKGBUILD | 72 ++++++++++++++++++++-------------- pcr/bsnes/add-usr-share-fallback.patch | 24 ------------ pcr/bsnes/bsnes.changelog | 13 ++++++ pcr/bsnes/bsnes.install | 12 ++++-- 4 files changed, 65 insertions(+), 56 deletions(-) delete mode 100644 pcr/bsnes/add-usr-share-fallback.patch diff --git a/pcr/bsnes/PKGBUILD b/pcr/bsnes/PKGBUILD index 34a8031e9..04c61bc30 100644 --- a/pcr/bsnes/PKGBUILD +++ b/pcr/bsnes/PKGBUILD @@ -1,63 +1,77 @@ # Contributor: [vEX] + +# Split-package support hack for AUR. pkgname='bsnes' -pkgver=088 -pkgrel=1 -pkgdesc="Super Nintendo Entertainment System (SNES) emulator focused on accuracy." + +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/" +url='http://byuu.org/bsnes/' license=('GPL3') -depends=('libao' 'libgl' 'libxv' 'openal' 'sdl' 'qt>=4.7.0') +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_v088-source.tar.xz' 'add-usr-share-fallback.patch') -md5sums=('a3b2e9ba28b752768bb9f777049b1239' '8fde2bb14f8dafbd5276f9a6092b7ffb') - +source=('http://bsnes.googlecode.com/files/bsnes_v090-source.tar.xz') +md5sums=('c9642dae4255f5c6022b2217d64d3bc5') -# Build the accuracy profile (you can also choose 'performance' or 'compatibility') +__base_path="${srcdir}/${pkgbase}_v${pkgver}-source" +# Build the accuracy profile (you can also choose 'performance' or 'compatibility'). __profile='accuracy' build() { - cd "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}" + cd "${__base_path}/${pkgname}" # Makefile hacks: # Disable pulseaudio. sed -e 's|audio.pulseaudio ||' \ -e 's|audio.pulseaudiosimple ||' \ - -i 'target-ui/Makefile' + -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-ui/Makefile' + -i 'target-ethos/Makefile' # Don't use sudo sed -e 's/sudo install/install/' \ - -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" + -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 + 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='' - # Compile the filters. - cd "${srcdir}/${pkgname}_v${pkgver}-source/snesfilter" - make compiler=gcc platform=x + cd "${__base_path}/purify" + install --directory "${pkgdir}/usr/bin" + install --mode=755 "${__base_path}/purify/purify" "${pkgdir}/usr/bin/${pkgbase}-purify" } -package() { - cd "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}" - make install profile=${__profile} DESTDIR="${pkgdir}" prefix=/usr +package_bsnes() { + pkgver=090 + pkgrel=2 + pkgdesc='Super Nintendo Entertainment System (SNES) emulator focused on accuracy.' + url='http://byuu.org/bsnes/' - # 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" + 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 "${srcdir}/${pkgname}_v${pkgver}-source/${pkgname}"/profile/* "${pkgdir}/usr/share/${pkgname}/profile" + cp -R "${__base_path}/${pkgname}"/profile/* "${pkgdir}/usr/share/${pkgname}/profile" } diff --git a/pcr/bsnes/add-usr-share-fallback.patch b/pcr/bsnes/add-usr-share-fallback.patch deleted file mode 100644 index 4d2b5cf3c..000000000 --- a/pcr/bsnes/add-usr-share-fallback.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- target-ui/general/main-window.cpp 2012-02-03 23:33:00.000000000 +0100 -+++ target-ui/general/main-window.cpp 2012-02-13 18:02:04.988109569 +0100 -@@ -331,6 +331,10 @@ - path = { application->userpath, "filters/" }; - files = directory::files(path, "*.filter"); - } -+ if(files.size() == 0) { -+ path = { "/usr/share/bsnes/", "filters/" }; -+ files = directory::files(path, "*.filter"); -+ } - array group; - - settingsVideoFilterList = new RadioItem[files.size()]; -@@ -362,6 +366,10 @@ - path = { application->userpath, "shaders/" }; - files = directory::files(path, { "*.", config->video.driver, ".shader" }); - } -+ if(files.size() == 0) { -+ path = { "/usr/share/bsnes/", "shaders/" }; -+ files = directory::files(path, { "*.", config->video.driver, ".shader" }); -+ } - array group; - - settingsVideoShaderList = new RadioItem[files.size()]; diff --git a/pcr/bsnes/bsnes.changelog b/pcr/bsnes/bsnes.changelog index 589a929d2..9328c9aee 100644 --- a/pcr/bsnes/bsnes.changelog +++ b/pcr/bsnes/bsnes.changelog @@ -1,3 +1,16 @@ +2012-08-07 [vEX] + + * 090-2 : + Make sure to build bsnes purify with QT. + +2012-08-07 [vEX] + + * 090-1 : + New upstream release. + + * add-usr-share-fallback.patch : + Remove patch as filter/shader support has been removed. + 2012-04-24 [vEX] * 088-1 : diff --git a/pcr/bsnes/bsnes.install b/pcr/bsnes/bsnes.install index f18765649..2e40f6bba 100644 --- a/pcr/bsnes/bsnes.install +++ b/pcr/bsnes/bsnes.install @@ -6,7 +6,13 @@ post_install() { ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { - echo 'You should copy the /usr/share/bsnes/profile/ data into your' - echo '~/.config/bsnes/ folder unless you have already done so. It contains' - echo 'files that the emulator needs to function properly.' + echo 'As of 090 bsnes requires a new directory layout for the ROMs. You can' + echo 'use bsnes-purify to create it. You should also copy the ' + echo '/usr/share/bsnes/profile/ data into your ~/.config/bsnes/ folder unless' + echo 'you have already done so. It contains files that the emulator needs to' + echo 'function properly.' + + if [ "$(vercmp $2 090)" -lt 0 ]; then + echo 'The profile data changed with release 090, update your files.' + fi } -- cgit v1.1-4-g5e80