upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / rocsolver / trunk / PKGBUILD
bloba93cc6352047d920f3a6ba472be0a89374373c7a
1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
3 pkgname=rocsolver
4 pkgver=5.5.0
5 pkgrel=1
6 pkgdesc='Subset of LAPACK functionality on the ROCm platform'
7 arch=('x86_64')
8 url='https://rocsolver.readthedocs.io/en/latest/'
9 license=('BSD 2-Clause')
10 depends=('hip' 'rocblas')
11 makedepends=('rocm-cmake' 'python-pyaml' 'fmt')
12 _git='https://github.com/ROCmSoftwarePlatform/rocSOLVER'
13 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
14 sha256sums=('6775aa5b96731208c12c5b450cf218d4c262a80b7ea20c2c3034c448bb2ca4d2')
15 options=(!lto)
16 _dirname="$(basename "$_git")-$(basename "${source[0]}" .tar.gz)"
18 build() {
19     # Compile source code for supported GPU archs in parallel
20     export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
21     export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
22     # -fcf-protection is not supported by HIP, see
23     # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
24     CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
25     cmake \
26       -Wno-dev \
27       -B build \
28       -S "$_dirname" \
29       -DCMAKE_BUILD_TYPE=None \
30       -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
31       -DCMAKE_INSTALL_PREFIX=/opt/rocm \
32       -DROCSOLVER_EMBED_FMT=ON
33     cmake --build build
36 package() {
37     DESTDIR="$pkgdir" cmake --install build
39     echo "/opt/rocm/$pkgname/lib" > "$pkgname.conf"
40     install -Dm644 "$pkgname.conf" "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
42     install -Dm644 "$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"