Group :: Development/C++
RPM: glslang
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define soname 12
%define build_type RelWithDebInfo
%define _cmake %cmake -DCMAKE_BUILD_TYPE=%build_type
%define optflags_lto %nil
Name: glslang
Version: 12.2.0
Release: alt1
Epoch: 1
Summary: OpenGL and OpenGL ES shader front end and validator
Group: Development/C++
License: BSD
Url: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
Packager: L.A. Kostis <lakostis at altlinux.org>
Source: https://github.com/KhronosGroup/%name/archive/%version/%name-%version.tar
Patch0: %{name}-alt-shared-opt.patch
BuildRequires(pre): cmake
BuildRequires: gcc-c++
BuildRequires: python3-devel libspirv-tools-devel >= 2023.3
%description
glslang is the official reference compiler front end for the OpenGL
ES and OpenGL shading languages. It implements a strict
interpretation of the specifications for these languages.
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.
%package -n lib%{name}%{soname}
Summary: %{name} shared libraries
Group: Development/C++
%description -n lib%{name}%{soname}
Contains shared libraries used by %{name}.
%package devel
Summary: %name development headers and libraries
Group: Development/C++
Requires: %name = %EVR
%description devel
%name development headers and libraries.
%prep
%setup
%autopatch -p2
%build
%_cmake \
-DCMAKE_INSTALL_LIBDIR=%_lib \
-DCMAKE_INSTALL_DATADIR=%_libdir/cmake \
-DBUILD_SHARED_LIBS:BOOL=TRUE
%cmake_build
%cmake_install
pushd %buildroot%_includedir
rm -rf SPIRV
ln -s glslang/SPIRV SPIRV
popd
%files
%doc README-spirv-remap.txt
%_bindir/*
%files -n lib%{name}%{soname}
%_libdir/*.so.*
%files devel
%doc README.md
%_libdir/lib*.so
%_libdir/cmake/*
%_includedir/%name
%_includedir/SPIRV
%changelog
…
Full changelog you can see here
%define build_type RelWithDebInfo
%define _cmake %cmake -DCMAKE_BUILD_TYPE=%build_type
%define optflags_lto %nil
Name: glslang
Version: 12.2.0
Release: alt1
Epoch: 1
Summary: OpenGL and OpenGL ES shader front end and validator
Group: Development/C++
License: BSD
Url: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
Packager: L.A. Kostis <lakostis at altlinux.org>
Source: https://github.com/KhronosGroup/%name/archive/%version/%name-%version.tar
Patch0: %{name}-alt-shared-opt.patch
BuildRequires(pre): cmake
BuildRequires: gcc-c++
BuildRequires: python3-devel libspirv-tools-devel >= 2023.3
%description
glslang is the official reference compiler front end for the OpenGL
ES and OpenGL shading languages. It implements a strict
interpretation of the specifications for these languages.
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.
%package -n lib%{name}%{soname}
Summary: %{name} shared libraries
Group: Development/C++
%description -n lib%{name}%{soname}
Contains shared libraries used by %{name}.
%package devel
Summary: %name development headers and libraries
Group: Development/C++
Requires: %name = %EVR
%description devel
%name development headers and libraries.
%prep
%setup
%autopatch -p2
%build
%_cmake \
-DCMAKE_INSTALL_LIBDIR=%_lib \
-DCMAKE_INSTALL_DATADIR=%_libdir/cmake \
-DBUILD_SHARED_LIBS:BOOL=TRUE
%cmake_build
%cmake_install
pushd %buildroot%_includedir
rm -rf SPIRV
ln -s glslang/SPIRV SPIRV
popd
%files
%doc README-spirv-remap.txt
%_bindir/*
%files -n lib%{name}%{soname}
%_libdir/*.so.*
%files devel
%doc README.md
%_libdir/lib*.so
%_libdir/cmake/*
%_includedir/%name
%_includedir/SPIRV
%changelog
…
Full changelog you can see here