%define ver 2021.12 %define gitdate 20220712 %define githash 9057c05 %define rel 5 %define use_system_waf 0 %{?_with_system_waf: %global use_system_waf 1} %{?_without_system_waf: %global use_system_waf 0} %define glesv2name mesaglesv2 %define glesv2major 2 %define libglesv2name %mklibname %{glesv2name}_ %{glesv2major} Name: glmark2 Version: %{ver} Release: %mkrel %rel%{?gitdate:.%{gitdate}} Summary: OpenGL and ES 2.0 Benchmark License: GPLv3 URL: https://github.com/glmark2/glmark2 Group: Development/X11 # From https://github.com/glmark2/glmark2.git # Use the included glmark2-getfromgit.sh script to generate the latest archive Source0: glmark2-%{ver}-%{gitdate}.git.%{githash}.tar.xz Source1: glmark2-getfromgit.sh Source2: glmark2-software # fix loading order of GL libraries (versioned first) Patch0: glmark2-2021.12-change-so-names-order.patch BuildRequires: imagemagick BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng12) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(udev) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: python3 BuildRequires: waf Recommends: %{libglesv2name} %description Glmark2 is a benchmark for OpenGL 2.0 and ES 2.0. %prep %setup -q %autopatch -p1 # Remove internal jpeg libraries rm -rv src/libjpeg-turbo #src/libpng %if %use_system_waf rm -r waf waflib %endif %build # Fix incorrect sRGB profile (from suse) convert data/textures/effect-2d.png -strip data/textures/effect-2d.png %if %use_system_waf %waf \ --with-flavors="drm-gl,drm-glesv2,x11-gl,x11-glesv2,wayland-gl,wayland-glesv2" \ --prefix=%{_usr} %waf_build %else export LINKFLAGS="${LINKFLAGS:-%build_ldflags}" ./waf configure \ --with-flavors="drm-gl,drm-glesv2,x11-gl,x11-glesv2,wayland-gl,wayland-glesv2" \ --prefix=%{_usr} ./waf build %_smp_mflags %endif %install %if %use_system_waf %waf_install %else ./waf install --destdir=%{buildroot} %endif install -m 755 %{SOURCE2} %{buildroot}%{_bindir} %files # the x11 opengl benchmark %doc NEWS README COPYING COPYING.SGI %{_bindir}/%{name} %{_bindir}/%{name}-drm %{_bindir}/%{name}-es2 %{_bindir}/%{name}-es2-drm %{_bindir}/%{name}-software %{_bindir}/%{name}-wayland %{_mandir}/man1/%{name}-wayland.1* %{_bindir}/%{name}-es2-wayland %{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}-drm.1* %{_mandir}/man1/%{name}-es2.1* %{_mandir}/man1/%{name}-es2-drm.1* %{_mandir}/man1/%{name}-es2-wayland.1* %{_datadir}/%{name}/