#global _without_mesa_glvnd_default 1 %{?_without_mesa_glvnd_default: %if (0%{?mgaver} <= 8) %{?filter_setup: %filter_provides_in %{_libdir}/%{name} %filter_requires_in %{_libdir}/%{name} %filter_setup } %else %global __provides_exclude_from %{_libdir}/%{name} %global __requires_exclude_from %{_libdir}/%{name} %endif } %global optflags %{optflags} -O3 -Wstrict-aliasing=0 %define major 0 %define libgldispatch %mklibname gldispatch %{major} %define libopengl %mklibname opengl %{major} %define devname %mklibname glvnd -d %define libEGL_major 1 %define libEGL %mklibname egl %{libEGL_major} %define libGLdispatch_major 0 %define libGLdispatch %mklibname gldispatch %{libGLdispatch_major} %define libGLESv1_major 1 %define libGLESv1 %mklibname glesv1_cm %{libGLESv1_major} %define libGLESv2_major 2 %define libGLESv2 %mklibname glesv2 %{libGLESv2_major} %define libGL_major 1 %define libGL %mklibname gl %{libGL_major} %define libGLX_major 0 %define libGLX %mklibname glx %{libGLX_major} %define libOpenGL_major 0 %define libOpenGL %mklibname opengl %{libOpenGL_major} Summary: The GL Vendor-Neutral Dispatch library Name: libglvnd Version: 1.3.2 Release: %mkrel 6.1 License: MIT Group: System/Libraries Url: https://gitlab.freedesktop.org/glvnd/libglvnd Source0: https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v%{version}/%{name}-v%{version}.tar.bz2 # From https://src.fedoraproject.org/rpms/libglvnd/blob/master/f/0001-glx-Add-another-fallback-library-name.patch # (remember to provide the soft link in mesa). Patch0: 0001-glx-Add-another-fallback-library-name.patch # From git Patch10: 0001-build-Support-meson-0.49.2.patch BuildRequires: meson BuildRequires: python-libxml2 BuildRequires: pkgconfig(glproto) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xext) BuildRequires: x11-server-xvfb %description libglvnd is an implementation of the vendor-neutral dispatch layer for arbitrating OpenGL API calls between multiple vendors on a per-screen basis. %files %doc README.md src/EGL/icd_enumeration.md %dir %{_sysconfdir}/glvnd %dir %{_datadir}/glvnd %dir %{_sysconfdir}/glvnd/egl_vendor.d %dir %{_datadir}/glvnd/egl_vendor.d %dir %{_sysconfdir}/egl/egl_external_platform.d/ %dir %{_datadir}/egl/egl_external_platform.d/ #---------------------------------------------------------------------------- %package -n %{libEGL} Summary: LibEGL wrapper from libglvnd #Requires: (mesa-libEGL%{?_isa} >= 18.2.1 or mesa-libEGL >= 18.2.1) Provides: %{name}-egl%{?_isa} = %{EVRD} Provides: %{name}-egl = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libEGL} LibEGL wrapper from libglvnd. %files -n %{libEGL} %if 0%{?_without_mesa_glvnd_default} %{_libdir}/%name/libEGL.so.%{libEGL_major}{,.*} %else %{_libdir}/libEGL.so.%{libEGL_major}{,.*} %endif #---------------------------------------------------------------------------- %package -n %{libGLdispatch} Summary: LibGL dispatcher from libglvnd Requires: %{libGL} = %{EVRD} Provides: %{name}-GLdispatch%{?_isa} = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libGLdispatch} LibGL dispatcher from libglvnd. %files -n %{libGLdispatch} %{_libdir}/libGLdispatch.so.%{libGLdispatch_major}* #---------------------------------------------------------------------------- %package -n %{libGLESv1} Summary: LibGLESv1 wrapper from libglvnd #Requires: (mesa-libEGL%{?_isa} >= 18.2.1 or mesa-libEGL >= 18.2.1) #Obsoletes: %%{_lib}glesv1_1 < %{version}-%{release} #Provides: %%{_lib}glesv1_1 = %{version}-%{release} Provides: %{name}-GLESv1_CM%{?_isa} = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libGLESv1} LibGLESv1 wrapper from libglvnd. %files -n %{libGLESv1} %if 0%{?_without_mesa_glvnd_default} %{_libdir}/%name/libGLESv1_CM.so.%{libGLESv1_major}{,.*} %else %{_libdir}/libGLESv1_CM.so.%{libGLESv1_major}{,.*} %endif #---------------------------------------------------------------------------- %package -n %{libGLESv2} Summary: LibGLESv2 wrapper from libglvnd #Requires: (mesa-libEGL%{?_isa} >= 18.2.1 or mesa-libEGL >= 18.2.1) #Obsoletes: %%{_lib}glesv2_2 < %{version}-%{release} #Provides: %%{_lib}glesv2_2 = %{version}-%{release} Provides: %{name}-GLESv2%{?_isa} = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libGLESv2} LibGLESv2 wrapper from libglvnd. %files -n %{libGLESv2} %if 0%{?_without_mesa_glvnd_default} %{_libdir}/%name/libGLESv2.so.%{libGLESv2_major}{,.*} %else %{_libdir}/libGLESv2.so.%{libGLESv2_major}{,.*} %endif #---------------------------------------------------------------------------- %package -n %{libGL} Summary: LibGL wrapper from libglvnd #Requires: (mesa-libGL%{?_isa} >= 18.2.1 or mesa-libGL >= 18.2.1) #%%define oldgl %%mklibname gl 1 #Obsoletes: %%{oldgl} < %{version}-%{release} #Provides: %%{oldgl} = %{version}-%{release} Provides: %{name}-GL%{?_isa} = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libGL} LibGL wrapper from libglvnd. %files -n %{libGL} %if 0%{?_without_mesa_glvnd_default} %{_libdir}/%name/libGL.so.%{libGL_major}{,.*} %else %{_libdir}/libGL.so.%{libGL_major}{,.*} %endif #---------------------------------------------------------------------------- %package -n %{libGLX} Summary: LibGLX wrapper from libglvnd #Requires: (mesa-libGL%{?_isa} >= 18.2.1 or mesa-libGL >= 18.2.1) Provides: %{name}-GLX%{?_isa} = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libGLX} LibGLX wrapper from libglvnd. %files -n %{libGLX} %if 0%{?_without_mesa_glvnd_default} %{_libdir}/%name/libGLX.so.%{libGLX_major}{,.*} %else %{_libdir}/libGLX.so.%{libGLX_major}{,.*} %endif #---------------------------------------------------------------------------- %package -n %{libOpenGL} Summary: OpenGL wrapper from libglvnd Provides: %{name}-OpenGL%{?_isa} = %{EVRD} Provides: %{name}-GL = %{EVRD} Requires: %{name} = %{EVRD} %description -n %{libOpenGL} OpenGL wrapper from libglvnd. %files -n %{libOpenGL} %{_libdir}/libOpenGL.so.%{libOpenGL_major}* #---------------------------------------------------------------------------- %package -n %{devname} Summary: Development files for %{name} Group: Development/C Requires: %{name} = %{EVRD} Requires: %{libEGL} = %{EVRD} Requires: %{libGLdispatch} = %{EVRD} Requires: %{libGLESv1} = %{EVRD} Requires: %{libGLESv2} = %{EVRD} Requires: %{libGL} = %{EVRD} Requires: %{libGLX} = %{EVRD} Requires: %{libOpenGL} = %{EVRD} # Pull in Mesa for OpenGL headers Requires: pkgconfig(gl) # EGL headers include Requires: pkgconfig(x11) Provides: GL-devel Provides: EGL-devel %description -n %{devname} This package is a bootstrap trick for Mesa, which wants to build against the libglvnd headers but does not link against any of its libraries (and, initially, has file conflicts with them). %files -n %{devname} %dir %{_includedir}/glvnd %{_includedir}/glvnd/*.h %dir %{_includedir}/EGL %{_includedir}/EGL/*.h %dir %{_includedir}/GL %{_includedir}/GL/*.h %dir %{_includedir}/GLES %{_includedir}/GLES/*.h %dir %{_includedir}/GLES2 %{_includedir}/GLES2/*.h %dir %{_includedir}/GLES3 %{_includedir}/GLES3/*.h %dir %{_includedir}/KHR %{_includedir}/KHR/*.h %{_libdir}/pkgconfig/*.pc %if 0%{?_without_mesa_glvnd_default} %{_libdir}/%name/libEGL.so %{_libdir}/libGLdispatch.so %{_libdir}/%name/libGLX.so %{_libdir}/%name/libGL.so %{_libdir}/%name/libGLESv1_CM.so %{_libdir}/%name/libGLESv2.so %{_libdir}/libOpenGL.so %else %{_libdir}/libEGL.so %{_libdir}/libGLdispatch.so %{_libdir}/libGLX.so %{_libdir}/libGL.so %{_libdir}/libGLESv1_CM.so %{_libdir}/libGLESv2.so %{_libdir}/libOpenGL.so %endif #---------------------------------------------------------------------------- %prep %autosetup -p1 -n %{name}-v%{version} %build %meson \ %ifnarch riscv -Dasm=enabled \ %else -Dasm=disabled \ %endif -Dx11=enabled \ -Dglx=enabled \ -Dtls=enabled %meson_build %install %meson_install %{?_without_mesa_glvnd_default: # Avoid conflict with mesa-libGL mkdir -p %{buildroot}%{_libdir}/%{name}/ for l in libEGL libGL libGLESv1_CM libGLESv2 libGLX; do mv %{buildroot}%{_libdir}/${l}.so* \ %{buildroot}%{_libdir}/%{name}/ done } # Create directory layout mkdir -p %{buildroot}%{_sysconfdir}/glvnd/egl_vendor.d mkdir -p %{buildroot}%{_datadir}/glvnd/egl_vendor.d mkdir -p %{buildroot}%{_sysconfdir}/egl/egl_external_platform.d mkdir -p %{buildroot}%{_datadir}/egl/egl_external_platform.d %check export DO_X11_TESTS=1 xvfb-run -s '-screen 0 640x480x24' -d ninja test -C %{_vpath_builddir} %changelog * Fri Jul 03 2020 ghibo 1.3.2-6.1.mga8 - Rebuilt. * Fri Jul 03 2020 ghibo 1.3.2-6.mga8 + Revision: 1601586 - Change xvfb test resolution from 800x600 to 640x480 to help for test failing randomly. - Add Patch10 from git. - Bump version for rebuilding - Remove forcing Epoch from pkgconfig(gl) as did not helped buildings on updates_testing * Fri Jul 03 2020 ghibo 1.3.2-3.mga8 + Revision: 1601502 - Explicitely provides pkgconfig(gl) with Epoch * Fri Jul 03 2020 ghibo 1.3.2-2.mga8 + Revision: 1601493 - Reintroduce Patch0 for a fallback library, inadvertently removed * Thu Jul 02 2020 ghibo 1.3.2-1.mga8 + Revision: 1601385 - Bump release for building under updates_testing - Update to release 1.3.2. - Remove Patch0, Patch1, merged upstream. * Fri Jun 12 2020 ghibo 1.3.1-10.mga8 + Revision: 1593065 - Revert Patch2 - Add patch from git to fix a python deprecated element - Pull back GL-devel, EGL-devel Provides - Add missed GL-devel, EGL-devel to libglvnd-devel for the glvnd case. * Tue Jun 09 2020 ghibo 1.3.1-8.mga8 + Revision: 1591201 - Add missed icd_enumeration.md doc file for EGL * Mon Jun 08 2020 ghibo 1.3.1-7.mga8 + Revision: 1590982 - Avoid obsoleting lib64glesv1_1 and lib64glesv2_2 as there are no such packages - Avoid libgl1 from obsoleting itself (spotted by Pascal Terjan) - Add patch from git to treat warning as errors - Add check - Add patch from FC to use libGL_system.so.0 as fallback library name * Sun Jun 07 2020 ghibo 1.3.1-6.mga8 + Revision: 1590909 - Rebuild * Fri Jun 05 2020 ghibo 1.3.1-5.mga8 + Revision: 1590573 - Enable glvnd in libdir * Sat May 30 2020 neoclust 1.3.1-3.mga8 + Revision: 1588982 - Allow to install in parallel of mesa * Sat May 30 2020 neoclust 1.3.1-2.mga8 + Revision: 1588974 - Disable rich deps ( not yet supported by urpmi - Fix packages names ( lowercase) * Wed Apr 08 2020 ovitters 1.3.1-1.mga8 + Revision: 1565593 - imported from OpenMandriva - imported package libglvnd