summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Demers2019-11-21 01:36:19 -0500
committerAlexandre Demers2019-11-21 01:36:29 -0500
commit8eaa4edda487a30290c91560e6e6998d589ceceb (patch)
tree1a74ff62d9fd284bba6cfad22c6e2a05e278dd6d
parent36866d361a41e423e98f082483d0e880997f2477 (diff)
downloadaur-8eaa4edda487a30290c91560e6e6998d589ceceb.tar.gz
Fix build against new glslang
Package needs latest glslang version. Add patch to fix where new glslang puts its files and folders. Add include path. Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD12
-rw-r--r--shaderc-2019.0-fix-build-against-new-glslang.patch54
3 files changed, 66 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7975b98ec2c2..abfb8379896d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = lib32-shaderc
pkgdesc = Collection of tools, libraries and tests for shader compilation (32bit)
pkgver = 2019.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/google/shaderc
arch = x86_64
license = Apache
@@ -11,13 +11,15 @@ pkgbase = lib32-shaderc
depends = shaderc
depends = lib32-glibc
depends = lib32-gcc-libs
- depends = lib32-glslang
+ depends = lib32-glslang>=7.13.3496
depends = lib32-spirv-tools>=2019.3
provides = libshaderc_shared.so
source = shaderc-2019.0.tar.gz::https://github.com/google/shaderc/archive/v2019.0.tar.gz
source = fix-glslang-link-order.patch::https://github.com/google/shaderc/pull/463/commits/21c8be385b3fab5edcb934a6d99f69fd389c4e67.patch
+ source = shaderc-2019.0-fix-build-against-new-glslang.patch
sha512sums = c76887ad0a96145211b6550b0dfe63091df9e1463f9a3140aba2d1982c33e98ad14fb4bcf9ce2281433fc77626fc892c268d0636b9f348a159dd06e3f41b461a
sha512sums = 995297afe2f70086fb5a68e19c8b2e958812dca77e400c7697adaa8b8dbaee62a2f6784794c5a838a1bae96ab71fd3b72d2a50424512f52ee7f324f629e7b390
+ sha512sums = 96d2e6a67a8c38e374b56b16936574e374592eec6b38b2a4fd35ae80419298196a849bfbacc5bf7f1b6175c417ead469b18d2c196147119e490556d49eebc89f
pkgname = lib32-shaderc
diff --git a/PKGBUILD b/PKGBUILD
index 775268456ed5..a4bdcc709af4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ _pkgbasename=shaderc
pkgname=lib32-$_pkgbasename
pkgver=2019.0
-pkgrel=1
+pkgrel=2
pkgdesc='Collection of tools, libraries and tests for shader compilation (32bit)'
url='https://github.com/google/shaderc'
arch=('x86_64')
@@ -15,7 +15,7 @@ license=('Apache')
depends=("$_pkgbasename"
'lib32-glibc'
'lib32-gcc-libs'
- 'lib32-glslang'
+ 'lib32-glslang>=7.13.3496'
'lib32-spirv-tools>=2019.3'
)
makedepends=(
@@ -25,9 +25,11 @@ makedepends=(
)
provides=('libshaderc_shared.so')
source=("${_pkgbasename}-${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() {
@@ -35,6 +37,7 @@ prepare() {
cd ${_pkgbasename}-${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
@@ -50,6 +53,7 @@ build() {
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+ export CXXFLAGS+=" -I/usr/include/glslang"
cd ${_pkgbasename}-${pkgver}/build
cmake .. \
diff --git a/shaderc-2019.0-fix-build-against-new-glslang.patch b/shaderc-2019.0-fix-build-against-new-glslang.patch
new file mode 100644
index 000000000000..807540cf62a2
--- /dev/null
+++ b/shaderc-2019.0-fix-build-against-new-glslang.patch
@@ -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