2016-02-17 11:08:27 +00:00
|
|
|
#
|
|
|
|
# spec file for package glslang
|
|
|
|
#
|
2024-03-10 09:19:48 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2016-02-17 11:08:27 +00: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 16:55:07 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-02-17 11:08:27 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-12-22 20:15:48 +00:00
|
|
|
%define lname libglslang14
|
2016-02-17 11:08:27 +00:00
|
|
|
Name: glslang
|
2024-05-02 22:40:57 +00:00
|
|
|
Version: 14.2.0
|
2016-02-17 11:08:27 +00: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 16:55:07 +00:00
|
|
|
URL: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
|
|
|
|
#Git-URL: https://github.com/KhronosGroup/glslang
|
2023-11-02 17:26:16 +00:00
|
|
|
Source: https://github.com/KhronosGroup/glslang/archive/refs/tags/%version.tar.gz
|
2022-03-21 08:02:35 +00:00
|
|
|
Source3: baselibs.conf
|
2016-02-17 11:08:27 +00:00
|
|
|
BuildRequires: bison
|
2023-03-28 23:23:47 +00:00
|
|
|
BuildRequires: cmake >= 3.14.0
|
2019-11-07 08:49:24 +00:00
|
|
|
BuildRequires: fdupes
|
2019-06-05 12:28:00 +00:00
|
|
|
BuildRequires: python3-base
|
2024-03-10 10:40:21 +00:00
|
|
|
BuildRequires: spirv-tools-devel >= 2024.1~rc1
|
2023-10-27 05:56:24 +00:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1599
|
|
|
|
BuildRequires: gcc11-c++
|
|
|
|
%else
|
2023-10-27 09:41:05 +00:00
|
|
|
BuildRequires: c++_compiler
|
2023-10-27 05:56:24 +00:00
|
|
|
%endif
|
2016-02-17 11:08:27 +00:00
|
|
|
|
|
|
|
%description
|
2018-08-25 15:01:27 +00: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 11:35:38 +00:00
|
|
|
%package -n %lname
|
2018-08-25 15:01:27 +00:00
|
|
|
Summary: OpenGL and OpenGL ES shader front end implementation
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2019-06-05 11:35:38 +00:00
|
|
|
%description -n %lname
|
2018-08-25 15:01:27 +00: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 11:08:27 +00:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: OpenGL and OpenGL ES shader front end and validator
|
|
|
|
Group: Development/Libraries/C and C++
|
2019-06-05 11:35:38 +00:00
|
|
|
Requires: %lname = %version
|
2016-02-17 11:08:27 +00:00
|
|
|
|
|
|
|
%description devel
|
2018-08-25 15:01:27 +00: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 11:08:27 +00: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 10:00:40 +00: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 11:08:27 +00:00
|
|
|
%prep
|
2023-09-06 22:56:17 +00:00
|
|
|
%autosetup -p1
|
2016-02-17 11:08:27 +00:00
|
|
|
|
|
|
|
%build
|
2020-02-03 10:58:49 +00:00
|
|
|
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
|
2024-05-02 23:31:50 +00:00
|
|
|
# ABI keeps on breaking (gh#3052 #3311 #3312 #3593)
|
2022-12-15 15:22:21 +00:00
|
|
|
echo "V_%version { global: *; };" >/tmp/z.sym
|
2023-10-27 05:56:24 +00:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1599
|
|
|
|
export CC=gcc-11 CXX=g++-11
|
|
|
|
%endif
|
2018-08-27 16:22:05 +00:00
|
|
|
# Trim -Wl,--no-undefined for now (https://github.com/KhronosGroup/glslang/issues/1484)
|
2023-10-22 02:19:44 +00: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 16:53:48 +00:00
|
|
|
%make_build
|
2016-02-17 11:08:27 +00:00
|
|
|
|
|
|
|
%install
|
2023-01-29 13:00:07 +00:00
|
|
|
%global _lto_cflags %_lto_cflags -ffat-lto-objects
|
2023-03-29 10:00:40 +00:00
|
|
|
od="$PWD"
|
2016-02-17 11:08:27 +00:00
|
|
|
%cmake_install
|
2023-03-29 10:00:40 +00:00
|
|
|
|
2022-01-30 15:14:33 +00:00
|
|
|
b="%buildroot"
|
2023-03-29 10:00:40 +00: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 17:22:58 +00:00
|
|
|
mkdir -p "$b/%_includedir/External/"
|
|
|
|
cp -a glslang "$b/%_includedir/"
|
|
|
|
cp -a SPIRV StandAlone "$b/%_includedir/External/"
|
2016-02-18 22:11:12 +00: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 11:08:27 +00:00
|
|
|
|
2023-03-29 10:00:40 +00: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"
|
|
|
|
|
2023-12-22 20:37:39 +00:00
|
|
|
# 3rd party programs use -lOSDependent (because pristine glslang shipped .a
|
|
|
|
# files), so satisfy them under our shared build.
|
2023-08-22 22:31:43 +00:00
|
|
|
mkdir -p "$b/%_libdir"
|
2023-12-22 21:28:56 +00:00
|
|
|
for i in libOSDependent libGenericCodeGen libMachineIndependent; do
|
2022-09-07 09:21:29 +00:00
|
|
|
ln -s libglslang.so "$b/%_libdir/$i.so"
|
|
|
|
rm -f "$b/%_libdir/$i.a"
|
|
|
|
done
|
2023-12-22 20:37:39 +00:00
|
|
|
# Gone with glslang 14, redirect to main file
|
|
|
|
for i in libHLSL libOGLCompiler; do
|
|
|
|
ln -s libglslang.so "$b/%_libdir/$i.so"
|
|
|
|
rm -f "$b/%_libdir/$i.a"
|
|
|
|
done
|
2022-09-07 09:21:29 +00:00
|
|
|
|
2019-11-07 08:49:24 +00:00
|
|
|
%fdupes %buildroot/%_prefix
|
2019-10-14 21:02:05 +00:00
|
|
|
|
2019-06-05 11:35:38 +00:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
2018-08-25 15:01:27 +00:00
|
|
|
|
2019-06-05 11:35:38 +00:00
|
|
|
%files -n %lname
|
2023-12-22 20:15:48 +00:00
|
|
|
%_libdir/*.so.14*
|
2018-08-25 15:01:27 +00:00
|
|
|
|
2023-03-29 10:00:40 +00:00
|
|
|
%files devel -f devel.files
|
2016-02-17 11:08:27 +00:00
|
|
|
%_bindir/gls*
|
|
|
|
%_bindir/spirv*
|
2020-01-19 11:59:37 +00:00
|
|
|
%_libdir/cmake/
|
2022-09-07 09:21:29 +00:00
|
|
|
%_libdir/libGenericCodeGen.so
|
2018-08-25 15:01:27 +00:00
|
|
|
%_libdir/libHLSL.so
|
2022-09-07 09:21:29 +00:00
|
|
|
%_libdir/libMachineIndependent.so
|
2019-10-14 21:09:42 +00:00
|
|
|
%_libdir/libOGLCompiler.so
|
2019-10-14 21:02:05 +00:00
|
|
|
%_libdir/libOSDependent.so
|
2018-08-25 15:01:27 +00:00
|
|
|
%_libdir/libSPIRV.so
|
|
|
|
%_libdir/libSPVRemapper.so
|
|
|
|
%_libdir/libglslang.so
|
2023-08-22 22:31:43 +00:00
|
|
|
%_libdir/libglslang-default-resource-limits.so
|
2023-03-29 10:00:40 +00:00
|
|
|
|
|
|
|
%files nonstd-devel -f devel2.files
|
2016-02-17 11:08:27 +00:00
|
|
|
|
|
|
|
%changelog
|