Date: Saturday, November 9, 2019 @ 10:51:11
  Author: svenstaro
Revision: 367234

archrelease: copy trunk to staging-x86_64

Added:
  shaderc/repos/staging-x86_64/
  shaderc/repos/staging-x86_64/PKGBUILD
    (from rev 367233, shaderc/trunk/PKGBUILD)
  
shaderc/repos/staging-x86_64/shaderc-2019.0-fix-build-against-new-glslang.patch
    (from rev 367233, 
shaderc/trunk/shaderc-2019.0-fix-build-against-new-glslang.patch)

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

Copied: shaderc/repos/staging-x86_64/PKGBUILD (from rev 367233, 
shaderc/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD                             (rev 0)
+++ staging-x86_64/PKGBUILD     2019-11-09 10:51:11 UTC (rev 367234)
@@ -0,0 +1,61 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Daniel M. Capella <polyciti...@gmail.com>
+# Contributor: Bin Jin <b...@ctrl-d.org>
+
+pkgname=shaderc
+pkgver=2019.0
+pkgrel=3
+pkgdesc='Collection of tools, libraries and tests for shader compilation'
+url='https://github.com/google/shaderc'
+arch=('x86_64')
+license=('Apache')
+depends=('glibc' 'gcc-libs' 'glslang' 'spirv-tools')
+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'
+        'shaderc-2019.0-fix-build-against-new-glslang.patch')
+sha512sums=('c76887ad0a96145211b6550b0dfe63091df9e1463f9a3140aba2d1982c33e98ad14fb4bcf9ce2281433fc77626fc892c268d0636b9f348a159dd06e3f41b461a'
+            
'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
+  sed '/build-version/d' -i glslc/CMakeLists.txt
+  cat <<- EOF > glslc/src/build-version.inc
+"${pkgver}\\n"
+"$(pacman -Q spirv-tools|cut -d \  -f 2|sed 's/-.*//')\\n"
+"$(pacman -Q glslang|cut -d \  -f 2|sed 's/-.*//')\\n"
+EOF
+}
+
+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 \
+    -DCMAKE_INSTALL_LIBDIR=lib \
+    -DSHADERC_SKIP_TESTS=ON \
+    -GNinja \
+    -DSHADERC_ENABLE_NV_EXTENSIONS=OFF # Currently requires glslang-git
+  ninja
+
+  cd ../glslc
+  asciidoctor -b manpage README.asciidoc -o glslc.1
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  DESTDIR="${pkgdir}" ninja -C build install
+  install -Dm 644 glslc/glslc.1 -t "${pkgdir}/usr/share/man/man1"
+}
+
+# vim: ts=2 sw=2 et:

Copied: 
shaderc/repos/staging-x86_64/shaderc-2019.0-fix-build-against-new-glslang.patch 
(from rev 367233, 
shaderc/trunk/shaderc-2019.0-fix-build-against-new-glslang.patch)
===================================================================
--- staging-x86_64/shaderc-2019.0-fix-build-against-new-glslang.patch           
                (rev 0)
+++ staging-x86_64/shaderc-2019.0-fix-build-against-new-glslang.patch   
2019-11-09 10:51:11 UTC (rev 367234)
@@ -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