From 751968368a30d05541a13daddd124577a12fde25 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 18 Jan 2020 12:25:27 +0100 Subject: [PATCH] add spirv_opt bcond; add versioned runtime dep on spirv-tools-libs --- glslang.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/glslang.spec b/glslang.spec index 1c67f71..2988205 100644 --- a/glslang.spec +++ b/glslang.spec @@ -1,5 +1,6 @@ # # Conditional build: +%bcond_without spirv_opt # build with spirv-opt capability %bcond_without tests # build with tests Summary: Khronos reference front-end for GLSL and ESSL @@ -15,10 +16,15 @@ Source0: https://github.com/KhronosGroup/glslang/archive/%{version}/%{name}-%{ve Patch0: runtests.patch Patch1: %{name}-system-spirv.patch URL: https://github.com/KhronosGroup/glslang -BuildRequires: cmake >= 2.8.11 BuildRequires: bison +BuildRequires: cmake >= 2.8.11 BuildRequires: libstdc++-devel >= 6:4.7 -%{?with_tests:BuildRequires: spirv-tools-devel} +%if %{with tests} || %{with spirv_opt} +BuildRequires: spirv-tools-devel +%endif +%if %{with spirv_opt} +%requires_ge_to spirv-tools-libs spirv-tools-devel +%endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -49,7 +55,8 @@ AST. %build install -d build cd build -%cmake .. +%cmake .. \ + %{!?with_spirv_opt:-DENABLE_OPT=OFF} %{__make} cd .. -- 2.44.0