blob: e966ed3d77666f35be26576da849ad02a8743660 [file] [log] [blame]
Andrew Geisslerd1e89492021-02-12 15:35:20 -06001SUMMARY = "A collection of tools, libraries and tests for shader compilation"
2DESCRIPTION = "The Shaderc library provides an API for compiling GLSL/HLSL \
3source code to SPIRV modules. It has been shipping in the Android NDK since version r12b."
4SECTION = "graphics"
5HOMEPAGE = "https://github.com/google/shaderc"
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
8
9SRCREV = "0dbd899941a43ffd55df527d65128b3b66e75c9c"
10SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \
11 file://0001-cmake-de-vendor-libs-and-disable-git-versioning.patch \
12 "
13UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
14S = "${WORKDIR}/git"
15
16inherit cmake python3native
17
18DEPENDS = "spirv-headers spirv-tools glslang"
19
20EXTRA_OECMAKE = " \
21 -DCMAKE_BUILD_TYPE=Release \
22 -DSHADERC_SKIP_TESTS=ON \
23 -Dglslang_SOURCE_DIR=${STAGING_INCDIR}/glslang \
24"
25
26BBCLASSEXTEND = "native nativesdk"
27
28# TODO: probably there is better solution for this.
29# I don't know any method for get the version of a receipe in DEPENDS,
30# so do this ugly hack
31inherit pkgconfig
32DEPENDS += "glslang-native"
33do_configure_prepend() {
34 cat <<- EOF > ${S}/glslc/src/build-version.inc
35"${PV}\\n"
36"$(pkg-config --modversion SPIRV-Tools)\\n"
37"$(glslangValidator --version | head -1 | cut -d' ' -f3)\\n"
38EOF
39}