Want more features on Pastebin? Sign Up, it's FREE!
Guest

higan-git-PKGBUILD

By: a guest on Sep 20th, 2013  |  syntax: C  |  size: 2.29 KB  |  views: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=higan-git
  2. pkgver=093.4e2eb23
  3. pkgrel=1
  4. pkgdesc="A Nintendo multi-system emulator formerly known as bsnes"
  5. arch=('i686' 'x86_64')
  6. url=http://byuu.org/higan/
  7. license=(GPL)
  8. replaces=('bsnes')
  9. conflicts=('higan')
  10. makedepend=('libao')
  11. depends=('openal' 'libgl')
  12. optdepends=('alsa' 'pulseaudio' 'sdl')
  13. source=('higan::git+git://gitorious.org/bsnes/bsnes.git'
  14.         '001-gcc-fix.patch' 'Higan')
  15. install=higan.install
  16. _profiles="accuracy balanced performance"
  17.  
  18. pkgver() {
  19.         cd "higan"
  20.         echo 093.$( git describe --always | sed 's#-#_#g;s#v##' )
  21. }
  22.  
  23. prepare(){
  24.         cd "${srcdir}/higan/nall"
  25.         patch -p0 -i ${srcdir}/001-gcc-fix.patch
  26.         cd "${srcdir}/higan"
  27.         sed -i "s/flags   += -I. -O3 -fomit-frame-pointer/flags   += -I. -fomit-frame-pointer -std=gnu++11/
  28.          s/flags += -march=native/flags += $CXXFLAGS/g" Makefile
  29. }
  30.  
  31. build(){
  32. # libananke
  33.         cd "${srcdir}/higan"
  34.         make compiler=g++ platform=x flags="$CXXFLAGS -I.. -fomit-frame-pointer -std=gnu++11" -C ananke
  35.  
  36. # higan
  37.         cd "${srcdir}/higan"
  38.         make clean
  39.         for _profile in ${_profiles}; do
  40.                 make compiler=g++ platform=x target=ethos profile=${_profile}
  41.                 mv out/higan{,-${_profile}}
  42.         done
  43. }
  44.  
  45. package(){
  46. # Install higan
  47.         cd "${srcdir}/higan"
  48.  
  49. # Common files
  50.         install -dm 755 "${pkgdir}"/usr/{bin,lib,share/{applications,pixmaps,higan/Video\ Shaders}}
  51.         install -m 755 "${srcdir}"/Higan "${pkgdir}"/usr/bin/higan
  52.         install -m 644 "${srcdir}"/higan/data/higan.desktop "${pkgdir}"/usr/share/applications/higan.desktop
  53.         install -m 644 "${srcdir}"/higan/data/higan512.png "${pkgdir}"/usr/share/pixmaps/higan.png
  54.         cp -dr --no-preserve=ownership profile/* data/cheats.bml "${pkgdir}"/usr/share/higan/
  55.         cp -dr --no-preserve=ownership shaders/*.shader "${pkgdir}"/usr/share/higan/Video\ Shaders/
  56.  
  57. # libananke
  58.         install -m 644 "${srcdir}"/higan/ananke/libananke.so "${pkgdir}"/usr/lib/libananke.so.1
  59.         cd "${pkgdir}"/usr/lib/
  60.         ln -s libananke.so.1 libananke.so
  61.  
  62. # higan
  63.         cd "${srcdir}/higan"
  64.         for _profile in ${_profiles}; do
  65.                 install -m 755 {out,"${pkgdir}"/usr/bin}/higan-${_profile}
  66.         done
  67.  
  68. # Fix permissions
  69.         find "${pkgdir}"/usr/share/higan/ -type d -exec chmod 755 {} +
  70.         find "${pkgdir}"/usr/share/higan/ -type f -exec chmod 644 {} +
  71. }
  72.  
  73. md5sums=('SKIP'
  74.          'e61330b0c415531eb95a598c3782138b'
  75.          'bab6f046684cecb0630a088a12c08597')
clone this paste RAW Paste Data