summaryrefslogtreecommitdiff
path: root/user/spirv-tools/APKBUILD
blob: b98a68a430ffc4afa5ae3b0ce9c43ae194d479a4 (plain) (blame)
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: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=spirv-tools
pkgver=2024.3
pkgrel=0
pkgdesc="Utilities for working with SPIR-V modules "
url="https://github.com/KhronosGroup/SPIRV-Tools"
arch="all"
license="Apache-2.0"
depends=""
depends_dev="spirv-headers"
makedepends="$depends_dev cmake python3"
subpackages="$pkgname-dev"
source="spirv-tools-$pkgver.tar.gz::https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v$pkgver.tar.gz
	remove-copyright-check-test.patch"
builddir="$srcdir/SPIRV-Tools-$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=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DSPIRV-Headers_SOURCE_DIR="/usr" \
		-DSPIRV_TOOLS_BUILD_STATIC=off \
		${CMAKE_CROSSOPTS} \
		.
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

sha512sums="804e2a076025a9afde2d7b0b6950fa7b7289b9aa911348b10aad45cc3515116b7484e886d49b524315f75e8d1a2009c2f26310352c154d1b23a58864e8535324  spirv-tools-2024.3.tar.gz
a04f1a4d60d6206cbbd5e97dda58ca05689835520617dfe7bdfe29d66ab987f68080fbee85c039aecab554e01d94b16a99acfc2ffd29d9ef5861d3dd2e2dccb1  remove-copyright-check-test.patch"