upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / rocsparse / repos / community-x86_64 / PKGBUILD
blobfcfda90f2106c70ad24602618d3f5a1fbeb0d963
1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
3 pkgname=rocsparse
4 pkgver=5.4.3
5 pkgrel=1
6 pkgdesc='BLAS for sparse computation on top of ROCm'
7 arch=('x86_64')
8 url='https://rocsparse.readthedocs.io/en/master/'
9 license=('MIT')
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')
17 options=(!lto)
18 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
20 prepare() {
21     cd "$_dirname"
22     patch -Np1 -i "$srcdir/rocsparse-no-git.patch"
25 build() {
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" \
29   cmake \
30     -Wno-dev \
31     -B build \
32     -S "$_dirname" \
33     -DCMAKE_BUILD_TYPE=None \
34     -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
35     -DCMAKE_INSTALL_PREFIX=/opt/rocm
36   cmake --build build
39 package() {
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"