spirv-tools: disable tests
PATCH 1/5 spirv-tools: disable tests
Signed-off-by Jose Quaresma <[email protected]>
--- meta/recipes-graphics/spir/spirv-tools_2020.6.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
meta/recipes-graphics/spir/spirv-tools_2020.6.bb +5 -2
@@ -11,11 +11,14 @@ SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git" UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git" -inherit cmake python3native +inherit cmake DEPENDS = "spirv-headers" -EXTRA_OECMAKE += "-DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR}" +EXTRA_OECMAKE += "\ + -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \ + -DSPIRV_SKIP_TESTS=ON \ +" do_install_append_class-target() { # reproducibility: remove build host path
Signature · 1 line
2.30.1
PATCH 2/5 spirv-tools: build all libaries as shared
Signed-off-by Jose Quaresma <[email protected]>
--- meta/recipes-graphics/spir/spirv-tools_2020.6.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-graphics/spir/spirv-tools_2020.6.bb +4 -1
@@ -17,6 +17,8 @@ DEPENDS = "spirv-headers" EXTRA_OECMAKE += "\ -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \ + -DSPIRV_TOOLS_BUILD_STATIC=OFF \ + -DBUILD_SHARED_LIBS=ON \ -DSPIRV_SKIP_TESTS=ON \ "
@@ -26,8 +28,9 @@ do_install_append_class-target() { -e 's:${STAGING_DIR_HOST}::g' } +# all the libraries are unversioned, so don't pack it on PN-dev +SOLIBS = ".so" FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/*.so" PACKAGES =+ "${PN}-lesspipe" FILES_${PN}-lesspipe = "${base_bindir}/spirv-lesspipe.sh"
Signature · 1 line
2.30.1
PATCH 3/5 glslang: generate glslang pkg-config
In reply to Jose Quaresma- it will be useful for shaderc
Signed-off-by Jose Quaresma <[email protected]>
--- .../0001-generate-glslang-pkg-config.patch | 47 +++++++++++++++++++ .../glslang/glslang_11.1.0.bb | 3 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/glslang/glslang/0001-generate-glslang-pkg-config.patch
meta/recipes-graphics/glslang/glslang/0001-generate-glslang-pkg-config.patch new file +47 -0
@@ -0,0 +1,47 @@ +From 6692611126b40d499c94bbcc8e29604560262072 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <[email protected]> +Date: Sun, 7 Feb 2021 01:30:39 +0000 +Subject: [PATCH] generate glslang pkg-config + +Based on https://src.fedoraproject.org/rpms/glslang/blob/main/f/0001-pkg-config-compatibility.patch + +Upstream-Status: Pending + +Signed-off-by: Jose Quaresma <[email protected]> + +--- + glslang/CMakeLists.txt | 2 ++ + glslang/glslang.pc.cmake.in | 11 +++++++++++ + 2 files changed, 13 insertions(+) + create mode 100644 glslang/glslang.pc.cmake.in + +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 1c7d22a2..10c1e841 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -209,6 +209,8 @@ if(ENABLE_GLSLANG_INSTALL) + EXPORT glslangTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc @ONLY) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + +diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in +new file mode 100644 +index 00000000..64b6882d +--- /dev/null ++++ b/glslang/glslang.pc.cmake.in +@@ -0,0 +1,11 @@ ++ prefix=@CMAKE_INSTALL_PREFIX@ ++ exec_prefix=@CMAKE_INSTALL_PREFIX@ ++ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ ++ ++ Name: @PROJECT_NAME@ ++ Description: OpenGL and OpenGL ES shader front end and validator ++ Requires: ++ Version: @GLSLANG_VERSION@ ++ Libs: -L${libdir} -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper ++ Cflags: -I${includedir}
meta/recipes-graphics/glslang/glslang_11.1.0.bb +2 -1
@@ -9,7 +9,8 @@ LICENSE = "BSD-3-Clause & BSD-2-Clause & MIT & Apache-2.0 & GPL-3-with-bison-exc LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5ce49c0456e9b413b98a4368c378229" SRCREV = "c594de23cdd790d64ad5f9c8b059baae0ee2941d" -SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https" +SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https \ + file://0001-generate-glslang-pkg-config.patch" UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git"
Signature · 1 line
2.30.1
PATCH 4/5 glslang: add comment about unversioned libraries
In reply to Jose QuaresmaSigned-off-by Jose Quaresma <[email protected]>
--- meta/recipes-graphics/glslang/glslang_11.1.0.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-graphics/glslang/glslang_11.1.0.bb +1 -0
@@ -25,6 +25,7 @@ EXTRA_OECMAKE = " \ " SOLIBSDEV = "glslang.so" +# all the other libraries are unversioned, so pack it on PN FILES_${PN} += "${libdir}/*.so" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.1
PATCH 5/5 shaderc: remove the receipe configure hack and use a patch for that
In reply to Jose Quaresma[Yocto #14226]
Signed-off-by Jose Quaresma <[email protected]>
--- ...ndor-libs-and-disable-git-versioning.patch | 48 -------- ...sable-building-external-dependencies.patch | 109 ++++++++++++++++++ ...til-fix-glslang-header-file-location.patch | 28 +++++ ...dd-option-to-skip-build-the-examples.patch | 47 ++++++++ .../shaderc/shaderc_2020.4.bb | 20 +--- 5 files changed, 189 insertions(+), 63 deletions(-) delete mode 100644 meta/recipes-graphics/shaderc/files/0001-cmake-de-vendor-libs-and-disable-git-versioning.patch create mode 100644 meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch create mode 100644 meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch create mode 100644 meta/recipes-graphics/shaderc/files/0003-cmake-add-option-to-skip-build-the-examples.patch
meta/recipes-graphics/shaderc/files/0001-cmake-de-vendor-libs-and-disable-git-versioning.patch deleted +0 -48
@@ -1,48 +0,0 @@ -From a07ac322a5a5fd4f0339913eb4456321ad1a69fd Mon Sep 17 00:00:00 2001 -From: Jose Quaresma <[email protected]> -Date: Sat, 17 Oct 2020 12:51:50 +0100 -Subject: [PATCH] cmake: de-vendor libs and disable git versioning - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Jose Quaresma <[email protected]> - ---- - CMakeLists.txt | 2 -- - glslc/CMakeLists.txt | 1 - - glslc/src/build-version.inc | 0 - 3 files changed, 3 deletions(-) - create mode 100644 glslc/src/build-version.inc - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c74cd8..9451fbc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -102,12 +102,10 @@ endif(MSVC) - - # Configure subdirectories. - # We depend on these for later projects, so they should come first. --add_subdirectory(third_party) - - add_subdirectory(libshaderc_util) - add_subdirectory(libshaderc) - add_subdirectory(glslc) --add_subdirectory(examples) - - add_custom_target(build-version - ${PYTHON_EXECUTABLE} -diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt -index 31664d1..358d91b 100644 ---- a/glslc/CMakeLists.txt -+++ b/glslc/CMakeLists.txt -@@ -53,7 +53,6 @@ shaderc_default_compile_options(glslc_exe) - target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) - set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) - target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) --add_dependencies(glslc_exe build-version) - - shaderc_add_tests( - TEST_PREFIX glslc -diff --git a/glslc/src/build-version.inc b/glslc/src/build-version.inc -new file mode 100644 -index 0000000..e69de29
meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch new file +109 -0
109 lines not on this page · raw message
meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 046c3c2da9c4ff66f14db5bd68e9557504a49241 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <[email protected]> +Date: Sat, 13 Feb 2021 00:45:56 +0000 +Subject: [PATCH 2/3] libshaderc_util: fix glslang header file location + +Upstream-Status: Pending + +Signed-off-by: Jose Quaresma <[email protected]> +--- + libshaderc_util/src/compiler.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc +index c5ce37e..4703634 100644 +--- a/libshaderc_util/src/compiler.cc ++++ b/libshaderc_util/src/compiler.cc +@@ -20,7 +20,7 @@ + #include <thread> + #include <tuple> + +-#include "SPIRV/GlslangToSpv.h" ++#include "glslang/SPIRV/GlslangToSpv.h" + #include "libshaderc_util/format.h" + #include "libshaderc_util/io.h" + #include "libshaderc_util/message.h" +-- +2.30.1 +
meta/recipes-graphics/shaderc/files/0003-cmake-add-option-to-skip-build-the-examples.patch new file +47 -0
47 lines not on this page · raw message
meta/recipes-graphics/shaderc/shaderc_2020.4.bb +5 -15
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRCREV = "0dbd899941a43ffd55df527d65128b3b66e75c9c" SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \ - file://0001-cmake-de-vendor-libs-and-disable-git-versioning.patch \ + file://0001-cmake-disable-building-external-dependencies-in-thir.patch \ + file://0002-libshaderc_util-fix-glslang-header-file-location.patch \ + file://0003-cmake-add-option-to-skip-build-the-examples.patch \ " UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$" S = "${WORKDIR}/git"
@@ -19,21 +21,9 @@ DEPENDS = "spirv-headers spirv-tools glslang" EXTRA_OECMAKE = " \ -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_EXTERNAL=OFF \ -DSHADERC_SKIP_TESTS=ON \ - -Dglslang_SOURCE_DIR=${STAGING_INCDIR}/glslang \ + -DSHADERC_SKIP_EXAMPLES=ON \ " BBCLASSEXTEND = "native nativesdk" - -# TODO: probably there is better solution for this. -# I don't know any method for get the version of a receipe in DEPENDS, -# so do this ugly hack -inherit pkgconfig -DEPENDS += "glslang-native" -do_configure_prepend() { - cat <<- EOF > ${S}/glslc/src/build-version.inc -"${PV}\\n" -"$(pkg-config --modversion SPIRV-Tools)\\n" -"$(glslangValidator --version | head -1 | cut -d' ' -f3)\\n" -EOF -}
Signature · 1 line
2.30.1