Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 2nd, 2013  |  syntax: Bash  |  size: 1.41 KB  |  views: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer:     mmm
  2. # Contributer: jellysheep
  3.  
  4. pkgname=gpuocelot-svn
  5. pkgver=2.1.2210
  6. pkgrel=3
  7. pkgdesc="Ocelot emulation allows CUDA programs to be executed on NVIDIA/AMD GPUs and x86-CPUs at full speed
  8. without recompilation"
  9. arch=('i686' 'x86_64')
  10. url="https://code.google.com/p/gpuocelot/"
  11. license=('BSD')
  12. depends=('cuda' 'boost' 'llvm' 'glew')
  13. makedepends=('gcc>=4.5' 'svn' 'scons' 'flex' 'bison' 'mesa' 'python2')
  14. provides=('gpuocelot')
  15. source=('lib_mt_fix.patch' 'ptxgrammar_fix.patch')
  16. md5sums=('93247cceb967ace49d6756922ec2f543'
  17.         'e26c4304a60f1cba3efb7fd3df51e07f')
  18.  
  19. build()
  20. {
  21.   cd $srcdir
  22.  
  23.   msg "Connecting to $pkgname SVN server..."
  24.   mkdir -p $pkgname
  25.   cd $pkgname
  26.   if [[ -d .svn ]]; then
  27.         svn cleanup && svn up
  28.   else svn checkout http://gpuocelot.googlecode.com/svn/trunk/ocelot . || return 1
  29.   fi
  30.   msg "SVN checkout done"
  31.  
  32.   #msg "Downloading llvm-svn header files..."
  33.   #cd $srcdir
  34.   #svn checkout http://llvm.org/svn/llvm-project/llvm/trunk/include/ $pkgname/.release_build/ocelot/
  35.   #msg "Done."
  36.   #cd $pkgname
  37.  
  38.   msg "Starting make..."
  39.   patch -p0 < $srcdir/lib_mt_fix.patch
  40.  
  41.   python2 build.py --install -p$srcdir/build || (  
  42.     msg "resolving error in ptxgrammar.hpp and trying again..."
  43.     patch -p0 < $srcdir/ptxgrammar_fix.patch
  44.     python2 build.py --install -p$srcdir/build
  45.   )
  46.  
  47. }
  48.  
  49. package()
  50. {
  51.   mv $srcdir/build/* $pkgdir/
  52.   rm -r $srcdir/build
  53. }