1 # Maintainer: Torsten Keßler <tpkessler at archlinux dot org>
2 # Contributor: Jakub Okoński <jakub@okonski.org>
3 # Contributor: Markus Näther <naetherm@cs.uni-freiburg.de>
7 pkgdesc='Next generation FFT implementation for ROCm'
9 url='https://rocfft.readthedocs.io/en/latest/library.html'
11 depends=('hip' 'python')
12 makedepends=('rocm-cmake')
13 _git='https://github.com/ROCmSoftwarePlatform/rocFFT'
14 source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
15 sha256sums=('9288152e66504b06082e4eed8cdb791b4f9ae2836b3defbeb4d2b54901b96485')
17 _dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
20 # Compile source code for supported GPU archs in parallel
21 export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
22 export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
23 # -fcf-protection is not supported by HIP, see
24 # https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.5/page/Compiler_Options_and_Features.html#d2e2018
25 CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
30 -DCMAKE_BUILD_TYPE=None \
31 -DCMAKE_CXX_COMPILER=/opt/rocm/bin/hipcc \
32 -DCMAKE_INSTALL_PREFIX=/opt/rocm
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/rocfft.conf"
42 install -Dm644 "$srcdir/$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"