blob: 99f303a2d2adcb02549b84a02e821d681da980a8 (
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
43
44
45
46
47
48
49
|
# Maintainer: George Hilliard <me@thirtythreeforty.net>
pkgname=chipstar-git
pkgver=chipStarr1.2.RC1.26.g740a14f3
pkgrel=1
pkgdesc="A tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs."
arch=('x86_64')
url="https://github.com/CHIP-SPV/chipStar"
license=('MIT')
depends=('llvm' 'clang' 'spirv-llvm-translator' 'opencl-icd-loader' 'level-zero-loader')
makedepends=('git' 'cmake' 'level-zero-headers' 'opencl-headers')
provides=('chipstar')
conflicts=('chipstar')
source=("git+https://github.com/CHIP-SPV/chipStar.git")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/chipStar"
git describe --tags | sed 's/^v//;s/-/r/;s/-/./g'
}
prepare() {
cd "$srcdir/chipStar"
git submodule update --init --recursive
cd bitcode/ROCm-Device-Libs/
git checkout origin/llvm-prepare-builtins
}
build() {
cd "$srcdir/chipStar"
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/opt/chipstar \
-DCMAKE_BUILD_TYPE=Release \
-DCHIP_BUILD_SAMPLES=OFF \
-DCHIP_BUILD_TESTS=OFF
cmake --build . --parallel
}
package() {
# TODO: ==> WARNING: Package contains reference to $srcdir
cd "$srcdir/chipStar/build"
make DESTDIR="$pkgdir/" install
}
# vim:set ts=2 sw=2 et:
|