1 |
commit: 4c2467c716fd7ee60423fed9f73c8ebe2c7a7623 |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 1 23:08:34 2022 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 00:20:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c2467c7 |
7 |
|
8 |
media-libs/vulkan-layers: add 1.3.231 |
9 |
|
10 |
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> |
11 |
|
12 |
media-libs/vulkan-layers/Manifest | 1 + |
13 |
...231-cmake-Cleanup-find_package-SPIRV-code.patch | 101 +++++++++++++++++++++ |
14 |
...rs-9999.ebuild => vulkan-layers-1.3.231.ebuild} | 7 +- |
15 |
media-libs/vulkan-layers/vulkan-layers-9999.ebuild | 3 +- |
16 |
4 files changed, 107 insertions(+), 5 deletions(-) |
17 |
|
18 |
diff --git a/media-libs/vulkan-layers/Manifest b/media-libs/vulkan-layers/Manifest |
19 |
index ebc9df448199..1c33d034ff28 100644 |
20 |
--- a/media-libs/vulkan-layers/Manifest |
21 |
+++ b/media-libs/vulkan-layers/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST vulkan-layers-1.3.224.tar.gz 4193501 BLAKE2B 84982d63339a2ef101cf9e1e9038e94415326a4a8a46b47d0a913bd0d35fa333dd35579f96536c6e147bf37ccdee0a8de12c1c13b74d3529f34645f8e10f0fa2 SHA512 c7d4f6df4bf0cbb970b36cff9197306769bf3f86ea98496b93e8c1779a905966f6b2303b04ba84099ce9c12e828633e2e0db22e49060393335312508b3540488 |
24 |
+DIST vulkan-layers-1.3.231.tar.gz 4408601 BLAKE2B 9b777559a540c34c5f86a93b15c42a223b8b7fd517f06e28d7bd0ba0fdc938063fd86126f7cdb43e692f3cc22296b5f8df924c2f39e3ead38325b2e1442bf3a6 SHA512 550ff2f5d718ab1a272977f3beb89f653107a7a2b89209408233cb3b969206d1d9383e0e8933343bc71fc920dd80e0cf62ad3baa588b671f24ce04cb93d4b606 |
25 |
|
26 |
diff --git a/media-libs/vulkan-layers/files/vulkan-layers-1.3.231-cmake-Cleanup-find_package-SPIRV-code.patch b/media-libs/vulkan-layers/files/vulkan-layers-1.3.231-cmake-Cleanup-find_package-SPIRV-code.patch |
27 |
new file mode 100644 |
28 |
index 000000000000..bd17c69315e0 |
29 |
--- /dev/null |
30 |
+++ b/media-libs/vulkan-layers/files/vulkan-layers-1.3.231-cmake-Cleanup-find_package-SPIRV-code.patch |
31 |
@@ -0,0 +1,101 @@ |
32 |
+From 836a09267fe034ce783570e6920e1b638c0bd212 Mon Sep 17 00:00:00 2001 |
33 |
+From: Juan Ramos <juan@××××××.com> |
34 |
+Date: Fri, 21 Oct 2022 17:43:23 -0600 |
35 |
+Subject: [PATCH] cmake: Cleanup find_package SPIRV code |
36 |
+ |
37 |
+- Use get_target_property instead of relying on passed in var |
38 |
+- Remove unused var |
39 |
+- Cleanup find_package(SPIRV-* code |
40 |
+--- |
41 |
+ CMakeLists.txt | 55 +++++++++---------------------- |
42 |
+ cmake/VVLGenerateSourceCode.cmake | 5 ++- |
43 |
+ 2 files changed, 19 insertions(+), 41 deletions(-) |
44 |
+ |
45 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
46 |
+index a7f01081415..23de46a1a22 100644 |
47 |
+--- a/CMakeLists.txt |
48 |
++++ b/CMakeLists.txt |
49 |
+@@ -204,52 +204,27 @@ if (USE_ROBIN_HOOD_HASHING) |
50 |
+ endif() |
51 |
+ |
52 |
+ if(BUILD_LAYERS OR BUILD_TESTS) |
53 |
+- find_package(SPIRV-Headers CONFIG QUIET) |
54 |
+- if(SPIRV-Headers_FOUND) |
55 |
+- # Prefer the package if found. Note that if SPIRV_HEADERS_INSTALL_DIR points at an 'installed' |
56 |
+- # version of SPIRV-Headers, the package will be found. |
57 |
+- get_target_property(SPIRV_HEADERS_INCLUDE_DIR SPIRV-Headers::SPIRV-Headers INTERFACE_INCLUDE_DIRECTORIES) |
58 |
+- elseif(SPIRV_HEADERS_INCLUDE_DIR) |
59 |
+- # This is set by SPIRV-Tools (in parent scope!) and also some packages that include VVL with add_subdirectory |
60 |
+- if (NOT EXISTS "${SPIRV_HEADERS_INCLUDE_DIR}/spirv/unified1/spirv.h") |
61 |
+- message(FATAL_ERROR "Cannot find SPIRV-Headers from SPIRV_HEADERS_INCLUDE_DIR: ${SPIRV_HEADERS_INCLUDE_DIR}") |
62 |
+- endif() |
63 |
+- elseif(SPIRV_HEADERS_INSTALL_DIR) |
64 |
+- # This is our official variable for setting SPIRV-Headers location, but pointing at the raw source of SPIRV-Headers |
65 |
+- if (NOT EXISTS "${SPIRV_HEADERS_INSTALL_DIR}/include/spirv/unified1/spirv.h") |
66 |
+- message(FATAL_ERROR "Cannot find SPIRV-Headers from SPIRV_HEADERS_INSTALL_DIR: ${SPIRV_HEADERS_INSTALL_DIR}") |
67 |
+- endif() |
68 |
+- set(SPIRV_HEADERS_INCLUDE_DIR "${SPIRV_HEADERS_INSTALL_DIR}/include") |
69 |
+- endif() |
70 |
++ find_package(SPIRV-Headers REQUIRED CONFIG QUIET) |
71 |
+ |
72 |
+- # VVLGenerateSourceCode depends on spirv/unified1 |
73 |
+ include(VVLGenerateSourceCode) |
74 |
+ |
75 |
+- if (NOT TARGET SPIRV-Tools-opt) |
76 |
+- find_package(SPIRV-Tools-opt REQUIRED CONFIG) |
77 |
+- endif() |
78 |
+- |
79 |
+- if (NOT TARGET SPIRV-Tools) |
80 |
+- find_package(SPIRV-Tools REQUIRED CONFIG) |
81 |
+- # See https://github.com/KhronosGroup/SPIRV-Tools/issues/3909 for background on this. |
82 |
+- # The targets available from SPIRV-Tools change depending on how SPIRV_TOOLS_BUILD_STATIC is set. |
83 |
+- # Try to handle all possible combinations so that we work with externally built packages. |
84 |
+- if (TARGET SPIRV-Tools) |
85 |
+- set(SPIRV_TOOLS_TARGET "SPIRV-Tools") |
86 |
+- elseif(TARGET SPIRV-Tools-static) |
87 |
+- set(SPIRV_TOOLS_TARGET "SPIRV-Tools-static") |
88 |
+- elseif(TARGET SPIRV-Tools-shared) |
89 |
+- set(SPIRV_TOOLS_TARGET "SPIRV-Tools-shared") |
90 |
+- else() |
91 |
+- message(FATAL_ERROR "Cannot determine SPIRV-Tools target name") |
92 |
+- endif() |
93 |
++ find_package(SPIRV-Tools-opt REQUIRED CONFIG QUIET) |
94 |
++ |
95 |
++ find_package(SPIRV-Tools REQUIRED CONFIG QUIET) |
96 |
++ # See https://github.com/KhronosGroup/SPIRV-Tools/issues/3909 for background on this. |
97 |
++ # The targets available from SPIRV-Tools change depending on how SPIRV_TOOLS_BUILD_STATIC is set. |
98 |
++ # Try to handle all possible combinations so that we work with externally built packages. |
99 |
++ if (TARGET SPIRV-Tools) |
100 |
++ set(SPIRV_TOOLS_TARGET "SPIRV-Tools") |
101 |
++ elseif(TARGET SPIRV-Tools-static) |
102 |
++ set(SPIRV_TOOLS_TARGET "SPIRV-Tools-static") |
103 |
++ elseif(TARGET SPIRV-Tools-shared) |
104 |
++ set(SPIRV_TOOLS_TARGET "SPIRV-Tools-shared") |
105 |
++ else() |
106 |
++ message(FATAL_ERROR "Cannot determine SPIRV-Tools target name") |
107 |
+ endif() |
108 |
+ endif() |
109 |
+ |
110 |
+-# Generate dependent helper files ------------------------------------------------------------------------------------------------ |
111 |
+- |
112 |
+-set(SCRIPTS_DIR "${PROJECT_SOURCE_DIR}/scripts") |
113 |
+- |
114 |
+ # VkLayer_utils library ---------------------------------------------------------------------------------------------------------- |
115 |
+ # For Windows, we use a static lib because the Windows loader has a fairly restrictive loader search path that can't be easily |
116 |
+ # modified to point it to the same directory that contains the layers. TODO: This should not be a library -- in future, include |
117 |
+diff --git a/cmake/VVLGenerateSourceCode.cmake b/cmake/VVLGenerateSourceCode.cmake |
118 |
+index 43efdb8201c..13c81e38aca 100644 |
119 |
+--- a/cmake/VVLGenerateSourceCode.cmake |
120 |
++++ b/cmake/VVLGenerateSourceCode.cmake |
121 |
+@@ -20,7 +20,10 @@ if(PYTHONINTERP_FOUND) |
122 |
+ message(FATAL_ERROR "Unable to find vk.xml") |
123 |
+ endif() |
124 |
+ |
125 |
+- set(spirv_unified_include_dir "${SPIRV_HEADERS_INSTALL_DIR}/include/spirv/unified1/") |
126 |
++ # Get the include directory of the SPIRV-Headers |
127 |
++ get_target_property(SPIRV_HEADERS_INCLUDE_DIR SPIRV-Headers::SPIRV-Headers INTERFACE_INCLUDE_DIRECTORIES) |
128 |
++ |
129 |
++ set(spirv_unified_include_dir "${SPIRV_HEADERS_INCLUDE_DIR}/spirv/unified1/") |
130 |
+ if (NOT IS_DIRECTORY ${spirv_unified_include_dir}) |
131 |
+ message(FATAL_ERROR "Unable to find spirv/unified1") |
132 |
+ endif() |
133 |
|
134 |
diff --git a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild b/media-libs/vulkan-layers/vulkan-layers-1.3.231.ebuild |
135 |
similarity index 87% |
136 |
copy from media-libs/vulkan-layers/vulkan-layers-9999.ebuild |
137 |
copy to media-libs/vulkan-layers/vulkan-layers-1.3.231.ebuild |
138 |
index c71475bdd661..472f1a4f3a2f 100644 |
139 |
--- a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild |
140 |
+++ b/media-libs/vulkan-layers/vulkan-layers-1.3.231.ebuild |
141 |
@@ -24,8 +24,10 @@ LICENSE="Apache-2.0" |
142 |
SLOT="0" |
143 |
IUSE="wayland X" |
144 |
|
145 |
+PATCHES=( "${FILESDIR}/${P}-cmake-Cleanup-find_package-SPIRV-code.patch" ) |
146 |
+ |
147 |
BDEPEND=">=dev-util/cmake-3.10.2" |
148 |
-RDEPEND="~dev-util/spirv-tools-99999999:=[${MULTILIB_USEDEP}]" |
149 |
+RDEPEND="~dev-util/spirv-tools-${PV}:=[${MULTILIB_USEDEP}]" |
150 |
DEPEND="${RDEPEND} |
151 |
${PYTHON_DEPS} |
152 |
>=dev-cpp/robin-hood-hashing-3.11.5 |
153 |
@@ -48,8 +50,7 @@ multilib_src_configure() { |
154 |
-DBUILD_WSI_XCB_SUPPORT=$(usex X) |
155 |
-DBUILD_WSI_XLIB_SUPPORT=$(usex X) |
156 |
-DBUILD_TESTS=OFF |
157 |
- -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/" |
158 |
- -DSPIRV_HEADERS_INSTALL_DIR="${ESYSROOT}/usr/include/spirv" |
159 |
+ -DVulkanRegistry_DIR="${ESYSROOT}/usr/share/vulkan/registry" |
160 |
) |
161 |
cmake_src_configure |
162 |
} |
163 |
|
164 |
diff --git a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild b/media-libs/vulkan-layers/vulkan-layers-9999.ebuild |
165 |
index c71475bdd661..af73de9264b5 100644 |
166 |
--- a/media-libs/vulkan-layers/vulkan-layers-9999.ebuild |
167 |
+++ b/media-libs/vulkan-layers/vulkan-layers-9999.ebuild |
168 |
@@ -48,8 +48,7 @@ multilib_src_configure() { |
169 |
-DBUILD_WSI_XCB_SUPPORT=$(usex X) |
170 |
-DBUILD_WSI_XLIB_SUPPORT=$(usex X) |
171 |
-DBUILD_TESTS=OFF |
172 |
- -DCMAKE_INSTALL_INCLUDEDIR="${EPREFIX}/usr/include/" |
173 |
- -DSPIRV_HEADERS_INSTALL_DIR="${ESYSROOT}/usr/include/spirv" |
174 |
+ -DVulkanRegistry_DIR="${ESYSROOT}/usr/share/vulkan/registry" |
175 |
) |
176 |
cmake_src_configure |
177 |
} |