# Maintainer: Torsten Keßler # Contributor: Markus Näther pkgname=rocalution pkgver=4.3.0 pkgrel=1 pkgdesc='Next generation library for iterative sparse solvers for ROCm platform' arch=('x86_64') url='https://rocalution.readthedocs.io/en/master' license=('MIT') depends=('hip-rocclr' 'rocsparse' 'rocblas' 'rocprim' 'rocrand' 'openmp') makedepends=('cmake' 'rocm-cmake' 'git') _git='https://github.com/ROCmSoftwarePlatform/rocALUTION' source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz") sha256sums=('f064b96f9f04cf22b89f95f72147fcfef28e2c56ecd764008c060f869c74c144') _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")" build() { # -fcf-protection is not supported by HIP, see # https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-4.3.x/docs/markdown/clang_options.md # With version 3.21, HIP support was added to CMake that breaks the current scripts, see # https://github.com/ROCmSoftwarePlatform/rocRAND/issues/198#issuecomment-893573440 CXX=/opt/rocm/bin/hipcc \ CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \ cmake -B build -Wno-dev \ -S "$_dirname" \ -D__skip_rocmclang=ON \ -DCMAKE_INSTALL_PREFIX=/opt/rocm \ -DROCM_PATH=/opt/rocm \ -DSUPPORT_HIP=ON \ -DSUPPORT_OMP=ON \ -DSUPPORT_MPI=OFF \ -Dhip_DIR=/opt/rocm/hip/lib/cmake/hip \ -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr make -C build } package() { DESTDIR="$pkgdir" make -C build install install -Dm644 /dev/stdin "$pkgdir/etc/ld.so.conf.d/rocalution.conf" << EOF /opt/rocm/rocalution/lib EOF install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }