70 lines
1.7 KiB
Bash
70 lines
1.7 KiB
Bash
# Template file for 'glslang'
|
|
# Libraries are unversioned, beware of ABI breakage (rebuild shaderc on updates)
|
|
pkgname=glslang
|
|
version=15.0.0
|
|
revision=1
|
|
build_style=cmake
|
|
hostmakedepends="python3 bison gtest-devel"
|
|
makedepends="SPIRV-Tools-devel"
|
|
short_desc="Khronos reference front-end for GLSL, ESSL, and sample SPIR-V generator"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://github.com/KhronosGroup/glslang"
|
|
distfiles="https://github.com/KhronosGroup/glslang/archive/${version}.tar.gz"
|
|
checksum=c31c8c2e89af907507c0631273989526ee7d5cdf7df95ececd628fd7b811e064
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
export cmake_crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
|
fi
|
|
|
|
do_configure() {
|
|
cmake -B build-shared -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_EXTERNAL=OFF \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DALLOW_EXTERNAL_SPIRV_TOOLS=YES \
|
|
$cmake_crossopts
|
|
|
|
|
|
cmake -B build-static -G Ninja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_EXTERNAL=OFF \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
-DALLOW_EXTERNAL_SPIRV_TOOLS=YES \
|
|
$cmake_crossopts
|
|
}
|
|
|
|
do_build() {
|
|
ninja -C build-shared
|
|
ninja -C build-static
|
|
}
|
|
|
|
do_install() {
|
|
DESTDIR=$DESTDIR ninja install -C build-static
|
|
DESTDIR=$DESTDIR ninja install -C build-shared
|
|
}
|
|
|
|
pre_check() {
|
|
cmake_builddir="build-static"
|
|
}
|
|
|
|
post_install() {
|
|
sed -n '2,32p' < glslang/GenericCodeGen/CodeGen.cpp > LICENSE
|
|
vlicense LICENSE
|
|
}
|
|
|
|
glslang-devel_package() {
|
|
depends="glslang-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/cmake
|
|
}
|
|
}
|