1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
3 # Contributor: acxz <akashpatel2008 at yahoo dot com>
8 pkgdesc='rocSPARSE marshalling library.'
10 url='https://hipsparse.readthedocs.io/en/latest/'
12 depends=('hip' 'rocsparse')
13 makedepends=('rocm-cmake' 'gcc-fortran')
14 _git='https://github.com/ROCmSoftwarePlatform/hipSPARSE'
15 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz"
16 "hipsparse-no-git.patch")
17 sha256sums=('b373eccd03679a13fab4e740fc780da25cbd598abca3a1e5e3613ae14954f9db'
18 '0f4ca37b246e9908ebb3a80818abb28b4c6996036b65f8f89be9affc854efa7f')
20 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
24 patch -Np1 -i "$srcdir/hipsparse-no-git.patch"
28 # -fcf-protection is not supported by HIP, see
29 # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
30 CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
36 -DCMAKE_BUILD_TYPE=None \
37 -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
38 -DCMAKE_INSTALL_PREFIX=/opt/rocm
43 DESTDIR="$pkgdir" cmake --install build
45 echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
46 install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
48 install -Dm644 "$srcdir/$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"