c7a625
%global commit0 5baa1e5cfc422eb53e66f12ffb80c93d4a693cd9
c7a625
%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
c7a625
c7a625
#if 0%{?rhel} && 0%{?rhel} <= 7
c7a625
#global _without_mesa_glvnd_default 1
c7a625
#endif
c7a625
c7a625
Name:           libglvnd
c7a625
Version:        1.0.1
c7a625
Release:        0.8%{?commit0:.git%{shortcommit0}}%{?dist}
c7a625
# Provide an upgrade path from the negativo17.org pkgs which have Epoch 1
c7a625
Epoch:          1
c7a625
Summary:        The GL Vendor-Neutral Dispatch library
c7a625
c7a625
License:        MIT
c7a625
URL:            https://github.com/NVIDIA/libglvnd
c7a625
#Source0:        %%{url}/archive/v%%{version}/%%{name}-%%{version}.tar.gz
c7a625
Source0:        %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
c7a625
Patch0:         libglvnd-python3.patch
c7a625
Patch1:         0001-glx-Add-another-fallback-library-name.patch
c7a625
c7a625
BuildRequires:  libtool
c7a625
BuildRequires:  gcc
c7a625
BuildRequires:  python
c7a625
BuildRequires:  libxml2-python
c7a625
BuildRequires:  pkgconfig(glproto)
c7a625
BuildRequires:  pkgconfig(x11)
c7a625
BuildRequires:  pkgconfig(xext)
c7a625
BuildRequires:  xorg-x11-server-Xvfb
c7a625
c7a625
%if (0%{?rhel} && 0%{?rhel} <= 6)
c7a625
BuildRequires:  autoconf268
c7a625
%endif
c7a625
c7a625
%{?_without_mesa_glvnd_default:
c7a625
%if (0%{?rhel} && 0%{?rhel} <= 6)
c7a625
c7a625
%{?filter_setup:
c7a625
%filter_provides_in %{_libdir}/%{name}
c7a625
%filter_requires_in %{_libdir}/%{name}
c7a625
%filter_setup
c7a625
}
c7a625
c7a625
%else
c7a625
c7a625
%global __provides_exclude_from %{_libdir}/%{name}
c7a625
%global __requires_exclude_from %{_libdir}/%{name}
c7a625
c7a625
%endif
c7a625
}
c7a625
c7a625
%description
c7a625
libglvnd is an implementation of the vendor-neutral dispatch layer for
c7a625
arbitrating OpenGL API calls between multiple vendors on a per-screen basis.
c7a625
c7a625
c7a625
%package        devel
c7a625
Summary:        Development files for %{name}
c7a625
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
Requires:       %{name}-opengl%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
Requires:       %{name}-gles%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
Requires:       %{name}-glx%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
Requires:       %{name}-egl%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
Requires:       %{name}-core-devel%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
c7a625
%description    devel
c7a625
The %{name}-devel package contains libraries and header files for
c7a625
developing applications that use %{name}.
c7a625
c7a625
c7a625
%package        core-devel
c7a625
Summary:        Core development files for %{name}
c7a625
c7a625
%description core-devel
c7a625
The %{name}-core-devel package is a bootstrap trick for Mesa, which wants
c7a625
to build against the %{name} headers but does not link against any of
c7a625
its libraries (and, initially, has file conflicts with them). If you are
c7a625
not Mesa you almost certainly want %{name}-devel instead.
c7a625
c7a625
c7a625
%package        opengl
c7a625
Summary:        OpenGL support for libglvnd
c7a625
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
c7a625
%description    opengl
c7a625
libOpenGL is the common dispatch interface for the workstation OpenGL API.
c7a625
c7a625
c7a625
%package        gles
c7a625
Summary:        GLES support for libglvnd
c7a625
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
%{!?_without_mesa_glvnd_default:
c7a625
# mesa is the default EGL implementation provider
c7a625
Requires:       mesa-libEGL%{?_isa} >= 13.0.4-1
c7a625
Provides:       libGLES
c7a625
Provides:       libGLES%{?_isa}
c7a625
}
c7a625
c7a625
%description    gles
c7a625
libGLESv[12] are the common dispatch interface for the GLES API.
c7a625
c7a625
c7a625
%package        egl
c7a625
Summary:        EGL support for libglvnd
c7a625
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
%{!?_without_mesa_glvnd_default:
c7a625
# mesa is the default EGL implementation provider
c7a625
Requires:       mesa-libEGL%{?_isa} >= 13.0.4-1
c7a625
Provides:       libEGL
c7a625
Provides:       libEGL%{?_isa}
c7a625
}
c7a625
c7a625
%description    egl
c7a625
libEGL are the common dispatch interface for the EGL API.
c7a625
c7a625
c7a625
%package        glx
c7a625
Summary:        GLX support for libglvnd
c7a625
Requires:       %{name}%{?_isa} = %{epoch}:%{version}-%{release}
c7a625
%{!?_without_mesa_glvnd_default:
c7a625
# mesa is the default GL implementation provider
c7a625
Requires:       mesa-libGL%{?_isa} >= 13.0.4-1
c7a625
Provides:       libGL
c7a625
Provides:       libGL%{?_isa}
c7a625
}
c7a625
c7a625
%description    glx
c7a625
libGL and libGLX are the common dispatch interface for the GLX API.
c7a625
c7a625
c7a625
%prep
c7a625
%autosetup -p1 -n %{name}-%{?commit0}%{?!commit0:%{version}}
c7a625
%if 0%{?rhel} == 6
c7a625
autoreconf268 -vif
c7a625
%else
c7a625
autoreconf -vif
c7a625
%endif
c7a625
c7a625
%build
c7a625
#Prefer asm and tls for x86* and ppc64*
c7a625
#armhfp and aarch64 fallback to asm and tsd
c7a625
#Others arches fallback to pure-c and tls.
c7a625
%configure \
c7a625
  --disable-static \
