1 |
commit: 71fd8fefba4a17eccf86e805e00af942171b29b6 |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 28 23:14:17 2019 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 28 23:15:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71fd8fef |
7 |
|
8 |
media-libs/shaderc: Fix build |
9 |
|
10 |
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=698688 |
11 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
12 |
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> |
13 |
|
14 |
...derc-2019.0-fix-build-against-new-glslang.patch | 54 ++++++++++++++++++++++ |
15 |
...derc-2019.0.ebuild => shaderc-2019.0-r1.ebuild} | 9 ++-- |
16 |
2 files changed, 59 insertions(+), 4 deletions(-) |
17 |
|
18 |
diff --git a/media-libs/shaderc/files/shaderc-2019.0-fix-build-against-new-glslang.patch b/media-libs/shaderc/files/shaderc-2019.0-fix-build-against-new-glslang.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..807540cf62a |
21 |
--- /dev/null |
22 |
+++ b/media-libs/shaderc/files/shaderc-2019.0-fix-build-against-new-glslang.patch |
23 |
@@ -0,0 +1,54 @@ |
24 |
+diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc |
25 |
+index 3c3c3de..b5fc6cb 100644 |
26 |
+--- a/libshaderc/src/shaderc.cc |
27 |
++++ b/libshaderc/src/shaderc.cc |
28 |
+@@ -20,7 +20,7 @@ |
29 |
+ #include <sstream> |
30 |
+ #include <vector> |
31 |
+ |
32 |
+-#include "SPIRV/spirv.hpp" |
33 |
++#include "glslang/SPIRV/spirv.hpp" |
34 |
+ |
35 |
+ #include "libshaderc_util/compiler.h" |
36 |
+ #include "libshaderc_util/counting_includer.h" |
37 |
+diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc |
38 |
+index ef7867f..acc172b 100644 |
39 |
+--- a/libshaderc_util/src/compiler.cc |
40 |
++++ b/libshaderc_util/src/compiler.cc |
41 |
+@@ -26,7 +26,7 @@ |
42 |
+ #include "libshaderc_util/string_piece.h" |
43 |
+ #include "libshaderc_util/version_profile.h" |
44 |
+ |
45 |
+-#include "SPIRV/GlslangToSpv.h" |
46 |
++#include "glslang/SPIRV/GlslangToSpv.h" |
47 |
+ |
48 |
+ namespace { |
49 |
+ using shaderc_util::string_piece; |
50 |
+@@ -291,17 +291,12 @@ std::tuple<bool, std::vector<uint32_t>, size_t> Compiler::Compile( |
51 |
+ bases[static_cast<int>(UniformKind::StorageBuffer)]); |
52 |
+ shader.setShiftUavBinding( |
53 |
+ bases[static_cast<int>(UniformKind::UnorderedAccessView)]); |
54 |
+- shader.setHlslIoMapping(hlsl_iomap_); |
55 |
+ shader.setResourceSetBinding( |
56 |
+ hlsl_explicit_bindings_[static_cast<int>(used_shader_stage)]); |
57 |
+ shader.setEnvClient(target_client_info.client, |
58 |
+ target_client_info.client_version); |
59 |
+ shader.setEnvTarget(target_client_info.target_language, |
60 |
+ target_client_info.target_language_version); |
61 |
+- if (hlsl_functionality1_enabled_) { |
62 |
+- shader.setEnvTargetHlslFunctionality1(); |
63 |
+- } |
64 |
+- |
65 |
+ const EShMessages rules = GetMessageRules(target_env_, source_language_, |
66 |
+ hlsl_offsets_, |
67 |
+ generate_debug_info_); |
68 |
+@@ -478,9 +473,6 @@ std::tuple<bool, std::string, std::string> Compiler::PreprocessShader( |
69 |
+ } |
70 |
+ shader.setEnvClient(target_client_info.client, |
71 |
+ target_client_info.client_version); |
72 |
+- if (hlsl_functionality1_enabled_) { |
73 |
+- shader.setEnvTargetHlslFunctionality1(); |
74 |
+- } |
75 |
+ |
76 |
+ // The preprocessor might be sensitive to the target environment. |
77 |
+ // So combine the existing rules with the just-give-me-preprocessor-output |
78 |
|
79 |
diff --git a/media-libs/shaderc/shaderc-2019.0.ebuild b/media-libs/shaderc/shaderc-2019.0-r1.ebuild |
80 |
similarity index 86% |
81 |
rename from media-libs/shaderc/shaderc-2019.0.ebuild |
82 |
rename to media-libs/shaderc/shaderc-2019.0-r1.ebuild |
83 |
index 6c1e8c8b019..b125681aee4 100644 |
84 |
--- a/media-libs/shaderc/shaderc-2019.0.ebuild |
85 |
+++ b/media-libs/shaderc/shaderc-2019.0-r1.ebuild |
86 |
@@ -17,12 +17,12 @@ KEYWORDS="~amd64 ~x86" |
87 |
IUSE="doc test" |
88 |
|
89 |
RDEPEND=" |
90 |
- >=dev-util/glslang-7.10[${MULTILIB_USEDEP}] |
91 |
- dev-util/spirv-tools[${MULTILIB_USEDEP}] |
92 |
+ >=dev-util/glslang-7.12.3353_pre20191027[${MULTILIB_USEDEP}] |
93 |
+ >=dev-util/spirv-tools-2019.10_pre20191027[${MULTILIB_USEDEP}] |
94 |
" |
95 |
DEPEND="${RDEPEND} |
96 |
${PYTHON_DEPS} |
97 |
- dev-util/spirv-headers |
98 |
+ >=dev-util/spirv-headers-1.5.1 |
99 |
doc? ( dev-ruby/asciidoctor ) |
100 |
test? ( |
101 |
dev-cpp/gtest |
102 |
@@ -33,7 +33,8 @@ DEPEND="${RDEPEND} |
103 |
# https://github.com/google/shaderc/issues/470 |
104 |
RESTRICT=test |
105 |
|
106 |
-PATCHES=( "${FILESDIR}/${P}-fix-glslang-link-order.patch" ) |
107 |
+PATCHES=("${FILESDIR}/${P}-fix-glslang-link-order.patch" |
108 |
+ "${FILESDIR}/${P}-fix-build-against-new-glslang.patch" ) |
109 |
|
110 |
python_check_deps() { |
111 |
if use test; then |