-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
# Maintainer: Torsten Keßler <t dot kessler at posteo dot de>
# Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
pkgname=rocprim
pkgver=4.5.0
pkgrel=1
pkgdesc='Header-only library providing HIP parallel primitives'
arch=('x86_64')
url="https://github.com/ROCmSoftwarePlatform/rocPRIM"
license=('MIT')
depends=('hip')
makedepends=('cmake' 'git')
source=("$pkgname-$pkgver.tar.gz::$url/archive/rocm-$pkgver.tar.gz")
sha256sums=('6f0ca1da9a93064af662d6c61fbdb56bb313f8edca85615ead0dd284eb481089')
_dirname="$(basename "$url")-$(basename "${source[0]}" ".tar.gz")"
build() {
# -fcf-protection is not supported by HIP, see
# https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-4.5.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 -Wno-dev -S "$_dirname" \
-D__skip_rocmclang=ON \
-DCMAKE_INSTALL_PREFIX=/opt/rocm \
-Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr \
-DBUILD_TEST=OFF \
-DBUILD_BENCHMARK=OFF
}
package() {
DESTDIR="$pkgdir" make install
install -Dm644 "$_dirname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}