summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/shaderc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/shaderc')
-rw-r--r--meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch21
-rw-r--r--meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch11
-rw-r--r--meta/recipes-graphics/shaderc/files/0003-cmake-add-option-to-skip-build-the-examples.patch47
-rw-r--r--meta/recipes-graphics/shaderc/shaderc_2024.0.bb (renamed from meta/recipes-graphics/shaderc/shaderc_2020.4.bb)6
4 files changed, 16 insertions, 69 deletions
diff --git a/meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch b/meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch
index cc9a400028..5c49aa7fd5 100644
--- a/meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch
+++ b/meta/recipes-graphics/shaderc/files/0001-cmake-disable-building-external-dependencies.patch
@@ -1,7 +1,7 @@
1From 071a9d71bea91bbefcf15e061fc87e53568f3188 Mon Sep 17 00:00:00 2001 1From 941f5f5831e7a52c26168f81f25d0470860ca6f1 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com> 2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 13 Feb 2021 00:45:56 +0000 3Date: Sat, 13 Feb 2021 00:45:56 +0000
4Subject: [PATCH 1/3] cmake: disable building external dependencies 4Subject: [PATCH] cmake: disable building external dependencies
5 5
6- add cmake option to disable the build of the third_party dependencies 6- add cmake option to disable the build of the third_party dependencies
7- change the update_build_version.py to use pkg-config when third_party dependencies not found 7- change the update_build_version.py to use pkg-config when third_party dependencies not found
@@ -15,18 +15,18 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
15 2 files changed, 25 insertions(+), 10 deletions(-) 15 2 files changed, 25 insertions(+), 10 deletions(-)
16 16
17diff --git a/CMakeLists.txt b/CMakeLists.txt 17diff --git a/CMakeLists.txt b/CMakeLists.txt
18index 5c74cd8..b358f6b 100644 18index ffcb54b..cce715e 100644
19--- a/CMakeLists.txt 19--- a/CMakeLists.txt
20+++ b/CMakeLists.txt 20+++ b/CMakeLists.txt
21@@ -41,6 +41,7 @@ else() 21@@ -62,6 +62,7 @@ else()
22 endif() 22 endif()
23 23
24 option(SHADERC_ENABLE_WERROR_COMPILE "Enable passing -Werror to compiler, if available" ON) 24 option(SHADERC_ENABLE_WERROR_COMPILE "Enable passing -Werror to compiler, if available" ON)
25+option(BUILD_EXTERNAL "Build external dependencies in /third_party" ON) 25+option(BUILD_EXTERNAL "Build external dependencies in /third_party" ON)
26 26
27 set (CMAKE_CXX_STANDARD 11) 27 set (CMAKE_CXX_STANDARD 17)
28 28
29@@ -101,8 +102,14 @@ endif(MSVC) 29@@ -119,8 +120,14 @@ endif(MSVC)
30 30
31 31
32 # Configure subdirectories. 32 # Configure subdirectories.
@@ -43,9 +43,9 @@ index 5c74cd8..b358f6b 100644
43 43
44 add_subdirectory(libshaderc_util) 44 add_subdirectory(libshaderc_util)
45 add_subdirectory(libshaderc) 45 add_subdirectory(libshaderc)
46@@ -112,7 +119,7 @@ add_subdirectory(examples) 46@@ -132,7 +139,7 @@ endif()
47 add_custom_target(build-version 47 add_custom_target(build-version
48 ${PYTHON_EXECUTABLE} 48 ${Python_EXECUTABLE}
49 ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py 49 ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
50- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc 50- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc
51+ ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} 51+ ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
@@ -53,7 +53,7 @@ index 5c74cd8..b358f6b 100644
53 53
54 function(define_pkg_config_file NAME LIBS) 54 function(define_pkg_config_file NAME LIBS)
55diff --git a/utils/update_build_version.py b/utils/update_build_version.py 55diff --git a/utils/update_build_version.py b/utils/update_build_version.py
56index 5785390..f72b762 100755 56index b7ce5b8..95b34c5 100755
57--- a/utils/update_build_version.py 57--- a/utils/update_build_version.py
58+++ b/utils/update_build_version.py 58+++ b/utils/update_build_version.py
59@@ -30,6 +30,7 @@ import re 59@@ -30,6 +30,7 @@ import re
@@ -104,6 +104,3 @@ index 5785390..f72b762 100755
104 mkdir_p(os.path.dirname(output_file)) 104 mkdir_p(os.path.dirname(output_file))
105 105
106 if os.path.isfile(output_file): 106 if os.path.isfile(output_file):
107--
1082.30.1
109
diff --git a/meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch b/meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch
index df670cdded..39f982b7f3 100644
--- a/meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch
+++ b/meta/recipes-graphics/shaderc/files/0002-libshaderc_util-fix-glslang-header-file-location.patch
@@ -1,7 +1,7 @@
1From 046c3c2da9c4ff66f14db5bd68e9557504a49241 Mon Sep 17 00:00:00 2001 1From ec2442940e1d5338971861bb81537bae3a6c19e2 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com> 2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 13 Feb 2021 00:45:56 +0000 3Date: Sat, 13 Feb 2021 00:45:56 +0000
4Subject: [PATCH 2/3] libshaderc_util: fix glslang header file location 4Subject: [PATCH] libshaderc_util: fix glslang header file location
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7 7
@@ -11,7 +11,7 @@ Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 1 file changed, 1 insertion(+), 1 deletion(-)
12 12
13diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc 13diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
14index c5ce37e..4703634 100644 14index e5f5d10..5fd6d3c 100644
15--- a/libshaderc_util/src/compiler.cc 15--- a/libshaderc_util/src/compiler.cc
16+++ b/libshaderc_util/src/compiler.cc 16+++ b/libshaderc_util/src/compiler.cc
17@@ -20,7 +20,7 @@ 17@@ -20,7 +20,7 @@
@@ -21,8 +21,5 @@ index c5ce37e..4703634 100644
21-#include "SPIRV/GlslangToSpv.h" 21-#include "SPIRV/GlslangToSpv.h"
22+#include "glslang/SPIRV/GlslangToSpv.h" 22+#include "glslang/SPIRV/GlslangToSpv.h"
23 #include "libshaderc_util/format.h" 23 #include "libshaderc_util/format.h"
24 #include "libshaderc_util/io.h" 24 #include "libshaderc_util/io_shaderc.h"
25 #include "libshaderc_util/message.h" 25 #include "libshaderc_util/message.h"
26--
272.30.1
28
diff --git a/meta/recipes-graphics/shaderc/files/0003-cmake-add-option-to-skip-build-the-examples.patch b/meta/recipes-graphics/shaderc/files/0003-cmake-add-option-to-skip-build-the-examples.patch
deleted file mode 100644
index 43f9edc031..0000000000
--- a/meta/recipes-graphics/shaderc/files/0003-cmake-add-option-to-skip-build-the-examples.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From f1064e4b6cfc5955bc7e2b036f2d05540da9f09b Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 13 Feb 2021 00:45:56 +0000
4Subject: [PATCH 3/3] cmake: add option to skip build the examples
5
6Upstream-Status: Backport [https://github.com/google/shaderc/commit/8d081127ee28ff5df8123c994c00bc66a57e9e9c]
7
8Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
9---
10 CMakeLists.txt | 14 +++++++++++++-
11 1 file changed, 13 insertions(+), 1 deletion(-)
12
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index b358f6b..d8a5405 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -40,6 +40,16 @@ else()
18 message(STATUS "Configuring Shaderc to avoid building tests.")
19 endif()
20
21+option(SHADERC_SKIP_EXAMPLES "Skip building examples" ${SHADERC_SKIP_EXAMPLES})
22+if(NOT ${SHADERC_SKIP_EXAMPLES})
23+ set(SHADERC_ENABLE_EXAMPLES ON)
24+endif()
25+if(${SHADERC_ENABLE_EXAMPLES})
26+ message(STATUS "Configuring Shaderc to build examples.")
27+else()
28+ message(STATUS "Configuring Shaderc to avoid building examples.")
29+endif()
30+
31 option(SHADERC_ENABLE_WERROR_COMPILE "Enable passing -Werror to compiler, if available" ON)
32 option(BUILD_EXTERNAL "Build external dependencies in /third_party" ON)
33
34@@ -114,7 +124,9 @@ endif()
35 add_subdirectory(libshaderc_util)
36 add_subdirectory(libshaderc)
37 add_subdirectory(glslc)
38-add_subdirectory(examples)
39+if(${SHADERC_ENABLE_EXAMPLES})
40+ add_subdirectory(examples)
41+endif()
42
43 add_custom_target(build-version
44 ${PYTHON_EXECUTABLE}
45--
462.30.1
47
diff --git a/meta/recipes-graphics/shaderc/shaderc_2020.4.bb b/meta/recipes-graphics/shaderc/shaderc_2024.0.bb
index 73aa0ee969..9975c608ac 100644
--- a/meta/recipes-graphics/shaderc/shaderc_2020.4.bb
+++ b/meta/recipes-graphics/shaderc/shaderc_2024.0.bb
@@ -6,16 +6,15 @@ HOMEPAGE = "https://github.com/google/shaderc"
6LICENSE = "Apache-2.0" 6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
8 8
9SRCREV = "0dbd899941a43ffd55df527d65128b3b66e75c9c" 9SRCREV = "9f56ca620c07d6c4d119c65c1c1f3f1c584c9985"
10SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \ 10SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \
11 file://0001-cmake-disable-building-external-dependencies.patch \ 11 file://0001-cmake-disable-building-external-dependencies.patch \
12 file://0002-libshaderc_util-fix-glslang-header-file-location.patch \ 12 file://0002-libshaderc_util-fix-glslang-header-file-location.patch \
13 file://0003-cmake-add-option-to-skip-build-the-examples.patch \
14 " 13 "
15UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$" 14UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
16S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
17 16
18inherit cmake python3native 17inherit cmake python3native pkgconfig
19 18
20DEPENDS = "spirv-headers spirv-tools glslang" 19DEPENDS = "spirv-headers spirv-tools glslang"
21 20
@@ -24,6 +23,7 @@ EXTRA_OECMAKE = " \
24 -DBUILD_EXTERNAL=OFF \ 23 -DBUILD_EXTERNAL=OFF \
25 -DSHADERC_SKIP_TESTS=ON \ 24 -DSHADERC_SKIP_TESTS=ON \
26 -DSHADERC_SKIP_EXAMPLES=ON \ 25 -DSHADERC_SKIP_EXAMPLES=ON \
26 -DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
27" 27"
28 28
29BBCLASSEXTEND = "native nativesdk" 29BBCLASSEXTEND = "native nativesdk"