c7a625
  --enable-asm \
c7a625
  --enable-tls
c7a625
c7a625
%make_build V=1
c7a625
c7a625
c7a625
%install
c7a625
%make_install INSTALL="install -p"
c7a625
find %{buildroot} -name '*.la' -delete
c7a625
c7a625
%{?_without_mesa_glvnd_default:
c7a625
# Avoid conflict with mesa-libGL
c7a625
mkdir -p %{buildroot}%{_libdir}/%{name}/
c7a625
for l in libEGL libGL libGLESv1_CM libGLESv2 libGLX; do
c7a625
  mv %{buildroot}%{_libdir}/${l}.so* \
c7a625
    %{buildroot}%{_libdir}/%{name}/
c7a625
done
c7a625
}
c7a625
c7a625
# Create directory layout
c7a625
mkdir -p %{buildroot}%{_sysconfdir}/glvnd/egl_vendor.d/
c7a625
mkdir -p %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
c7a625
mkdir -p %{buildroot}%{_sysconfdir}/egl/egl_external_platform.d/
c7a625
mkdir -p %{buildroot}%{_datadir}/egl/egl_external_platform.d/
c7a625
c7a625
c7a625
%check
c7a625
export DO_X11_TESTS=1
c7a625
xvfb-run -s '-screen 0 640x480x24' -d make check V=1 || \
c7a625
%ifarch s390 s390x ppc ppc64 ppc64le
c7a625
    :
c7a625
%else
c7a625
    (cat `find . -name test-suite.log` ; exit 1)
