# (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 0 %define libname %mklibname %{name} %{major} %define devname %mklibname %{name} -d # Comment out when using stable release. # Upstream tracks git commits in their known_good.json, so we are forced to do the same. # See vulkan-validation-layers for the required known_good commit for this package. %define git e06c7e9a515b716c731bda13f507546f107775d1 %define shortgit %(echo %{git} | cut -c1-7) %define rel 4 # 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 Version: 7.11.3113 Release: %mkrel %{rel}%{?git:.%{shortgit}} 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 %if 0%{?git:1} Source0: https://github.com/KhronosGroup/glslang/archive/%{shortgit}/%{name}-%{shortgit}.tar.gz %else Source0: https://github.com/KhronosGroup/glslang/archive/%{version}/%{name}-%{version}.tar.gz %endif Patch0: nodate.patch # https://github.com/KhronosGroup/glslang/pull/1621 Patch1: 0001-CMake-Allow-linking-against-system-installed-SPIRV-T.patch # https://github.com/KhronosGroup/glslang/pull/1622 Patch2: 0001-Fix-executable-paths-in-test-suite.patch Patch3: glslang-soversion.patch BuildRequires: cmake BuildRequires: pkgconfig(SPIRV-Tools) %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 # Renamed during mga7 development Obsoletes: %{_lib}glslang < 7.10.2984-2 %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 %{?git:-n %{name}-%{git}} %build %cmake \ -DGLSLANG_SOVERSION=%{major} \ -DGLSLANG_VERSION=%{version} %make_build %install %make_install -C build # Not needed, linked into the shared libs rm -f %{buildroot}%{_libdir}/*.a %check pushd Test LD_LIBRARY_PATH+=%{buildroot}%{_libdir} ./runtests 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}/SPIRV/ %{_includedir}/%{name}/ %{_libdir}/lib%{name}*.so %{_libdir}/libHLSL.so %{_libdir}/libSPIRV.so %{_libdir}/libSPVRemapper.so %changelog * Thu Apr 18 2019 akien <akien> 7.11.3113-4.e06c7e9.mga7 + Revision: 1393159 - Commit e06c7e9, matching requirements from Vulkan SDK 1.1.106.0 * Wed Mar 27 2019 akien <akien> 7.11.3113-3.5432f0d.mga7 + Revision: 1380636 - Rebuild against updated spirv-headers and spirv-tools, needed to be able to build vulkan-validation-layers 1.1.101.0 * Wed Mar 27 2019 akien <akien> 7.11.3113-2.5432f0d.mga7 + Revision: 1380629 - Update to git commit 5432f0d, known_good version for Vulkan SDK 1.1.101.0 * Tue Mar 26 2019 akien <akien> 7.11.3113-1.mga7 + Revision: 1380460 - Version 7.11.3113 * Tue Dec 11 2018 akien <akien> 7.10.2984-3.mga7 + Revision: 1340227 - Rebuild to pick updated spirv-tools on armv7hl * Tue Dec 11 2018 akien <akien> 7.10.2984-2.mga7 + Revision: 1340206 - Properly libify with defined soname (major 0 for now) * Mon Dec 10 2018 akien <akien> 7.10.2984-1.mga7 + Revision: 1339877 - Adapt to Mageia's library policy - Build as shared libraries - Build against system SPIRV-Tools for HLSL support - Fix underlinking of OSDependent (other underlinking issues remain in HLSL) - import glslang from Fedora Rawhide