]> git.pld-linux.org Git - packages/glslang.git/commitdiff
add spirv_opt bcond; add versioned runtime dep on spirv-tools-libs
authorJan Palus <atler@pld-linux.org>
Sat, 18 Jan 2020 11:25:27 +0000 (12:25 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 18 Jan 2020 11:25:27 +0000 (12:25 +0100)
glslang.spec

index 1c67f7104625eaf04a7d282a86bcb80626a2a3c4..2988205f6130547f56d2976f76160d6b93dfad2f 100644 (file)
@@ -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 ..
 
This page took 0.132423 seconds and 4 git commands to generate.