# (akien) The Vulkan SDK requires some care when updating. # Check instructions in the vulkan-headers spec file. # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif # (akien) No soname upstream, arbitrarily using 0 for now # Without proper soname, the devel package would not generate the # devel() provides that RPM relies on to pull in the proper deps # in reverse dependencies. %define major 12 %define libname %mklibname %{name} %{major} %define devname %mklibname %{name} -d # Cyclic dependencies between HLSL and glslang, we can't build with --no-undefined # for the time being: https://github.com/KhronosGroup/glslang/issues/1484 %define _disable_ld_no_undefined 1 Name: glslang # Check tag matching Vulkan sdk-* tag used for other Vulkan components. Version: 12.1.0 Release: 1%{?dist} Summary: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator Group: System/Libraries License: BSD and GPLv3+ and ASL 2.0 URL: https://github.com/KhronosGroup/glslang Source0: https://github.com/KhronosGroup/glslang/archive/%{version}/%{name}-%{version}.tar.gz # https://github.com/KhronosGroup/glslang/pull/1621 #Patch1: 0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch # https://github.com/KhronosGroup/glslang/pull/2419 #Patch2: 0001-CMake-Make-glslang-default-resource-limits-STATIC.patch #Patch3: 0002-CMake-Use-VERSION-SOVERSION-for-all-shared-libs.patch BuildRequires: cmake BuildRequires: pkgconfig(SPIRV-Tools) >= 2022.4 BuildRequires: python3 BuildRequires: gcc-c++ %description %{name} 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. %package -n %{libname} Summary: Library files for glslang Group: System/Libraries %description -n %{libname} Library files for glslang. %package -n %{devname} Summary: Development files for glslang Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{devname} %{name} 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. %prep %autosetup -p1 %build %cmake %cmake_build %install %cmake_install %check pushd Test LD_LIBRARY_PATH+=%{buildroot}%{_libdir} ./runtests localResults \ %{buildroot}%{_bindir}/glslangValidator \ %{buildroot}%{_bindir}/spirv-remap popd %files %doc README.md README-spirv-remap.txt %{_bindir}/glslangValidator %{_bindir}/spirv-remap %files -n %{libname} %{_libdir}/lib%{name}*.so.%{major} %{_libdir}/lib%{name}*.so.%{version} %{_libdir}/libHLSL.so.%{major} %{_libdir}/libHLSL.so.%{version} %{_libdir}/libSPIRV.so.%{major} %{_libdir}/libSPIRV.so.%{version} %{_libdir}/libSPVRemapper.so.%{major} %{_libdir}/libSPVRemapper.so.%{version} %files -n %{devname} %{_includedir}/%{name}/ %{_libdir}/cmake/%{name}/ %{_libdir}/cmake/*.cmake %{_libdir}/lib%{name}*.so %{_libdir}/libHLSL.so %{_libdir}/libSPIRV.so %{_libdir}/libSPVRemapper.so