blob: 4110856e20116a2e1667472f5b14108011c432bb (
plain)
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
37
38
39
40
41
42
|
# Maintainer: Torsten Keßler <t dot kessler at posteo dot de>
# Contributor: Jakub Okoński <jakub@okonski.org>
# Contributor: Markus Näther <naetherm@cs.uni-freiburg.de>
pkgname=rocfft
pkgver=5.2.3
pkgrel=1
pkgdesc='Next generation FFT implementation for ROCm'
arch=('x86_64')
url='https://docs.amd.com/bundle/rocFFT-release-rocm-rel-5.2/page/library.html'
license=('MIT')
depends=('hip')
makedepends=('cmake')
_git='https://github.com/ROCmSoftwarePlatform/rocFFT'
source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
sha256sums=('0cee37886f01f1afb3ae5dad1164c819573c13c6675bff4eb668de334adbff27')
options=(!lto)
_dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
build() {
local cmake_args=(-DCMAKE_INSTALL_PREFIX=/opt/rocm
-DCMAKE_CXX_COMPILER=hipcc)
if [[ -n "$AMDGPU_TARGETS" ]]; then
cmake_args+=(-DAMDGPU_TARGETS="$AMDGPU_TARGETS")
fi
# -fcf-protection is not supported by HIP, see
# https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.2/page/Appendix_A.html
CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
cmake -B build \
-S "$_dirname" \
"${cmake_args[@]}"
make -C build
}
package() {
DESTDIR="$pkgdir" make -C build install
install -Dm644 /dev/stdin "$pkgdir/etc/ld.so.conf.d/rocfft.conf" << EOF
/opt/rocm/rocfft/lib
EOF
install -Dm644 "$srcdir/$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|