summaryrefslogtreecommitdiff
path: root/community/cuda-sdk/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/cuda-sdk/PKGBUILD')
-rw-r--r--community/cuda-sdk/PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/community/cuda-sdk/PKGBUILD b/community/cuda-sdk/PKGBUILD
new file mode 100644
index 000000000..152b3add9
--- /dev/null
+++ b/community/cuda-sdk/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Thomas Jost <schnouki@schnouki.net>
+# Contributor: Carson Reynolds <carson@k2.t.u-tokyo.ac.jp>
+
+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"
+}