%global commit0 3259c9332b31c36417862b3fb8d004dd3d90377d %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global date0 20201007 %global srcurl https://github.com/ptitSeb/%{name} %{?_with_rpi: %global _default_es -DDEFAULT_ES=2 %global _gl_libdir %{_libdir}/vc } %{!?_gl_libdir: %global _gl_libdir %{_libdir} } Name: gl4es Version: 1.1.2 Release: 4.%{date0}git%{shortcommit0}%{?dist} Summary: OpenGL to GL ES translation library License: MIT URL: http://ptitseb.github.io/gl4es/ Source0: %{srcurl}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz BuildRequires: cmake gcc BuildRequires: Xvfb # rhbz#904851, won't get GLX w/o mesa-dri-drivers BuildRequires: mesa-dri-drivers BuildRequires: apitrace BuildRequires: ImageMagick BuildRequires: libX11-devel %{?_with_rpi: ExclusiveArch: %{arm} aarch64 BuildRequires: raspberrypi-vc-devel BuildRequires: raspberrypi-vc-static } %description This is a library provide OpenGL 2.x functionality for GLES2.0 accelerated Hardware (and of course also support OpenGL 1.5 function, sometimes better then when using GLES 1.1 backend) There is also support for GLES 1.1 Hardware, emulating OpenGL 1.5, and some OpenGL 2.x+ extensions. %package devel Summary: Development files for GL4ES Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %summary. %prep %autosetup -p1 -n %{name}-%{commit0} rm -v COMPILE.md # W: spurious-executable-perm chmod -x *.md find . -name "*.c" -o -name "*.h" -type f -exec chmod -x {} ';' %build %cmake \ %{?_with_rpi: -DBCMHOST=1 } \ %{?_default_es} \ -DUSE_CLOCK=ON \ -DCMAKE_SKIP_BUILD_RPATH=TRUE %cmake_build %install mkdir -p %{buildroot}%{_libdir}/%{name} install -p lib/libGL.so* %{buildroot}%{_gl_libdir} ln -s libGL.so.1 %{buildroot}%{_gl_libdir}/libGL.so mkdir -p %{buildroot}%{_includedir}/%{name} cp -pr include/* %{buildroot}%{_includedir}/%{name} %check pushd tests export LIBGL_DEBUG=verbose # FIXME neverball gives error and exits find . -name \*.sh -print -exec\ xvfb-run -s "-screen 0 640x480x24" '{}' \; %files %license LICENSE %doc *.md %{_gl_libdir}/libGL.so.1 %files devel %license LICENSE %{_gl_libdir}/libGL.so %{_includedir}/%{name}/ %changelog * Wed Oct 07 2020 Nicolas Chauvet - 1.1.2-4.20201007git3259c93 - Update snapshot * Tue Oct 06 2020 Nicolas Chauvet - 1.1.2-3.20200106git2f61f71 - Add rpi support * Thu Jul 23 2020 Raphael Groner - 1.1.2-2.20200106git2f61f71 - prepare for review * Mon Jan 06 2020 Raphael Groner - 1.1.2-1.20200106git2f61f71 - initial