aboutsummaryrefslogtreecommitdiffstats
path: root/community/spirv-tools/APKBUILD
blob: ca502652c69d375c4c9230f8dda98dd0a2b4c429 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=spirv-tools
_pkgname=SPIRV-Tools
pkgver=2019.3
pkgrel=2
pkgdesc="API and commands for processing SPIR-V modules"
options="!check" # Requires git checkout of gtest in external/
url="https://github.com/KhronosGroup/SPIRV-Tools"
arch="all"
license="Apache-2.0"
depends_dev="spirv-headers $pkgname=$pkgver-r$pkgrel"
makedepends="$depends_dev cmake python3"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/KhronosGroup/$_pkgname/archive/v${pkgver}.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DSPIRV_WERROR=OFF \
		-DSPIRV_BUILD_COMPRESSION=ON \
		-DSPIRV_SKIP_TESTS=ON \
		-DSPIRV-Headers_SOURCE_DIR=/usr \
		${CMAKE_CROSSOPTS} .
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="1c3a0ee2db6bb581451e1f7fcf778699ec4634ad88d69e36740ac3e9dde8e1f8ddc17bc52904728fb5019ca62ff008f12f17ce7764e09bc04aea7e8418cbe68e  spirv-tools-2019.3.tar.gz"