[arch-commits] Commit in shaderc/trunk (2 files)
Sven-Hendrik Haase
svenstaro at archlinux.org
Wed Apr 29 14:19:16 UTC 2020
Date: Wednesday, April 29, 2020 @ 14:19:15
Author: svenstaro
Revision: 381845
upgpkg: shaderc 2020.0-1
Modified:
shaderc/trunk/PKGBUILD
Deleted:
shaderc/trunk/shaderc-2019.0-fix-build-against-new-glslang.patch
----------------------------------------------------+
PKGBUILD | 36 ++++--------
shaderc-2019.0-fix-build-against-new-glslang.patch | 54 -------------------
2 files changed, 14 insertions(+), 76 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-04-29 14:15:30 UTC (rev 381844)
+++ PKGBUILD 2020-04-29 14:19:15 UTC (rev 381845)
@@ -3,27 +3,20 @@
# Contributor: Bin Jin <bjin at ctrl-d.org>
pkgname=shaderc
-pkgver=2019.0
-pkgrel=4
+pkgver=2020.0
+pkgrel=1
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')
+makedepends=('asciidoctor' 'cmake' 'ninja' 'python' 'spirv-headers')
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')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/google/shaderc/archive/v${pkgver}.tar.gz)
+sha512sums=('1971673d7a5fe77ef827c29db14112d4935c573c7c4f3b00fff3729334284d11640ee40c9e97ebcb2a14c6d5c6db0cf5e2ef6b2dfb59c759d1322c6d38624eb4')
-# 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
@@ -36,26 +29,25 @@
}
build() {
- mkdir -p ${pkgname}-${pkgver}/build
- cd ${pkgname}-${pkgver}/build
- export CXXFLAGS+=" -I/usr/include/glslang"
- cmake .. \
+ export CFLAGS+=" ${CPPFLAGS}"
+ export CXXFLAGS+=" ${CPPFLAGS}"
+ cmake \
+ -B build \
+ -S ${pkgname}-${pkgver} \
-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
+ -GNinja
+ ninja -C build
- cd ../glslc
+ cd ${pkgname}-${pkgver}/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"
+ install -Dm 644 ${pkgname}-${pkgver}/glslc/glslc.1 -t "${pkgdir}/usr/share/man/man1"
}
# vim: ts=2 sw=2 et:
Deleted: shaderc-2019.0-fix-build-against-new-glslang.patch
===================================================================
--- shaderc-2019.0-fix-build-against-new-glslang.patch 2020-04-29 14:15:30 UTC (rev 381844)
+++ shaderc-2019.0-fix-build-against-new-glslang.patch 2020-04-29 14:19:15 UTC (rev 381845)
@@ -1,54 +0,0 @@
-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
More information about the arch-commits
mailing list