# git version is sdk version # project version from CHANGES.md %global git_date 20241126 %global git_hash 0099ed6a %global git_ver 15.0.0 %global rel 1 %global src_name %{name}-%{git_date}-%{git_hash}.tar.xz Name: glslang Version: %{git_ver}^%{git_date}g%{git_hash} Release: %{rel}%{?dist} Summary: OpenGL and OpenGL ES shader front end and validator License: BSD-2-Clause AND BSD-3-Clause AND GPL-3.0-or-later AND Apache-2.0 URL: https://github.com/KhronosGroup/glslang Source0: %{url}/%{src_name} Patch0: cm.patch Patch1: e-cm.patch Patch2: g-cm.patch Patch3: g-pc.patch Patch4: s-cm.patch Patch5: s-pc.patch Patch6: spvtools.cpp.patch Patch7: sa-cm.patch BuildRequires: cmake3 BuildRequires: gcc-c++ BuildRequires: ninja-build 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 devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{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 -n %{name} # Fix rpmlint warning on debuginfo find . -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x %build %cmake -DBUILD_SHARED_LIBS=OFF -DALLOW_EXTERNAL_SPIRV_TOOLS=ON %cmake_build %install %cmake_install # we don't want them in here rm -rf %{buildroot}%{_includedir}/SPIRV ##ln -s %{_bindir}/glslang %{buildroot}%{_bindir}/glslangValidator %ifnarch s390x ppc64 %check pushd Test ./runtests localResults ../%{_vpath_builddir}/StandAlone/glslangValidator ../%{_vpath_builddir}/StandAlone/spirv-remap popd %endif # Install libglslang-default-resource-limits.a # install -pm 0644 %{_vpath_builddir}/StandAlone/libglslang-default-resource-limits.a %{buildroot}%{_libdir}/ %files %doc README.md README-spirv-remap.txt %{_bindir}/glslangValidator %{_bindir}/glslang %{_bindir}/spirv-remap %files devel %{_includedir}/glslang/ #%%{_libdir}/libHLSL.a #%%{_libdir}/libOGLCompiler.a %{_libdir}/libOSDependent.a %{_libdir}/libSPIRV.a %{_libdir}/libSPVRemapper.a %{_libdir}/libglslang.a %{_libdir}/libGenericCodeGen.a %{_libdir}/libMachineIndependent.a %{_libdir}/libglslang-default-resource-limits.a %{_libdir}/pkgconfig/glslang.pc %{_libdir}/pkgconfig/spirv.pc %{_libdir}/cmake/* %changelog %autochangelog