archrelease: copy trunk to community-any
[ArchLinux/community.git] / rocthrust / trunk / PKGBUILD
blob5f4075344c7f948cb73b491202afc9c0713e2a0d
1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contributor: Markus Näther <naetherm@informatik.uni-freiburg.de>
3 pkgname=rocthrust
4 pkgver=5.5.0
5 pkgrel=1
6 pkgdesc='Port of the Thrust parallel algorithm library atop HIP/ROCm'
7 arch=('x86_64')
8 url='https://docs.amd.com/bundle/rocTHRUST_API_Guide/page/index.html'
9 license=('Apache')
10 depends=('hip' 'rocprim')
11 makedepends=('rocm-cmake')
12 _git='https://github.com/ROCmSoftwarePlatform/rocThrust'
13 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
14 sha256sums=('c031f71cd4b6eaf98664fd2ad50fc18f7ccbfa67be415dca425169d2d1c81e9e')
15 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
17 build() {
18   # -fcf-protection is not supported by HIP, see
19   # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
20   CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
21   cmake \
22     -Wno-dev \
23     -S "$_dirname" \
24     -B build \
25     -DCMAKE_BUILD_TYPE=None \
26     -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
27     -DCMAKE_INSTALL_PREFIX=/opt/rocm \
28     -Damd_comgr_DIR=/opt/rocm/lib/cmake/amd_comgr
29   cmake --build build
32 package() {
33   DESTDIR="$pkgdir" cmake --install build