# TODO:
# - subpackage with non-dri libGL for use with X-servers with missing GLX extension?
# - resurrect static if it's useful
-# - subpackage egl?
#
# Conditional build:
-%bcond_without demos # don't build demos
-%bcond_with egl # don't build egl
-%bcond_without gallium # don't build gallium
-%bcond_with gallium_intel # gallium i915 driver (but doesn't work with AIGLX)
-%bcond_with gallium_nouveau # gallium nouveau driver
-%bcond_without motif # build static libGLw without Motif interface
-%bcond_with multigl # package libGL in a way allowing concurrent install with nvidia/fglrx drivers
-%bcond_without osmesa # don't build osmesa
-%bcond_with static # build static libraries
+%bcond_without egl # build egl
+%bcond_without gallium # don't build gallium
+%bcond_with gallium_intel # gallium i915 driver (but doesn't work with AIGLX)
+%bcond_without gallium_nouveau
+%bcond_without motif # build static libGLw without Motif interface
+%bcond_with multigl # package libGL in a way allowing concurrent install with nvidia/fglrx drivers
+%bcond_without osmesa # don't build osmesa
+%bcond_with static
#
# minimal supported xserver version
-%if %{with gallium}
-%define xserver_ver 1.6.0
-%else
%define xserver_ver 1.5.0
-%endif
-
# glapi version (glapi tables in dri drivers and libglx must be in sync);
# set to current Mesa version on ABI break, when xserver tables get regenerated
# (until they start to be somehow versioned themselves)
%define glapi_ver 7.1.0
#
-%define libdrm_ver 2.4.19
-%define dri2proto_ver 2.1
+%define libdrm_ver 2.4.21
+%define dri2proto_ver 1.99.3
%define glproto_ver 1.4.11
#
Summary: Free OpenGL implementation
Summary(pl.UTF-8): Wolnodostępna implementacja standardu OpenGL
Name: Mesa
-Version: 7.8.2
-Release: 2%{?with_multigl:.mgl}
+Version: 7.9
+Release: 1%{?with_multigl:.mgl}
License: MIT (core), SGI (GLU,libGLw) and others - see license.html file
Group: X11/Libraries
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}Lib-%{version}.tar.bz2
-# Source0-md5: 6be2d343a0089bfd395ce02aaf8adb57
-Source1: ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}Demos-%{version}.tar.bz2
-# Source1-md5: 757d9e2e06f48b1a52848be9b0307ced
+# Source0-md5: 82c740c49d572baa6da2b1a1eee90bca
Patch0: %{name}-realclean.patch
-Patch1: %{name}-tgsi_dump.patch
-Patch2: intel-fix-invalidate-before-initialisation.diff
+Patch1: %{name}-selinux.patch
URL: http://www.mesa3d.org/
-%{?with_demos:BuildRequires: OpenGL-glut-devel >= 3.8}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: expat-devel
-#%%{?with_demos:BuildRequires: glew-devel}
BuildRequires: libdrm-devel >= %{libdrm_ver}
BuildRequires: libselinux-devel
BuildRequires: libstdc++-devel
%{?with_motif:BuildRequires: motif-devel}
BuildRequires: pixman-devel
BuildRequires: pkgconfig
+BuildRequires: pkgconfig(talloc) >= 2.0.1
BuildRequires: python
BuildRequires: python-modules
BuildRequires: rpmbuild(macros) >= 1.470
BuildRequires: xorg-proto-dri2proto-devel >= %{dri2proto_ver}
BuildRequires: xorg-proto-glproto-devel >= %{glproto_ver}
BuildRequires: xorg-util-makedepend
-BuildRequires: xorg-xserver-server-devel >= %{xserver_ver}
+BuildRequires: xorg-xserver-server-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%if %{without gallium}
OpenGL od SGI i nie twierdzi, że Mesa jest kompatybilnym zamiennikiem
OpenGL ani powiązana z SGI.
+%package libEGL
+Summary: SGI implementation of libEGL OpenGL library
+Summary(pl.UTF-8): Implementacja SGI biblioteki libEGL ze standardu OpenGL
+License: SGI Free Software License B v2.0 (MIT-like)
+Group: Libraries
+Requires: OpenGL >= 1.2
+Provides: OpenGL-EGL = 1.0
+
+%description libEGL
+SGI implementation of libEGL OpenGL library.
+
+%description libEGL -l pl.UTF-8
+Implementacja SGI biblioteki libEGL ze standardu OpenGL.
+
+%package libEGL-devel
+Summary: Header files for SGI libEGL library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki SGI libEGL
+License: SGI Free Software License B v2.0 (MIT-like)
+Group: Development/Libraries
+Requires: %{name}-libEGL = %{version}-%{release}
+Requires: OpenGL-devel >= 1.2
+Requires: libstdc++-devel
+Provides: OpenGL-EGL-devel = 1.0
+
+%description libEGL-devel
+Header files for SGI libEGL library.
+
+%description libEGL-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki SGI libEGL.
+
+%package libEGL-static
+Summary: Static SGI libEGL library
+Summary(pl.UTF-8): Statyczna biblioteka SGI libEGL
+License: SGI Free Software License B v2.0 (MIT-like)
+Group: Development/Libraries
+Requires: %{name}-libEGL-devel = %{version}-%{release}
+Provides: OpenGL-EGL-static = 1.0
+
+%description libEGL-static
+Static SGI libEGL library.
+
+%description libEGL-static -l pl.UTF-8
+Statyczna biblioteka SGI libEGL.
+
%package libGL
Summary: Free Mesa3D implementation of libGL OpenGL library
Summary(pl.UTF-8): Wolnodostępna implementacja Mesa3D biblioteki libGL ze standardu OpenGL
%description utils -l pl.UTF-8
Programy narzędziowe OpenGL z projektu Mesa3D: glxgears i glxinfo.
-%package demos
-Summary: Mesa Demos source code
-Summary(pl.UTF-8): Kod źródłowy programów demonstrujących dla bibliotek Mesa
-License: various (MIT, SGI, GPL - see copyright notes in sources)
-Group: Development/Libraries
-Requires: OpenGL-devel
-
-%description demos
-Demonstration programs for the Mesa libraries in source code form.
-
-%description demos -l pl.UTF-8
-Kod źródłowy programów demonstracyjnych dla bibliotek Mesa.
-
%package dri-driver-ati-mach64
Summary: X.org DRI driver for ATI Mach64 card family
Summary(pl.UTF-8): Sterownik X.org DRI dla rodziny kart ATI Mach64
Sterownik X.org DRI dla VMware.
%prep
-%setup -q -b1
+%setup -q
%patch0 -p0
-%patch1 -p1
-%patch2 -p1
-
-# fix demos
-find progs -type f|xargs sed -i -e "s,\.\./images/,%{_examplesdir}/%{name}-%{version}/images/,g"
+%patch1 -p0
%build
-autoreconf --install
-#%{__aclocal}
-#%{__autoconf}
+#autoreconf --install
+%{__aclocal}
+%{__autoconf}
dri_drivers="i810 i965 mach64 mga r128 r200 r300 r600 radeon savage \
%if %{without gallium_intel}
--enable-glx-tls \
--disable-glut \
--disable-os-mesa \
- --%{?with_egl:en}%{!?with_egl:dis}able-egl \
- --with%{!?with_demos:out}-demos"
+ --%{?with_egl:en}%{!?with_egl:dis}able-egl"
osmesa_common_flags="\
--with-driver=osmesa \
--%{?with_gallium_intel:en}%{!?with_gallium_intel:dis}able-gallium-intel \
--enable-gallium-svga \
%{?with_gallium_nouveau:--enable-gallium-nouveau} \
- --with-state-trackers=dri,xorg,glx \
+ --with-state-trackers=dri,glx \
%else
--disable-gallium \
%endif
--with-dri-driverdir=%{_libdir}/xorg/modules/dri
%{__make}
-%{__make} -C progs/xdemos glxgears glxinfo
-%if %{with demos}
-%{__make} -C progs/demos
-%endif
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_examplesdir}/%{name}-%{version}}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
# libs without drivers
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
%if %{with osmesa}
-rm -f osmesa*/libGLEW.*
-install osmesa*/* $RPM_BUILD_ROOT%{_libdir}
+install osmesa*/*OSMesa* $RPM_BUILD_ROOT%{_libdir}
%endif
-install progs/xdemos/{glxgears,glxinfo} $RPM_BUILD_ROOT%{_bindir}
-# work on copy to keep -bi --short-circuit working
-rm -rf progs-clean
-install -d progs-clean
-for l in demos glsl osdemos redbook samples xdemos ; do
- cp -a progs/$l progs-clean/$l
- %{__make} -C progs-clean/$l clean
- cp -Rf progs-clean/$l $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$l
-done
-rm -rf progs-clean
-for l in util images ; do
- cp -Rf progs/$l $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/$l
-done
rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
# strip out undesirable headers
%clean
rm -rf $RPM_BUILD_ROOT
+%post libEGL -p /sbin/ldconfig
+%postun libEGL -p /sbin/ldconfig
+
%post libGL -p /sbin/ldconfig
%postun libGL -p /sbin/ldconfig
%post libGLw -p /sbin/ldconfig
%postun libGLw -p /sbin/ldconfig
+%if %{with egl}
+%files libEGL
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libEGL.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libEGL.so.?
+%dir %{_libdir}/egl
+%attr(755,root,root) %{_libdir}/egl/egl_dri2.so
+%attr(755,root,root) %{_libdir}/egl/egl_glx.so
+
+%files libEGL-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libEGL.so
+%attr(755,root,root) %ghost %{_libdir}/libEGL.so.?
+%dir %{_includedir}/EGL
+%{_includedir}/EGL/egl.h
+%{_includedir}/EGL/eglext.h
+%{_includedir}/EGL/eglplatform.h
+%dir %{_includedir}/KHR
+%{_includedir}/KHR/khrplatform.h
+%{_pkgconfigdir}/egl.pc
+
+%if %{with static}
+%files libEGL-static
+%defattr(644,root,root,755)
+%{_libdir}/libEGL.a
+%endif
+%endif
+
%files libGL
%defattr(644,root,root,755)
%doc docs/{*.html,README.{3DFX,GGI,MITS,QUAKE,THREADS},RELNOTES*}
%files libGLU
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libGLU.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libGLU.so.1
+%attr(755,root,root) %ghost %{_libdir}/libGLU.so.?
%files libGLU-devel
%defattr(644,root,root,755)
%files libGLw
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libGLw.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libGLw.so.1
+%attr(755,root,root) %ghost %{_libdir}/libGLw.so.?
%files libGLw-devel
%defattr(644,root,root,755)
%endif
%endif
-%files utils
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/glxgears
-%attr(755,root,root) %{_bindir}/glxinfo
-
%files dri-driver-ati-mach64
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/xorg/modules/dri/mach64_dri.so
%if %{with gallium_nouveau}
%files dri-driver-nouveau
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/xorg/modules/drivers/modesetting_drv.so
+#%attr(755,root,root) %{_libdir}/xorg/modules/drivers/modesetting_drv.so
%attr(755,root,root) %{_libdir}/xorg/modules/dri/nouveau_dri.so
%endif
%endif
%files dri-driver-swrast
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/xorg/modules/dri/swrast_dri.so
+%attr(755,root,root) %{_libdir}/xorg/modules/dri/swrastg_dri.so
%files dri-driver-tdfx
%defattr(644,root,root,755)
%if %{with gallium}
%files dri-driver-vmwgfx
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/xorg/modules/drivers/vmwgfx_drv.so
%attr(755,root,root) %{_libdir}/xorg/modules/dri/vmwgfx_dri.so
%endif
-
-%if %{with demos}
-%files demos
-%defattr(644,root,root,755)
-%{_examplesdir}/%{name}-%{version}
-%endif