2016-02-17 12:08:27 +01:00
|
|
|
#
|
|
|
|
# spec file for package glslang
|
|
|
|
#
|
2022-01-30 15:59:49 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2016-02-17 12:08:27 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-12 17:55:07 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-02-17 12:08:27 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-01-18 17:53:48 +01:00
|
|
|
%define lname libglslang11
|
2016-02-17 12:08:27 +01:00
|
|
|
Name: glslang
|
2022-06-15 19:27:25 +02:00
|
|
|
Version: 11.10.0
|
2016-02-17 12:08:27 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: OpenGL and OpenGL ES shader front end and validator
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/C and C++
|
2018-11-12 17:55:07 +01:00
|
|
|
URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
|
|
|
|
#Git-URL: https://github.com/KhronosGroup/glslang
|
2021-01-18 17:53:48 +01:00
|
|
|
Source: https://github.com/KhronosGroup/glslang/archive/%version.tar.gz
|
2022-03-21 09:02:35 +01:00
|
|
|
Source3: baselibs.conf
|
2021-12-09 20:32:50 +01:00
|
|
|
Patch0: 0001-build-set-SOVERSION-on-all-libraries.patch
|
2016-02-17 12:08:27 +01:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: cmake >= 2.8
|
2019-11-07 09:49:24 +01:00
|
|
|
BuildRequires: fdupes
|
2016-02-17 12:08:27 +01:00
|
|
|
BuildRequires: gcc-c++
|
2019-06-05 14:28:00 +02:00
|
|
|
BuildRequires: python3-base
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%description
|
2018-08-25 17:01:27 +02:00
|
|
|
glslang is a compiler front end for the OpenGL ES and OpenGL shading
|
|
|
|
languages. It implements a strict interpretation of the
|
|
|
|
specifications for these languages.
|
|
|
|
|
2019-06-05 13:35:38 +02:00
|
|
|
%package -n %lname
|
2018-08-25 17:01:27 +02:00
|
|
|
Summary: OpenGL and OpenGL ES shader front end implementation
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2019-06-05 13:35:38 +02:00
|
|
|
%description -n %lname
|
2018-08-25 17:01:27 +02:00
|
|
|
glslang is a compiler front end for the OpenGL ES and OpenGL shading
|
|
|
|
languages. It implements a strict interpretation of the
|
|
|
|
specifications for these languages.
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: OpenGL and OpenGL ES shader front end and validator
|
|
|
|
Group: Development/Libraries/C and C++
|
2019-06-05 13:35:38 +02:00
|
|
|
Requires: %lname = %version
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%description devel
|
2018-08-25 17:01:27 +02:00
|
|
|
glslang is a compiler front end for the OpenGL ES and OpenGL shading
|
|
|
|
languages. It implements a strict interpretation of the
|
|
|
|
specifications for these languages.
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
spirv-remap is a utility to improve compression of SPIR-V binary
|
|
|
|
files via entropy reduction, plus optional stripping of debug
|
|
|
|
information and load/store optimization. It transforms SPIR-V to
|
|
|
|
SPIR-V, remapping IDs. The resulting modules have an increased ID
|
|
|
|
range (IDs are not as tightly packed around zero), but will compress
|
|
|
|
better when multiple modules are compressed together, since
|
|
|
|
compressor's dictionary can find better cross module commonality.
|
|
|
|
|
|
|
|
%prep
|
2018-08-25 17:01:27 +02:00
|
|
|
%autosetup -p1
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%build
|
2020-02-03 11:58:49 +01:00
|
|
|
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
|
2018-08-27 18:22:05 +02:00
|
|
|
# Trim -Wl,--no-undefined for now (https://github.com/KhronosGroup/glslang/issues/1484)
|
2019-11-19 10:02:58 +01:00
|
|
|
%cmake -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now"
|
2021-01-18 17:53:48 +01:00
|
|
|
%make_build
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%install
|
2019-08-11 14:03:10 +02:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2016-02-17 12:08:27 +01:00
|
|
|
%cmake_install
|
2022-01-30 16:14:33 +01:00
|
|
|
b="%buildroot"
|
2019-10-14 23:02:05 +02:00
|
|
|
find "$b" -type f -name "*.a" -print -delete
|
2016-02-17 17:55:35 +01:00
|
|
|
mkdir -p "$b/%_includedir"
|
2016-02-17 18:38:33 +01:00
|
|
|
cp -a SPIRV glslang "$b/%_includedir/"
|
2016-02-18 23:11:12 +01:00
|
|
|
find "$b/%_includedir/" -type f ! -iname "*.h" -a ! -iname "*.hpp" -print -delete
|
|
|
|
ln -s SPIRV/spirv.hpp "$b/%_includedir/"
|
|
|
|
find "$b/%_includedir/" -type f -exec chmod a-x "{}" "+"
|
2016-05-06 13:36:57 +02:00
|
|
|
cp build/StandAlone/libglslang-default-resource-limits.so "$b/%_libdir/"
|
2016-02-17 12:08:27 +01:00
|
|
|
|
2019-10-14 23:02:05 +02:00
|
|
|
# 3rd party programs use -lOGLCompiler (because pristine glslang ships .a files),
|
|
|
|
# so satisfy them under our shared build.
|
2019-10-14 23:09:42 +02:00
|
|
|
ln -s libglslang.so "$b/%_libdir/libOGLCompiler.so"
|
2019-10-14 23:02:05 +02:00
|
|
|
ln -s libglslang.so "$b/%_libdir/libOSDependent.so"
|
2019-11-07 09:49:24 +01:00
|
|
|
%fdupes %buildroot/%_prefix
|
2019-10-14 23:02:05 +02:00
|
|
|
|
2019-06-05 13:35:38 +02:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
2018-08-25 17:01:27 +02:00
|
|
|
|
2019-06-05 13:35:38 +02:00
|
|
|
%files -n %lname
|
2021-01-18 17:53:48 +01:00
|
|
|
%_libdir/*.so.11*
|
2018-08-25 17:01:27 +02:00
|
|
|
|
2016-02-17 12:08:27 +01:00
|
|
|
%files devel
|
|
|
|
%_bindir/gls*
|
|
|
|
%_bindir/spirv*
|
2020-01-19 12:59:37 +01:00
|
|
|
%_libdir/cmake/
|
2016-05-06 13:36:57 +02:00
|
|
|
%_libdir/*resource*.so
|
2018-08-25 17:01:27 +02:00
|
|
|
%_libdir/libHLSL.so
|
2019-10-14 23:09:42 +02:00
|
|
|
%_libdir/libOGLCompiler.so
|
2019-10-14 23:02:05 +02:00
|
|
|
%_libdir/libOSDependent.so
|
2018-08-25 17:01:27 +02:00
|
|
|
%_libdir/libSPIRV.so
|
|
|
|
%_libdir/libSPVRemapper.so
|
|
|
|
%_libdir/libglslang.so
|
2016-02-17 18:38:33 +01:00
|
|
|
%_includedir/*
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%changelog
|