forked from rocm-arch/rocm-arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
40 lines (36 loc) · 1.29 KB
/
PKGBUILD
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
# Maintainer Torsten Keßler <t dot kessler at posteo dot de>
pkgname=hipfft
pkgver=5.2.1
pkgrel=1
pkgdesc='rocFFT marshalling library.'
arch=('x86_64')
url='https://hipfft.readthedocs.io/en/latest/'
license=('MIT')
depends=('hip' 'rocfft')
makedepends=('cmake' 'git')
_git='https://github.com/ROCmSoftwarePlatform/hipFFT'
source=("$pkgname-$pkgver.tar.gz::$_git/archive/rocm-$pkgver.tar.gz")
sha256sums=('6c8fbace2864ca992b2fca9dc8d0bb4488aef62045acdfcf249d53dd005ebd35')
_dirname="$(basename "$_git")-$(basename "${source[0]}" ".tar.gz")"
build() {
local cmake_args=(-DCMAKE_INSTALL_PREFIX=/opt/rocm
-DBUILD_CLIENTS_SAMPLES=OFF
-DBUILD_CLIENTS_TESTS=OFF)
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
CXX=/opt/rocm/bin/hipcc \
CXXFLAGS="${CXXFLAGS} -fcf-protection=none" \
cmake -Wno-dev -S "$_dirname" \
"${cmake_args[@]}"
make
}
package() {
DESTDIR="$pkgdir" make install
install -Dm644 /dev/stdin "$pkgdir/etc/ld.so.conf.d/hipfft.conf" << EOF
/opt/rocm/hipfft/lib
EOF
install -Dm644 "$srcdir/$_dirname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}