From dcdcb8c38aa110b78cbc6df27af94f6185e06b68 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Aug 08 2020 15:10:01 +0000 Subject: Fix cmake Signed-off-by: Robert-André Mauchin --- diff --git a/.gitignore b/.gitignore index 2a1cdce..e49bb4b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /shaderc-34c412f.tar.gz /shaderc-f76bb2f.tar.gz /shaderc-7c2aa93.tar.gz +/shaderc-4162bb1.tar.gz diff --git a/0001-Rolling-5-dependencies-and-fixing-build.patch b/0001-Rolling-5-dependencies-and-fixing-build.patch deleted file mode 100644 index 9c68d57..0000000 --- a/0001-Rolling-5-dependencies-and-fixing-build.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e27b4381be1af80b4cadd74b7357a1895721121a Mon Sep 17 00:00:00 2001 -From: Ryan Harrison -Date: Mon, 4 May 2020 14:17:34 -0400 -Subject: [PATCH] Rolling 5 dependencies and fixing build - -Roll third_party/glslang/ f03cb290a..b5f003d7a (7 commits) - -Fixes #1056 ---- - libshaderc_util/src/resources.cc | 2 +- - 2 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/libshaderc_util/src/resources.cc b/libshaderc_util/src/resources.cc -index 458a63f5..d64e47fa 100644 ---- a/libshaderc_util/src/resources.cc -+++ b/libshaderc_util/src/resources.cc -@@ -125,7 +125,7 @@ const TBuiltInResource kDefaultTBuiltInR - /* .maxTaskWorkGroupSizeY_NV = */ 1, - /* .maxTaskWorkGroupSizeZ_NV = */ 1, - /* .maxMeshViewCountNV = */ 4, -- /* .maxDualSourceDrawBuffersEXT = */ 1, -+ - // This is the glslang TLimits structure. - // It defines whether or not the following features are enabled. - // We want them to all be enabled. diff --git a/shaderc.spec b/shaderc.spec index cdc204e..2bfc8f2 100644 --- a/shaderc.spec +++ b/shaderc.spec @@ -1,14 +1,17 @@ +# Force out of source build +%undefine __cmake_in_source_build + # Release 2020.1 %global commit 7c2aa93903558f017f31b35df163bce5fe849f45 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global snapshotdate 20200617 +%global snapshotdate 20200808 # Glslang revision from packaged version %global glslang_version SDK-candidate-2-11-gc9b28b9f Name: shaderc Version: 2020.1 -Release: 3%{?dist} +Release: 1%{?dist} Summary: A collection of tools, libraries, and tests for Vulkan shader compilation License: ASL 2.0 @@ -16,11 +19,9 @@ URL: https://github.com/google/shaderc Source0: %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # https://github.com/google/shaderc/pull/463 -Patch0: https://patch-diff.githubusercontent.com/raw/google/shaderc/pull/463.patch#/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch +Patch0: 0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch # Patch to unbundle 3rd party code Patch1: 0001-Drop-third-party-code-in-CMakeLists.txt.patch -# Fix bug in latest version (to drop in next version) -Patch2: 0001-Rolling-5-dependencies-and-fixing-build.patch BuildRequires: cmake3 BuildRequires: gcc-c++ @@ -89,19 +90,17 @@ echo \"glslang %{glslang_version}\" >> glslc/src/build-version.inc sed -i 's|SPIRV/GlslangToSpv.h|glslang/SPIRV/GlslangToSpv.h|' libshaderc_util/src/compiler.cc %build -mkdir %_target_platform -cd %_target_platform # We disable the tests because they don't work with our unbundling of 3rd party. # See https://github.com/google/shaderc/issues/470 %cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH=True \ -DSHADERC_SKIP_TESTS=True \ -DPYTHON_EXE=%{__python3} \ - -GNinja .. -%ninja_build + -GNinja +%cmake3_build %install -%ninja_install -C %_target_platform +%cmake3_install %check ctest -V