PKGBUILD 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Maintainer: Andreas Grapentin <andreas@grapentin.org>
  2. # Contributor: André Silva <emulatorman@hyperbola.info>
  3. # Maintainer (arch): Sven-Hendrik Haase <sh@lutzhaase.com>
  4. pkgname=arrayfire
  5. pkgdesc="High performance software library for parallel computing with an easy-to-use API, without nonfree cuda and nvidia-utils support and nonfree SIFT algorithm"
  6. url='http://arrayfire.com'
  7. pkgver=3.5.1
  8. arch=('i686' 'x86_64')
  9. pkgrel=1.parabola1
  10. license=('BSD3')
  11. makedepends=('cmake' 'graphviz' 'doxygen' 'opencl-headers' 'glfw' 'glew' 'boost' 'git' 'python' 'gcc')
  12. depends=('cblas' 'fftw' 'boost-libs' 'lapacke' 'forge' 'freeimage' 'glfw' 'glew')
  13. optdepends=('libclc: Required for using OpenCL backend')
  14. source=(http://arrayfire.com/arrayfire_source/arrayfire-full-${pkgver}.tar.bz2
  15. remove-nonfree-references.patch)
  16. sha256sums=('b6ff2ffc279d4d826d7ebe1fecc6574721cd88354b65eb10df105b20b89b21f0'
  17. '230900b6ccc4886fa0b77bc4447819ecbbd14891ea4ea0b983e5d1f42a24ae5e')
  18. check() {
  19. cd "${srcdir}/arrayfire-full-${pkgver}/build"
  20. # Some tests fail :(
  21. #make test
  22. }
  23. prepare() {
  24. cd "${srcdir}/arrayfire-full-${pkgver}"
  25. # remove nonfree SIFT algorithm that is patented in some countries and have some other limitations on the use
  26. rm -v src/backend/cuda/kernel/sift_nonfree.hpp
  27. rm -v src/backend/opencl/kernel/sift_nonfree.cl
  28. rm -v src/backend/opencl/kernel/sift_nonfree.hpp
  29. rm -v src/backend/cpu/kernel/sift_nonfree.hpp
  30. # remove nonfree reference/recommendation stuff
  31. rm -rv CMakeModules/osx_install
  32. rm -rv src/backend/cuda
  33. rm -rv test/data/sift
  34. rm -v CMakeModules/CUDACheckCompute.cmake
  35. rm -v CMakeModules/cuda_compute_capability.cpp
  36. rm -v assets/CUDA.png
  37. rm -v docs/pages/using_on_osx.md
  38. rm -v docs/pages/using_on_windows.md
  39. rm -v include/af/cuda.h
  40. rm -v src/api/cpp/sift.cpp
  41. rm -v src/api/c/sift.cpp
  42. rm -v src/backend/opencl/sift.cpp
  43. rm -v src/backend/opencl/sift.hpp
  44. rm -v src/backend/cpu/sift.cpp
  45. rm -v src/backend/cpu/sift.hpp
  46. rm -v test/sift_nonfree.cpp
  47. patch -Np1 -i "${srcdir}/remove-nonfree-references.patch"
  48. mkdir build && cd build
  49. cmake .. \
  50. -DCMAKE_INSTALL_PREFIX=/usr \
  51. -DUSE_SYSTEM_FORGE=ON \
  52. -DCOMPUTES_DETECTED_LIST="20;30;32;35;50;52;53" \
  53. -DBUILD_CPU=ON \
  54. -DCMAKE_BUILD_TYPE=Release \
  55. -DBUILD_EXAMPLES=ON \
  56. -DBUILD_DOCS=ON \
  57. -DBUILD_NONFREE=OFF \
  58. -DBUILD_SIFT=OFF \
  59. -DBUILD_CUDA=OFF
  60. make glb-ext
  61. }
  62. build() {
  63. cd "${srcdir}/arrayfire-full-${pkgver}"
  64. cd build
  65. make
  66. }
  67. package() {
  68. cd "${srcdir}/arrayfire-full-${pkgver}"
  69. install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  70. cd build
  71. make DESTDIR="${pkgdir}/" install
  72. }