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 "rocsparse-no-git.patch")
15 sha256sums=('9fb633f235eb0567cc54fae6bdc779f16bf0bb4e6f5bdddb40312c6d11ca8478'
16 'bc3cda8fb3e3aad14a2130d9cde7a8c521c2c35448ed69f0873111571d654ad2')
18 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
22 patch -Np1 -i "$srcdir/rocsparse-no-git.patch"
26 # -fcf-protection is not supported by HIP, see
27 # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
28 CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
33 -DCMAKE_BUILD_TYPE=None \
34 -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
35 -DCMAKE_INSTALL_PREFIX=/opt/rocm
40 DESTDIR="$pkgdir" cmake --install build
42 echo '/opt/rocm/rocsparse/lib' > "$pkgname.conf"
43 install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
45 install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"