summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorsten Keßler2020-05-09 07:52:50 +0200
committerGitHub2020-05-09 05:52:50 +0000
commit9fb7fd5479a701369802ccd1dccd063572daa6ea (patch)
tree58a7e2f65a71414e2093cdcd861588ceb3685f8d
parentf0473bacaa2c61be52f94e0a0489fd22fddd6995 (diff)
downloadaur-9fb7fd5479a701369802ccd1dccd063572daa6ea.tar.gz
[hipcub] Successful build in clean chroot (#143)
* [hipcub] Successful build in clean chroot hipcub is a header-only library, there's no libhipcub.so. Install license file, update dependencies, add optional dependency. Co-authored-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD41
2 files changed, 18 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 23d75d856a4f..43021befcceb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,15 @@
pkgbase = hipcub
- pkgdesc = Reusable software components for the rocm developers.
+ pkgdesc = Header-only library on top of rocPRIM or CUB
pkgver = 3.3.0
pkgrel = 2
url = https://github.com/ROCmSoftwarePlatform/hipCUB
arch = x86_64
- license = custom:NCSAOSL
+ license = custom
makedepends = cmake
- makedepends = python2
- makedepends = rocminfo
- makedepends = comgr
- depends = hcc
- depends = hip
+ makedepends = git
+ makedepends = hcc
+ depends = rocprim
+ optdepends = cuda: CUB backend
source = https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-3.3.0.tar.gz
sha256sums = 0d97cada3b856e8c62affbb3664ac4fc2415a36ad3d9b9d7155b5f954e492392
diff --git a/PKGBUILD b/PKGBUILD
index cac4acca9b36..661056a8f600 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,46 +2,29 @@
pkgname=hipcub
pkgver=3.3.0
pkgrel=2
-pkgdesc="Reusable software components for the rocm developers."
+pkgdesc='Header-only library on top of rocPRIM or CUB'
arch=('x86_64')
-url="https://github.com/ROCmSoftwarePlatform/hipCUB"
-license=('custom:NCSAOSL')
-depends=('hcc' 'hip')
-makedepends=('cmake' 'python2' 'rocminfo' 'comgr')
-source=("https://github.com/ROCmSoftwarePlatform/hipCUB/archive/rocm-$pkgver.tar.gz")
+url='https://rocmdocs.amd.com/en/latest/ROCm_Libraries/ROCm_Libraries.html#hipcub'
+license=('custom')
+depends=('rocprim')
+optdepends=('cuda: CUB backend')
+makedepends=('cmake' 'git' 'hcc')
+source=("$url/archive/rocm-$pkgver.tar.gz")
sha256sums=('0d97cada3b856e8c62affbb3664ac4fc2415a36ad3d9b9d7155b5f954e492392')
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 CFLAGS="$(sed -e 's/-fstack-protector-strong//' <<< "$CFLAGS")"
- export CXXFLAGS="$(sed -e 's/-fstack-protector-strong//' <<< "$CXXFLAGS")"
- export CPPFLAGS="$(sed -e 's/-fstack-protector-strong//' <<< "$CPPFLAGS")"
+ mkdir -p build
+ cd build
- # compile with HCC
- export CXX="/opt/rocm/hcc/bin/hcc"
-
- # TODO: fix libhipcub.so, it contains references to $srcdir
- cmake -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/opt/rocm/hipcub \
+ CXX=/opt/rocm/hcc/bin/hcc \
+ cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm/hipcub \
-Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \
"$srcdir/hipCUB-rocm-$pkgver"
- make
}
package() {
cd "$srcdir/build"
make DESTDIR="$pkgdir" install
-
- install -d "$pkgdir/etc/ld.so.conf.d"
- cat << EOF > "$pkgdir/etc/ld.so.conf.d/hipcub.conf"
-/opt/rocm/hipcub/lib
-EOF
+ install -Dm644 "$srcdir/hipCUB-rocm-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}