summaryrefslogtreecommitdiff
path: root/user/glslang/APKBUILD
blob: f4e911e9e70a260e5799d4663ff7a1c91a1d44a0 (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
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=glslang
pkgver=14.3.0
pkgrel=0
pkgdesc="OpenGL and OpenGL ES reference compiler for shading languages"
url="https://github.com/KhronosGroup/glslang"
arch="all"
license="BSD-3-Clause AND MIT AND BSD-2-Clause AND GPL-3.0+ WITH Bison-2.2-exception"
depends="spirv-tools"
makedepends="cmake python3 spirv-tools-dev"
subpackages="$pkgname-dev"
source="glslang-$pkgver.tar.gz::https://github.com/KhronosGroup/glslang/archive/$pkgver.tar.gz"

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" \
		-DALLOW_EXTERNAL_SPIRV_TOOLS=YES \
		${CMAKE_CROSSOPTS} \
		.
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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

sha512sums="ce6d09cc4d98b01d162ec5a196eec017c4a5f25eaf98c6612695d911f8d136c2f7193ff8f2c07931b2e94182d2c654833adc3b645f0c225e1d07c4e6e7abfd76  glslang-14.3.0.tar.gz"