[packages/glslang] add spirv_opt bcond; add versioned runtime dep on spirv-tools-libs

atler atler at pld-linux.org
Sat Jan 18 12:28:58 CET 2020


commit 751968368a30d05541a13daddd124577a12fde25
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Jan 18 12:25:27 2020 +0100

    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 ..
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glslang.git/commitdiff/751968368a30d05541a13daddd124577a12fde25



More information about the pld-cvs-commit mailing list