File glmark2.spec of Package glmark2

# spec file for package glmark2
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015-2016 Malcolm J Lewis <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           glmark2
Version:        0.0+git.20180208
Release:        0
Summary:        OpenGL 2.0 and ES 2.0 benchmark
License:        GPL-3.0-only
Group:          System/X11/Utilities
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  ImageMagick
BuildRequires:  fdupes
BuildRequires:  libjpeg-devel
BuildRequires:  pkgconfig
BuildRequires:  python3
BuildRequires:  xz
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libpng16)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(x11)
# Skip wayland on SLE
%if 0%{?is_opensuse}
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-egl)
# C++14 capable compiler is required
%if 0%{?suse_version} > 1320
BuildRequires:  gcc-c++ >= 5.0
BuildRequires:  gcc7-c++

A benchmark for OpenGL (ES) 2.0 that uses only the OpenGL ES 2.0 compatible
API. It contains tests for standard OpenGL (ES) 2.0 features, such as vertex
arrays, VBOs, texturing and shaders.

%setup -q

%if 0%{?suse_version} < 1320
export CXX=g++-7
export CXXFLAGS="%{optflags}"
python3 waf configure \
  %if 0%{?is_opensuse}
  --with-flavors=x11-gl,x11-glesv2,wayland-gl,wayland-glesv2,drm-gl,drm-glesv2 \
  --with-flavors=x11-gl,x11-glesv2,drm-gl,drm-glesv2 \
python3 waf --verbose %{?_smp_mflags}

python3 waf install --destdir=%{buildroot}
#FIXME Clean up runtime warning - libpng warning: iCCP: known incorrect sRGB profile
pushd %{buildroot}%{_datadir}/%{name}/textures
convert effect-2d.png -strip effect-2d.png
%fdupes -s %{buildroot}

%doc NEWS
%if 0%{?is_opensuse}
%if 0%{?is_opensuse}

openSUSE Build Service is sponsored by