packages/rocprim/PKGBUILD
2025-01-24 14:31:30 +01:00

39 lines
1.3 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
# Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
pkgname=rocprim
pkgver=6.2.4
pkgrel=1
pkgdesc='Header-only library providing HIP parallel primitives'
arch=(any)
url='https://rocm.docs.amd.com/projects/rocPRIM/en/latest/index.html'
_git='https://github.com/ROCm/rocPRIM'
license=('MIT')
depends=('rocm-core' 'hip-runtime-amd')
makedepends=('cmake' 'rocm-cmake')
source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
sha256sums=('c567aa5e3209dd00aefe5052dde8ceb5bcc3a4aeeeb3ad8dc322f8d0791fc07f')
_dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
build() {
# -fcf-protection is not supported by HIP, see
# https://rocm.docs.amd.com/projects/llvm-project/en/latest/reference/rocmcc.html#support-status-of-other-clang-options
local cmake_args=(
-Wno-dev
-S "$_dirname"
-B build
-D CMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc
-D CMAKE_CXX_FLAGS="${CXXFLAGS} -fcf-protection=none"
-D CMAKE_INSTALL_PREFIX=/opt/rocm
-D CMAKE_BUILD_TYPE=None
)
cmake "${cmake_args[@]}"
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -Dm644 "$_dirname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}