summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornaetherm2019-06-12 17:25:36 +0200
committernaetherm2019-06-12 17:25:36 +0200
commit3a3dbc4cb111415729e1cc15f49a3a8619c94083 (patch)
treee1308cc9fcec394970a291f1ae7e3ca88ffbe380
downloadaur-3a3dbc4cb111415729e1cc15f49a3a8619c94083.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD46
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..51bf3eccfb00
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = rocthrust
+ pkgdesc = Port of the Thrust parallel algorithm library atop HIP/ROCm.
+ pkgver = 2.5.0
+ pkgrel = 1
+ url = https://github.com/ROCmSoftwarePlatform/rocThrust
+ arch = x86_64
+ license = NCSAOSL
+ makedepends = git
+ makedepends = cmake
+ makedepends = gcc
+ makedepends = ninja
+ makedepends = hcc
+ makedepends = python2
+ makedepends = rocminfo
+ depends = hcc
+ depends = hip
+ source = https://github.com/ROCmSoftwarePlatform/rocThrust/archive/2.5.0.tar.gz
+ sha256sums = b559d6c767dae7c13b3bdca0dca1689e308e79f391bb68437fb36598ea65f028
+
+pkgname = rocthrust
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0c50bef4a8c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Markus Näther <naetherm@informatik.uni-freiburg.de>
+pkgname=rocthrust
+pkgver=2.5.0
+pkgrel=1
+pkgdesc="Port of the Thrust parallel algorithm library atop HIP/ROCm."
+arch=('x86_64')
+url="https://github.com/ROCmSoftwarePlatform/rocThrust"
+license=('NCSAOSL')
+depends=(hcc hip)
+makedepends=(git cmake gcc ninja hcc python2 rocminfo)
+srcver="2.5.0"
+source=("https://github.com/ROCmSoftwarePlatform/rocThrust/archive/$srcver.tar.gz")
+sha256sums=("b559d6c767dae7c13b3bdca0dca1689e308e79f391bb68437fb36598ea65f028")
+
+build() {
+ mkdir -p "$srcdir/build"
+ cd "$srcdir/build"
+
+ # Tensile library needs python to be python2
+ export PATH="$srcdir:$PATH"
+ [[ -e "$srcdir/python" ]] || ln -s /usr/bin/python2 "$srcdir/python"
+
+ # fix broken build with stack protection
+ export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-protector-strong//')
+ export CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-protector-strong//')
+ export CPPFLAGS=$(echo $CPPFLAGS | sed -e 's/-fstack-protector-strong//')
+
+ # compile with HCC
+ export CXX=/opt/rocm/hcc/bin/hcc
+
+ # TODO: fix librocthrust.so, it contains references to $srcdir
+ cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm/rocthrust" \
+ -G Ninja \
+ "$srcdir/rocThrust-$srcver"
+ ninja
+}
+
+package() {
+ ninja -C "$srcdir/build" install
+
+ mkdir -p $pkgdir/etc/ld.so.conf.d
+ cat <<-EOF > $pkgdir/etc/ld.so.conf.d/rocthrust.conf
+ /opt/rocm/rocthrust/lib/
+ EOF
+}