Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame^] | 1 | SUMMARY = "A collection of tools, libraries and tests for shader compilation" |
| 2 | DESCRIPTION = "The Shaderc library provides an API for compiling GLSL/HLSL \ |
| 3 | source code to SPIRV modules. It has been shipping in the Android NDK since version r12b." |
| 4 | SECTION = "graphics" |
| 5 | HOMEPAGE = "https://github.com/google/shaderc" |
| 6 | LICENSE = "Apache-2.0" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" |
| 8 | |
| 9 | SRCREV = "0dbd899941a43ffd55df527d65128b3b66e75c9c" |
| 10 | SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \ |
| 11 | file://0001-cmake-de-vendor-libs-and-disable-git-versioning.patch \ |
| 12 | " |
| 13 | UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$" |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
| 16 | inherit cmake python3native |
| 17 | |
| 18 | DEPENDS = "spirv-headers spirv-tools glslang" |
| 19 | |
| 20 | EXTRA_OECMAKE = " \ |
| 21 | -DCMAKE_BUILD_TYPE=Release \ |
| 22 | -DSHADERC_SKIP_TESTS=ON \ |
| 23 | -Dglslang_SOURCE_DIR=${STAGING_INCDIR}/glslang \ |
| 24 | " |
| 25 | |
| 26 | BBCLASSEXTEND = "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 |
| 31 | inherit pkgconfig |
| 32 | DEPENDS += "glslang-native" |
| 33 | do_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" |
| 38 | EOF |
| 39 | } |