c7a625
%endif
c7a625
c7a625
c7a625
%post -p /sbin/ldconfig
c7a625
%postun -p /sbin/ldconfig
c7a625
%files
c7a625
%doc README.md
c7a625
%dir %{_sysconfdir}/glvnd/
c7a625
%dir %{_datadir}/glvnd/
c7a625
%{_libdir}/libGLdispatch.so.0*
c7a625
c7a625
%post opengl -p /sbin/ldconfig
c7a625
%postun opengl -p /sbin/ldconfig
c7a625
%files opengl
c7a625
%{_libdir}/libOpenGL.so.0*
c7a625
c7a625
%post gles -p /sbin/ldconfig
c7a625
%postun gles -p /sbin/ldconfig
c7a625
%files gles
c7a625
%if 0%{?_without_mesa_glvnd_default}
c7a625
%{_libdir}/%{name}/libGLES*.so.*
c7a625
%else
c7a625
%{_libdir}/libGLES*.so.*
c7a625
%endif
c7a625
c7a625
%post glx -p /sbin/ldconfig
c7a625
%postun glx -p /sbin/ldconfig
c7a625
%files glx
c7a625
%if 0%{?_without_mesa_glvnd_default}
c7a625
%{_libdir}/%{name}/libGL.so.*
c7a625
%{_libdir}/%{name}/libGLX.so.*
c7a625
%else
c7a625
%{_libdir}/libGL.so.*
c7a625
%{_libdir}/libGLX.so.*
c7a625
%endif
c7a625
c7a625
%post egl -p /sbin/ldconfig
c7a625
%postun egl -p /sbin/ldconfig
c7a625
%files egl
c7a625
%dir %{_sysconfdir}/glvnd/egl_vendor.d/
c7a625
%dir %{_datadir}/glvnd/egl_vendor.d/
c7a625
%dir %{_sysconfdir}/egl/
c7a625
%dir %{_sysconfdir}/egl/egl_external_platform.d/
c7a625
%dir %{_datadir}/egl/
c7a625
%dir %{_datadir}/egl/egl_external_platform.d/
c7a625
%if 0%{?_without_mesa_glvnd_default}
c7a625
%{_libdir}/%{name}/libEGL*.so.*
c7a625
%else
c7a625
%{_libdir}/libEGL*.so.*
c7a625
%endif
c7a625
c7a625
%files core-devel
c7a625
%dir %{_includedir}/glvnd/
c7a625
%{_includedir}/glvnd/*.h
c7a625
%{_libdir}/pkgconfig/*.pc
c7a625
c7a625
%files devel
c7a625
%{_libdir}/lib*.so
c7a625
%if 0%{?_without_mesa_glvnd_default}
c7a625
%{_libdir}/%{name}/lib*.so
c7a625
%endif
c7a625
c7a625
c7a625
%changelog
c7a625
* Tue Jul 24 2018 Dave Airlie <airlied@redhat.com> - 1.0.1-0.8.git5baa1e5
c7a625
- rename fallback from fedora to system
c7a625
c7a625
* Thu Jun 14 2018 Adam Jackson <ajax@redhat.com> - 1.0.1-0.7.git5baa1e5
c7a625
- Add another fallback GLX library name
c7a625
c7a625
* Thu Apr 26 2018 Adam Jackson <ajax@redhat.com> - 1.0.1-0.6.git5baa1e5
c7a625
- Enable %%check for all but ppc64 and s390x, which has known but low-impact
c7a625
  failures
c7a625
- Simplify %%release
c7a625
c7a625
* Wed Apr 18 2018 Adam Jackson <ajax@redhat.com> - 1.0.1-0.5.20180327git5baa1e5
c7a625
- Go back to Requires: mesa-*, the fallout is too great (#1568881 etc)
c7a625
c7a625
* Fri Apr 13 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:1.0.1-0.4.20180327git5baa1e5
c7a625
- Update snapshot to 20180327
c7a625
c7a625
* Thu Mar 15 2018 Adam Jackson <ajax@redhat.com> - 1.0.1-0.3.20180226gitb029c24
c7a625
- Use Recommends: mesa-* not Requires.
c7a625
- (Trivially) switch the build to python3
c7a625
c7a625
* Thu Mar 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1:1.0.1-0.2.20180226gitb029c24
c7a625
- Update Python 2 dependency declarations to new packaging standards
c7a625
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
c7a625
c7a625
* Wed Feb 28 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:1.0.1-0.1.20180226gitb029c24
c7a625
- Update snapshot to 20180226
c7a625
- Update scriptlets
c7a625
c7a625
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0.0-2
c7a625
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c7a625
c7a625
* Thu Nov 09 2017 Leigh Scott <leigh123linux@googlemail.com> - 1:1.0.0-1
c7a625
- Update to 1.0.0 release
c7a625
c7a625
* Wed Aug 23 2017 Nicolas Chauvet <kwizart@gmail.com> - 1:0.2.999-24.20170818git8d4d03f
c7a625
- Update snapshot to 20170818
c7a625
c7a625
* Mon Aug 14 2017 Ville Skyttä <ville.skytta@iki.fi> - 1:0.2.999-23.20170620gitd850cdd
c7a625
- Own %%{_sysconfdir}/egl and %%{_datadir}/egl dirs
c7a625
c7a625
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.2.999-22.20170620gitd850cdd
c7a625
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c7a625
c7a625
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.2.999-21.20170620gitd850cdd
c7a625
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c7a625
c7a625
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1:0.2.999-20.20170620gitd850cdd
c7a625
- Rebuild due to bug in RPM (RHBZ #1468476)
c7a625
c7a625
* Thu Jul 06 2017 Nicolas Chauvet <kwizart@gmail.com> - 1:0.2.999-19.20170620gitd850cdd
c7a625
- Update snapshot to 20170620
c7a625
c7a625
* Tue Jun 13 2017 Nicolas Chauvet <kwizart@gmail.com> - 1:0.2.999-18.20170607git80d9a87
c7a625
- Update snapshot to 20170607
c7a625
- Default to asm and tls when available
c7a625
- Use the fixed tsd for armhfp and aarch64
c7a625
  fixed in https://github.com/NVIDIA/libglvnd/issues/116
c7a625
c7a625
* Tue Apr 04 2017 Björn Esser <besser82@fedoraproject.org> - 1:0.2.999-17.20170308git8e6e102
c7a625
- Add conditional to disable testsuite, when needed
c7a625
c7a625
* Tue Apr 04 2017 Björn Esser <besser82@fedoraproject.org> - 1:0.2.999-16.20170308git8e6e102
c7a625
- Rebuilt with testsuite again
c7a625
c7a625
* Tue Apr 04 2017 Björn Esser <besser82@fedoraproject.org> - 1:0.2.999-15.20170308git8e6e102
c7a625
- Rebuilt without testssuite
c7a625
c7a625
* Tue Apr 04 2017 Björn Esser <besser82@fedoraproject.org> - 1:0.2.999-14.20170308git8e6e102
c7a625
- Fix conditionals for _without_mesa_glvnd_default
c7a625
- Fix other RHEL-conditionals, too
c7a625
c7a625
* Tue Apr 04 2017 Simone Caronni <negativo17@gmail.com> - 1:0.2.999-13.20170308git8e6e102
c7a625
- Update RPM filters for private libraries (includes GLX, fixes RHEL 6).
c7a625
c7a625
* Mon Apr 03 2017 Simone Caronni <negativo17@gmail.com> - 1:0.2.999-12.20170308git8e6e102
c7a625
- Update to latest snapshot, remove upstreamed patches.
c7a625
- Update release to packaging guidelines format.
c7a625
- Make sure that for Fedora 24 and RHEL the libraries are always private.
c7a625
c7a625
* Thu Feb 23 2017 Nicolas Chauvet <kwizart@gmail.com> - 1:0.2.999-11.gitdc16f8c
c7a625
- asm enabled only for x86 - rhbz#1419944
c7a625
c7a625
* Mon Feb  6 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-10.gitdc16f8c
c7a625
- Drop 0007-GLX-Add-GLX_SGIX_fbconfig-functions.patch the bug this works
c7a625
  around actually is in mesa
c7a625
c7a625
* Thu Feb  2 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-9.gitdc16f8c
c7a625
- Add eglexternalplatform spec. config dirs to -egl subpackage (rhbz#1415143)
c7a625
c7a625
* Thu Feb  2 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-8.gitdc16f8c
c7a625
- Fix GLX_SGIX_fbconfig extension, this fixes games such as "The Binding of
c7a625
  Isaac: Rebirth" and "Crypt of the NecroDancer" from Steam not working
c7a625
c7a625
* Wed Jan 11 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-7.gitdc16f8c
c7a625
- Epoch:1 to provide upgrade path from negativo17.org rpms
c7a625
- New snapshot
c7a625
- Add patches to fix building on ARM (from Rob Clark)
c7a625
- Add BuildRequires: python
c7a625
- Add ldconfig scriptlets for library sub-packages
c7a625
c7a625
* Wed Jan 11 2017 Adam Jackson <ajax@redhat.com>
c7a625
- Don't hide libraries in a subdir (rhbz#1413579)
c7a625
- Split up libraries to appropriate subpackages
c7a625
- Make the req/prov filter catch more cases
c7a625
- Restore libGLESv1 for ABI compliance
c7a625
c7a625
* Wed Oct 26 2016 Leigh Scott <leigh123linux@googlemail.com> - 0.2.999-6.git28867bb
c7a625
- Update snapshot
c7a625
- Fix EGL crash for KDE/Plasma (rfbz#4303)
c7a625
c7a625
* Tue Oct 25 2016 Leigh Scott <leigh123linux@googlemail.com> - 0.2.999-5.git295e5e5
c7a625
- Fix EGL crash (rfbz#4303)
c7a625
c7a625
* Fri Oct 14 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.2.999-4.git295e5e5
c7a625
- Update snapshot
c7a625
c7a625
* Wed Oct 12 2016 Adam Jackson <ajax@redhat.com> - 0.2.999-3.git14f6283
c7a625
- Restore hardened build
c7a625
- Remove ExclusiveArch
c7a625
- Remove some pointless Provides/Obsoletes
c7a625
- BuildRequires pkgconfig(xext) not pkgconfig(xv)
c7a625
- Update description to be a bit more confident
c7a625
- Dump make check errors into the build log
c7a625
c7a625
* Wed Oct 05 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.2.999-2.git14f6283
c7a625
- Add the correct License: MIT
c7a625
c7a625
* Thu Sep 15 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.2.999-1.git14f6283
c7a625
- Update to 2.999 version
c7a625
- Add EGL
c7a625
c7a625
* Fri Sep 02 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.1.1-2.gitf7fbc4b
c7a625
- Update license
c7a625
- Fix Obsoletes/Provides to avoid self obsolete
c7a625
c7a625
* Tue Aug 30 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.1.1-1.gitf7fbc4b
c7a625
- Update to 1.1.gitf7fbc4b
c7a625
c7a625
* Tue Jun 14 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.1.0-4.git093f048
c7a625
- Update to 20160610 git commit
c7a625
c7a625
* Fri May 20 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.1.0-3.gita82982d
c7a625
- Update to current snapshot
c7a625
c7a625
* Fri May 13 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.1.0-2.git509de0d
c7a625
- Update to current snapshot
c7a625
- Remove unused dt-auxiliary
c7a625
- Add support for graphical make test
c7a625
- Undefine hardened build for xorg
c7a625
c7a625
* Wed May 04 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.1.0-1.git8277115
c7a625
- Update to lastest snapshot
c7a625
c7a625
* Thu Feb 18 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-9.git4d977ea
c7a625
- Remove patch to enable by default
c7a625
c7a625
* Wed Feb 17 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-8git20160217
c7a625
- Update to git20160217
c7a625
- Introduce --with mesa-libglvnd-default build conditional
c7a625
- Avoid error on make check - testglxqueryversion.sh stil fails in mock
c7a625
- Filter on provided libGL until glvnd support is in upstream mesa
c7a625
- Use upstream tarball and use autoreconf
c7a625
c7a625
* Fri Jan 15 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-7git20160115
c7a625
- Bump for 20160115
c7a625
- Enable make check
c7a625
- Description improvements
c7a625
- Enable libglvnd by default
c7a625
- Enable devel sub-package
c7a625
c7a625
* Wed Jan 06 2016 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-6git20160106
c7a625
- Update to 20160106 snapshot
c7a625
- Remove 10-x11glvnd
c7a625
c7a625
* Sat Nov 21 2015 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-5git20151121
c7a625
- Update to 20151121 snapshot
c7a625
- Avoid conflicts with mesa-libGL{,ES}
c7a625
- Disable libGLESv1_CM
c7a625
c7a625
* Tue Nov 10 2015 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-4git20151110
c7a625
- Update to today snapshot
c7a625
- Fix license
c7a625
c7a625
* Tue Sep 01 2015 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-3git20150901
c7a625
- Update to snapshot 20150901
c7a625
c7a625
* Fri Aug 07 2015 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-2
c7a625
- Update to today snapshoot
c7a625
c7a625
* Fri Feb  6 2015 Nicolas Chauvet <kwizart@gmail.com> - 0.0.0-1
c7a625
- Initial spec file