summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 36 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4b035a08249a..415553a5b20f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,51 @@
-# Maintainer: Markus Näther <naetherm@informatik.uni-freiburg.de>
+# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
+# Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
pkgname=rocalution
-pkgver=4.0.0
-pkgrel=2
+pkgver=5.4.1
+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' 'git')
+depends=('hip' 'rocsparse' 'rocblas' 'rocprim' 'rocrand' 'openmp')
+makedepends=('rocm-cmake')
_git='https://github.com/ROCmSoftwarePlatform/rocALUTION'
-source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
-sha256sums=('80a224a5c19dea290e6edc0e170c3dff2e726c2b3105d599ec6858cc66f076a9')
+source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz"
+ "$pkgname-remove-git.patch::$_git/commit/773e8be7354bbc961d86810dbb23e6248f6e513b.patch")
+sha256sums=('c11b76ccd89ea65f649fe283eb2fc9056c290e7a06ea234cb88c82dacf6f9608'
+ '9daafee87896ef043b655542f36e078b9a3f3a4a106b69849cfd8add25637cca')
_dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
+prepare() {
+ cd "$_dirname"
+ patch -Np1 -i "$srcdir/$pkgname-remove-git.patch"
+}
+
build() {
- CXX=/opt/rocm/hip/bin/hipcc \
- cmake -B build -Wno-dev \
- -S "$_dirname" \
- -DCMAKE_INSTALL_PREFIX=/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
+ # -fcf-protection is not supported by HIP, see
+ # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
+ CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
+ cmake \
+ -Wno-dev \
+ -B build \
+ -S "$_dirname" \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
+ -DCMAKE_INSTALL_PREFIX=/opt/rocm \
+ -DROCM_PATH=/opt/rocm \
+ -DHIP_ROOT_DIR=/opt/rocm/hip \
+ -DSUPPORT_HIP=ON \
+ -DSUPPORT_OMP=ON \
+ -DSUPPORT_MPI=OFF \
+ -DBUILD_SHARED_LIBS=ON
+ cmake --build build
}
package() {
- DESTDIR="$pkgdir" make -C build install
+ DESTDIR="$pkgdir" cmake --install build
+
+ echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
+ install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/rocalution.conf"
- 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"
}