# Maintainer: Sven-Hendrik Haase # Contributor: Thomas Jost # Contributor: Carson Reynolds pkgname=cuda-sdk pkgver=4.2.9 pkgrel=1 pkgdesc="NVIDIA's GPU programming sdk" arch=('i686' 'x86_64') url="http://www.nvidia.com/object/cuda_home.html" license=('custom') depends=('cuda-toolkit' 'nvidia' 'opencl-nvidia' 'freeglut' 'libxmu') makedepends=('perl') source=(http://developer.download.nvidia.com/compute/cuda/4_2/rel/sdk/gpucomputingsdk_${pkgver}_linux.run) md5sums=('693d969aca8bb06a5a1d51ef5c3ca04b') build() { cd "$srcdir" sh gpucomputingsdk_${pkgver}_linux.run --noexec --keep --nox11 --nochown --target sdk >/dev/null cd sdk find . -name *.cu | xargs sed -i "1 i #undef _GLIBCXX_ATOMIC_BUILTINS" find . -name *.cu | xargs sed -i "1 i #undef _GLIBCXX_USE_INT128" #find . -name 'Makefile*' -exec sed -i 's/^\tmake /\t$(MAKE) /g; s/^\t@make /\t@$(MAKE) /g' "{}" + # Sadly we need to install this first and compile afterwards, this is why we only have build() install -dm755 "$pkgdir/opt/cuda-sdk" ./install-sdk-linux.pl --prefix="$pkgdir/opt/cuda-sdk" --cudaprefix="/opt/cuda-toolkit" >/dev/null cd "$pkgdir/opt/cuda-sdk" make CUDA_INSTALL_PATH=/opt/cuda-toolkit NO_MPI=1 # simpleMPI sometimes causes segfaults when building... install -Dm755 "$pkgdir/opt/cuda-sdk/License.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }