1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
6 pkgdesc='BLAS for sparse computation on top of ROCm'
8 url='https://rocsparse.readthedocs.io/en/master/'
10 depends=('hip' 'rocprim')
11 makedepends=('rocm-cmake' 'gcc-fortran')
12 _git='https://github.com/ROCmSoftwarePlatform/rocSPARSE'
13 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
14 sha256sums=('cbee79b637691bc710c1c83fbaa91db7498d38d4df873be23e28ed5617acde72')
16 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
19 # -fcf-protection is not supported by HIP, see
20 # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
21 CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
26 -DCMAKE_BUILD_TYPE=None \
27 -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
28 -DCMAKE_INSTALL_PREFIX=/opt/rocm
33 DESTDIR="$pkgdir" cmake --install build
35 echo '/opt/rocm/rocsparse/lib' > "$pkgname.conf"
36 install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
38 install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"