2016-02-17 12:08:27 +01:00
|
|
|
#
|
|
|
|
# spec file for package glslang
|
|
|
|
#
|
2023-01-29 14:00:07 +01:00
|
|
|
# Copyright (c) 2023 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
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-12-22 21:15:48 +01:00
|
|
|
%define lname libglslang14
|
2016-02-17 12:08:27 +01:00
|
|
|
Name: glslang
|
2023-12-22 21:15:48 +01:00
|
|
|
Version: 14.0.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
|
2023-11-02 18:26:16 +01:00
|
|
|
Source: https://github.com/KhronosGroup/glslang/archive/refs/tags/%version.tar.gz
|
2022-03-21 09:02:35 +01:00
|
|
|
Source3: baselibs.conf
|
2016-02-17 12:08:27 +01:00
|
|
|
BuildRequires: bison
|
2023-03-29 01:23:47 +02:00
|
|
|
BuildRequires: cmake >= 3.14.0
|
2019-11-07 09:49:24 +01:00
|
|
|
BuildRequires: fdupes
|
2019-06-05 14:28:00 +02:00
|
|
|
BuildRequires: python3-base
|
2023-10-22 04:19:44 +02:00
|
|
|
BuildRequires: spirv-tools-devel
|
2023-10-27 07:56:24 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1599
|
|
|
|
BuildRequires: gcc11-c++
|
|
|
|
%else
|
2023-10-27 11:41:05 +02:00
|
|
|
BuildRequires: c++_compiler
|
2023-10-27 07:56:24 +02:00
|
|
|
%endif
|
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.
|
|
|
|
|
2023-03-29 12:00:40 +02:00
|
|
|
%package nonstd-devel
|
|
|
|
Summary: Secondary set of header files for glslang
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %lname = %version
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description nonstd-devel
|
|
|
|
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.
|
|
|
|
|
|
|
|
This package contains additional headers that are not officially installed,
|
|
|
|
but which some downstream packages rely on.
|
|
|
|
|
2016-02-17 12:08:27 +01:00
|
|
|
%prep
|
2023-09-07 00:56:17 +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
|
2023-08-23 00:31:43 +02:00
|
|
|
# ABI keeps on breaking (gh#3052 #3311 #3312)
|
2022-12-15 16:22:21 +01:00
|
|
|
echo "V_%version { global: *; };" >/tmp/z.sym
|
2023-10-27 07:56:24 +02:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1599
|
|
|
|
export CC=gcc-11 CXX=g++-11
|
|
|
|
%endif
|
2018-08-27 18:22:05 +02:00
|
|
|
# Trim -Wl,--no-undefined for now (https://github.com/KhronosGroup/glslang/issues/1484)
|
2023-10-22 04:19:44 +02:00
|
|
|
%cmake -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
|
|
|
|
-DALLOW_EXTERNAL_SPIRV_TOOLS:BOOL=ON -DENABLE_OPT:BOOL=ON
|
2021-01-18 17:53:48 +01:00
|
|
|
%make_build
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%install
|
2023-01-29 14:00:07 +01:00
|
|
|
%global _lto_cflags %_lto_cflags -ffat-lto-objects
|
2023-03-29 12:00:40 +02:00
|
|
|
od="$PWD"
|
2016-02-17 12:08:27 +01:00
|
|
|
%cmake_install
|
2023-03-29 12:00:40 +02:00
|
|
|
|
2022-01-30 16:14:33 +01:00
|
|
|
b="%buildroot"
|
2023-03-29 12:00:40 +02:00
|
|
|
pushd "$b"
|
|
|
|
(
|
|
|
|
find usr/include -mindepth 1 -type d -printf "%%%%dir /%p\n"
|
|
|
|
find usr/include "(" -type f -o -type l ")" -printf "/%p\n"
|
|
|
|
) | sort >"$od/devel.files"
|
|
|
|
popd
|
|
|
|
|
2023-11-02 18:22:58 +01:00
|
|
|
mkdir -p "$b/%_includedir/External/"
|
|
|
|
cp -a glslang "$b/%_includedir/"
|
|
|
|
cp -a SPIRV StandAlone "$b/%_includedir/External/"
|
2016-02-18 23:11:12 +01:00
|
|
|
find "$b/%_includedir/" -type f ! -iname "*.h" -a ! -iname "*.hpp" -print -delete
|
|
|
|
find "$b/%_includedir/" -type f -exec chmod a-x "{}" "+"
|
2016-02-17 12:08:27 +01:00
|
|
|
|
2023-03-29 12:00:40 +02:00
|
|
|
pushd "$b"
|
|
|
|
(
|
|
|
|
find usr/include -mindepth 1 -type d -printf "%%%%dir /%p\n"
|
|
|
|
find usr/include "(" -type f -o -type l ")" -printf "/%p\n"
|
|
|
|
) | sort >"$od/devel_full.files"
|
|
|
|
popd
|
|
|
|
comm -13 "$od/devel.files" "$od/devel_full.files" >"$od/devel2.files"
|
|
|
|
|
2022-09-07 11:21:29 +02:00
|
|
|
# 3rd party programs use -lOGLCompiler (because pristine glslang shipped .a files),
|
2019-10-14 23:02:05 +02:00
|
|
|
# so satisfy them under our shared build.
|
2023-08-23 00:31:43 +02:00
|
|
|
mkdir -p "$b/%_libdir"
|
2022-09-07 11:21:29 +02:00
|
|
|
for i in libOGLCompiler libOSDependent libGenericCodeGen libMachineIndependent; do
|
|
|
|
ln -s libglslang.so "$b/%_libdir/$i.so"
|
|
|
|
rm -f "$b/%_libdir/$i.a"
|
|
|
|
done
|
|
|
|
|
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
|
2023-12-22 21:15:48 +01:00
|
|
|
%_libdir/*.so.14*
|
2018-08-25 17:01:27 +02:00
|
|
|
|
2023-03-29 12:00:40 +02:00
|
|
|
%files devel -f devel.files
|
2016-02-17 12:08:27 +01:00
|
|
|
%_bindir/gls*
|
|
|
|
%_bindir/spirv*
|
2020-01-19 12:59:37 +01:00
|
|
|
%_libdir/cmake/
|
2022-09-07 11:21:29 +02:00
|
|
|
%_libdir/libGenericCodeGen.so
|
2018-08-25 17:01:27 +02:00
|
|
|
%_libdir/libHLSL.so
|
2022-09-07 11:21:29 +02:00
|
|
|
%_libdir/libMachineIndependent.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
|
2023-08-23 00:31:43 +02:00
|
|
|
%_libdir/libglslang-default-resource-limits.so
|
2023-03-29 12:00:40 +02:00
|
|
|
|
|
|
|
%files nonstd-devel -f devel2.files
|
2016-02-17 12:08:27 +01:00
|
|
|
|
|
|
|
%changelog
|