void-packages/srcpkgs/shaderc/template

36 lines
1.2 KiB
Bash

# Template file for 'shaderc'
pkgname=shaderc
version=2017.2
revision=1
_githash=7a23a01742b88329fb2260eda007172135ba25d4
wrksrc="shaderc-${_githash}"
build_style=cmake
configure_args="-DSHADERC_SKIP_TESTS=ON"
hostmakedepends="python"
makedepends="SPIRV-Tools-devel glslang-devel"
short_desc="Collection of tools, libraries and tests for shader compilation"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/google/shaderc"
distfiles="https://github.com/google/shaderc/archive/${_githash}.tar.gz"
checksum=496c2a45e5f3da2dd5a97d982fa5c7848d15143be42a4536fc28cb09c2e641dd
pre_configure() {
# Unbundle glslang, SPIRV-Headers, SPIRV-Tools
# also remove examples
sed -i -e '/add_subdirectory(third_party)/d' \
-e '/add_subdirectory(examples)/d' CMakeLists.txt
# Disable git versioning
sed -i -e '/build-version/d' glslc/CMakeLists.txt
# Create our own build-version.inc since we disabled git versioning
# need to keep this in sync with glslang and SPIRV-Tools versions
# this is displayed with 'glslc --version'
cat <<- EOF > glslc/src/build-version.inc
"shaderc\n"
"SPIRV-Tools-2018.2\n"
"glslang-6.2.2569\n"
EOF
}