Date: Saturday, November 9, 2019 @ 10:50:59
  Author: svenstaro
Revision: 367233

upgpkg: shaderc 2019.0-3

glslang 7.13 rebuild

Added:
  shaderc/trunk/shaderc-2019.0-fix-build-against-new-glslang.patch
Modified:
  shaderc/trunk/PKGBUILD

----------------------------------------------------+
 PKGBUILD                                           |   10 ++-
 shaderc-2019.0-fix-build-against-new-glslang.patch |   54 +++++++++++++++++++
 2 files changed, 61 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2019-11-08 23:42:30 UTC (rev 367232)
+++ PKGBUILD    2019-11-09 10:50:59 UTC (rev 367233)
@@ -4,7 +4,7 @@
 
 pkgname=shaderc
 pkgver=2019.0
-pkgrel=2
+pkgrel=3
 pkgdesc='Collection of tools, libraries and tests for shader compilation'
 url='https://github.com/google/shaderc'
 arch=('x86_64')
@@ -13,14 +13,17 @@
 makedepends=('asciidoctor' 'cmake' 'ninja' 'python')
 provides=('libshaderc_shared.so')
 
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/google/shaderc/archive/v${pkgver}.tar.gz
-        
'fix-glslang-link-order.patch::https://github.com/google/shaderc/pull/463/commits/21c8be385b3fab5edcb934a6d99f69fd389c4e67.patch')
+        
'fix-glslang-link-order.patch::https://github.com/google/shaderc/pull/463/commits/21c8be385b3fab5edcb934a6d99f69fd389c4e67.patch'
+        'shaderc-2019.0-fix-build-against-new-glslang.patch')
 
sha512sums=('c76887ad0a96145211b6550b0dfe63091df9e1463f9a3140aba2d1982c33e98ad14fb4bcf9ce2281433fc77626fc892c268d0636b9f348a159dd06e3f41b461a'
-            
'995297afe2f70086fb5a68e19c8b2e958812dca77e400c7697adaa8b8dbaee62a2f6784794c5a838a1bae96ab71fd3b72d2a50424512f52ee7f324f629e7b390')
+            
'995297afe2f70086fb5a68e19c8b2e958812dca77e400c7697adaa8b8dbaee62a2f6784794c5a838a1bae96ab71fd3b72d2a50424512f52ee7f324f629e7b390'
+            
'96d2e6a67a8c38e374b56b16936574e374592eec6b38b2a4fd35ae80419298196a849bfbacc5bf7f1b6175c417ead469b18d2c196147119e490556d49eebc89f')
 
 # 
https://github.com/gentoo/gentoo/blob/c31d001aeedaf97917fa29fa859e16090cc50282/media-libs/shaderc/shaderc-2017.2.ebuild#L35-L65
 prepare() {
   cd ${pkgname}-${pkgver}
   patch -Np1 < ../fix-glslang-link-order.patch
+  patch -Np1 < ../shaderc-2019.0-fix-build-against-new-glslang.patch
 
   # de-vendor libs and disable git versioning
   sed '/examples/d;/third_party/d' -i CMakeLists.txt
@@ -35,6 +38,7 @@
 build() {
   mkdir -p ${pkgname}-${pkgver}/build
   cd ${pkgname}-${pkgver}/build
+  export CXXFLAGS+=" -I/usr/include/glslang"
   cmake .. \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=/usr \

Added: shaderc-2019.0-fix-build-against-new-glslang.patch
===================================================================
--- shaderc-2019.0-fix-build-against-new-glslang.patch                          
(rev 0)
+++ shaderc-2019.0-fix-build-against-new-glslang.patch  2019-11-09 10:50:59 UTC 
(rev 367233)
@@ -0,0 +1,54 @@
+diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
+index 3c3c3de..b5fc6cb 100644
+--- a/libshaderc/src/shaderc.cc
++++ b/libshaderc/src/shaderc.cc
+@@ -20,7 +20,7 @@
+ #include <sstream>
+ #include <vector>
+ 
+-#include "SPIRV/spirv.hpp"
++#include "glslang/SPIRV/spirv.hpp"
+ 
+ #include "libshaderc_util/compiler.h"
+ #include "libshaderc_util/counting_includer.h"
+diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
+index ef7867f..acc172b 100644
+--- a/libshaderc_util/src/compiler.cc
++++ b/libshaderc_util/src/compiler.cc
+@@ -26,7 +26,7 @@
+ #include "libshaderc_util/string_piece.h"
+ #include "libshaderc_util/version_profile.h"
+ 
+-#include "SPIRV/GlslangToSpv.h"
++#include "glslang/SPIRV/GlslangToSpv.h"
+ 
+ namespace {
+ using shaderc_util::string_piece;
+@@ -291,17 +291,12 @@ std::tuple<bool, std::vector<uint32_t>, size_t> 
Compiler::Compile(
+       bases[static_cast<int>(UniformKind::StorageBuffer)]);
+   shader.setShiftUavBinding(
+       bases[static_cast<int>(UniformKind::UnorderedAccessView)]);
+-  shader.setHlslIoMapping(hlsl_iomap_);
+   shader.setResourceSetBinding(
+       hlsl_explicit_bindings_[static_cast<int>(used_shader_stage)]);
+   shader.setEnvClient(target_client_info.client,
+                       target_client_info.client_version);
+   shader.setEnvTarget(target_client_info.target_language,
+                       target_client_info.target_language_version);
+-  if (hlsl_functionality1_enabled_) {
+-    shader.setEnvTargetHlslFunctionality1();
+-  }
+-
+   const EShMessages rules = GetMessageRules(target_env_, source_language_,
+                                             hlsl_offsets_,
+                                             generate_debug_info_);
+@@ -478,9 +473,6 @@ std::tuple<bool, std::string, std::string> 
Compiler::PreprocessShader(
+   }
+   shader.setEnvClient(target_client_info.client,
+                       target_client_info.client_version);
+-  if (hlsl_functionality1_enabled_) {
+-    shader.setEnvTargetHlslFunctionality1();
+-  }
+ 
+   // The preprocessor might be sensitive to the target environment.
+   // So combine the existing rules with the just-give-me-preprocessor-output

Reply via email to