# (until they start to be somehow versioned themselves)
%define glapi_ver 7.1.0
#
-%define libdrm_ver 2.4.23
-%define dri2proto_ver 2.1
+%define libdrm_ver 2.4.25
+%define dri2proto_ver 2.6
%define glproto_ver 1.4.11
#
+%define rel 4
+#
Summary: Free OpenGL implementation
Summary(pl.UTF-8): Wolnodostępna implementacja standardu OpenGL
Name: Mesa
-Version: 7.10.2
-Release: 1%{?with_multigl:.mgl}
+Version: 7.11
+Release: %{rel}%{?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: f5de82852f1243f42cc004039e10b771
+# Source0-md5: ff03aca82d0560009a076a87c888cf13
Patch0: %{name}-realclean.patch
-Patch1: %{name}-selinux.patch
-Patch2: %{name}-git.patch
-Patch3: %{name}-nouveau-updates.patch
-Patch4: %{name}-nouveau-revert.patch
-Patch5: %{name}-nouveau-classic-libdrm.patch
+Patch1: %{name}-git.patch
+Patch2: %{name}-selinux.patch
URL: http://www.mesa3d.org/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
BuildRequires: libstdc++-devel >= 5:3.3.0
BuildRequires: libtalloc-devel >= 2:2.0.1
BuildRequires: libtool >= 2:1.4d
+# for Gallium R300
+BuildRequires: llvm-devel >= 2.9
%{?with_motif:BuildRequires: motif-devel}
BuildRequires: pixman-devel
BuildRequires: pkgconfig
+BuildRequires: pkgconfig(talloc) >= 2.0.1
BuildRequires: python
BuildRequires: python-libxml2
BuildRequires: python-modules
%undefine with_gallium_radeon
%endif
+# unresolved symbol _glapi_tls_Dispatch
+%define skip_post_check_so libGLESv1_CM.so.1.* libGLESv2.so.2.*
+
%description
Mesa is a 3-D graphics library with an API which is very similar to
that of OpenGL(R). To the extent that Mesa utilizes the OpenGL command
Pliki nagłówkowe implementacji Mesa biblioteki EGL.
%package libEGL-static
-Summary: Static Mesa libEGL library
-Summary(pl.UTF-8): Statyczna biblioteka Mesa libEGL
+Summary: Static Mesa EGL library
+Summary(pl.UTF-8): Statyczna biblioteka Mesa EGL
License: MIT
Group: Development/Libraries
Requires: %{name}-libEGL-devel = %{version}-%{release}
Provides: EGL-static = 1.4
%description libEGL-static
-Static Mesa libEGL library.
+Static Mesa EGL library.
%description libEGL-static -l pl.UTF-8
-Statyczna biblioteka Mesa libEGL.
+Statyczna biblioteka Mesa EGL.
%package libGL
Summary: Free Mesa3D implementation of libGL OpenGL library
Group: X11/Libraries
Requires: libdrm >= %{libdrm_ver}
Provides: OpenGL = 2.1
-# reports version 1.3, but supports glXGetProcAddress() from 1.4
Provides: OpenGL-GLX = 1.4
Obsoletes: Mesa
Obsoletes: Mesa-dri
Statyczna biblioteka libGL z projektu Mesa3D. Używa programowego
renderingu.
+%package libGLES
+Summary: Mesa implementation of GLES (OpenGL ES) libraries
+Summary(pl.UTF-8): Implementacja Mesa bibliotek GLES (OpenGL ES)
+Group: Libraries
+
+%description libGLES
+This package contains shared libraries of Mesa implementation of GLES
+(OpenGL ES) - cross-platform API for full-function 2D and 3D graphics
+on embedded systems. OpenGL ES specification can be found on Khronos
+Group site: <http://www.khronos.org/opengles/>. Mesa implements OpenGL
+ES 1.1 and 2.0.
+
+%description libGLES -l pl.UTF-8
+Ten pakiet zawiera biblioteki współdzielone implementacji Mesa
+standardu GLES (OpenGL ES) - wieloplatformowego API do w pełni
+funkcjonalnej grafiki 2D i 3D na systemach wbudowanych. Specyfikację
+OpenGL ES można znaleźć na stronie Khronos Group:
+<http://www.khronos.org/opengles/>. Mesa zawiera implementacją OpenGL
+ES 1.1 i 2.0.
+
+%package libGLES-devel
+Summary: Header files for Mesa GLES libraries
+Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Mesa GLES
+Group: Development/Libraries
+Requires: %{name}-libGLES = %{version}-%{release}
+
+%description libGLES-devel
+Header files for Mesa GLES libraries.
+
+%description libGLES-devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek Mesa GLES.
+
%package libGLU
Summary: SGI implementation of libGLU OpenGL library
Summary(pl.UTF-8): Implementacja SGI biblioteki libGLU ze standardu OpenGL
%description libOSMesa-static -l pl.UTF-8
Biblioteka statyczna OSMesa (renderująca bitmapy w pamięci).
+%package libOpenVG
+Summary: Mesa implementation of OpenVG (Vector Graphics Accelleration) API
+Summary(pl.UTF-8): Implementacja Mesa API OpenVG (akceleracji grafiki wektorowej)
+License: MIT
+Group: Libraries
+# doesn't require base
+
+%description libOpenVG
+This package contains Mesa implementation of OpenVG - cross-platform
+API that provides a low-level hardware acceleration interface for
+vector graphics libraries such as Flash and SVG. OpenVG specification
+can be found on Khronos Group site: <http://www.khronos.org/openvg/>.
+Mesa implements OpenVG 1.1.
+
+%description libOpenVG -l pl.UTF-8
+Ten pakiet zawiera implementację Mesa standardu OpenVG -
+wieloplatfomowego API zapewniającego niskopoziomowy interfejs
+akceleracji sprzętowej dla bibliotek grafiki wektorowej, takiej
+jak Flash czy SVG. Specyfikację OpenVG można znaleźć na stronie
+Khronos Group: <http://www.khronos.org/openvg/>. Mesa zawiera
+implementację OpenVG w wersji 1.1.
+
+%package libOpenVG-devel
+Summary: Header file for Mesa OpenVG library
+Summary(pl.UTF-8): Plik nagłówkowy biblioteki Mesa OpenVG
+License: MIT
+Group: Development/Libraries
+# for <KHR/khrplatform.h>
+Requires: %{name}-libEGL-devel = %{version}-%{release}
+Requires: %{name}-libOpenVG = %{version}-%{release}
+
+%description libOpenVG-devel
+Header file for Mesa OpenVG library.
+
+%description libOpenVG-devel -l pl.UTF-8
+Plik nagłówkowy biblioteki Mesa OpenVG.
+
%package utils
Summary: OpenGL utilities from Mesa3D
Summary(pl.UTF-8): Programy narzędziowe OpenGL z projektu Mesa3D
%setup -q
%patch0 -p0
%patch1 -p1
-#patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
+%patch2 -p1
%build
%{__aclocal}
%{__autoconf}
-dri_drivers="i810 i965 mach64 mga r128 \
+dri_drivers="i810 mach64 mga r128 r200 radeon \
%if %{without gallium_radeon}
-r200 r300 r600 radeon \
+r300 r600 \
%endif
savage \
%if %{without gallium_intel}
-i915 \
+i915 i965 \
%endif
%ifarch sparc sparcv9 sparc64
ffb \
dri_drivers=$(echo $dri_drivers | xargs | tr ' ' ',')
+gallium_drivers="svga swrast \
+%if %{with gallium_intel}
+i915 \
+i965 \
+%endif
+%if %{with gallium_radeon}
+radeon \
+r600 \
+%endif
+%if %{with gallium_nouveau}
+nouveau \
+%endif
+"
+
+gallium_drivers=$(echo $gallium_drivers | xargs | tr ' ' ',')
+
common_flags="\
--enable-shared \
--enable-selinux \
--enable-pic \
--enable-glx-tls \
--disable-glut \
- --disable-os-mesa \
- --%{?with_egl:en}%{!?with_egl:dis}able-egl"
+%if %{with egl}
+ --enable-egl \
+ --enable-gles1 \
+ --enable-gles2 \
+%endif
+"
osmesa_common_flags="\
--with-driver=osmesa \
--disable-asm \
- --disable-glu"
+ --disable-glu \
+ --disable-egl"
%if %{with osmesa}
-# osmesa variants
%configure $common_flags $osmesa_common_flags \
--with-osmesa-bits=8
%{__make}
mv %{_lib} osmesa8
%{__make} clean
-
-%configure $common_flags $osmesa_common_flags \
- --with-osmesa-bits=16
-%{__make}
-mv %{_lib} osmesa16
-%{__make} clean
-
-%configure $common_flags $osmesa_common_flags \
- --with-osmesa-bits=32
-%{__make}
-mv %{_lib} osmesa32
-%{__make} clean
%endif
%configure $common_flags \
%if %{with gallium}
- --enable-gallium \
- --%{?with_gallium_intel:en}%{!?with_gallium_intel:dis}able-gallium-intel \
- --%{?with_gallium_radeon:en}%{!?with_gallium_radeon:dis}able-gallium-radeon \
- --enable-gallium-svga \
- %{?with_gallium_nouveau:--enable-gallium-nouveau} \
- --with-state-trackers=dri,glx \
+ --enable-openvg \
+ --enable-gallium-egl \
+ --with-gallium-drivers=${gallium_drivers} \
%else
--disable-gallium \
%endif
DESTDIR=$RPM_BUILD_ROOT
%if %{with osmesa}
-install osmesa*/*OSMesa* $RPM_BUILD_ROOT%{_libdir}
+cp -Pp osmesa*/*OSMesa* $RPM_BUILD_ROOT%{_libdir}
%endif
rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/{.deps,CVS,Makefile.{BeOS*,win,cygnus,DJ,dja}}
cd $RPM_BUILD_ROOT%{_libdir}
cd $olddir
+%if %{with gallium}
+# use gallium swrastg as swrast
+mv $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri/swrastg_dri.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri/swrast_dri.so
+%endif
+
%if %{with multigl}
install -d $RPM_BUILD_ROOT{%{_libdir}/Mesa,%{_sysconfdir}/ld.so.conf.d}
%post libGL -p /sbin/ldconfig
%postun libGL -p /sbin/ldconfig
+%post libGLES -p /sbin/ldconfig
+%postun libGLES -p /sbin/ldconfig
+
%post libGLU -p /sbin/ldconfig
%postun libGLU -p /sbin/ldconfig
%post libGLw -p /sbin/ldconfig
%postun libGLw -p /sbin/ldconfig
+%post libOSMesa -p /sbin/ldconfig
+%postun libOSMesa -p /sbin/ldconfig
+
+%post libOpenVG -p /sbin/ldconfig
+%postun libOpenVG -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.1
+%attr(755,root,root) %{_libdir}/libglapi.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libglapi.so.0
+%if %{with gallium}
%dir %{_libdir}/egl
-%attr(755,root,root) %{_libdir}/egl/egl_dri2.so
-%attr(755,root,root) %{_libdir}/egl/egl_glx.so
+%attr(755,root,root) %{_libdir}/egl/egl_gallium.so
+%attr(755,root,root) %{_libdir}/egl/st_GL.so
+%if %{with gallium_radeon}
+%attr(755,root,root) %{_libdir}/egl/pipe_r300.so
+%attr(755,root,root) %{_libdir}/egl/pipe_r600.so
+%endif
+%if %{with gallium_intel}
+%attr(755,root,root) %{_libdir}/egl/pipe_i915.so
+%attr(755,root,root) %{_libdir}/egl/pipe_i965.so
+%endif
+%endif
%files libEGL-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libEGL.so
+%attr(755,root,root) %{_libdir}/libglapi.so
%dir %{_includedir}/EGL
%{_includedir}/EGL/egl.h
%{_includedir}/EGL/eglext.h
%{_libdir}/libGL.a
%endif
+%files libGLES
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libGLESv1_CM.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGLESv1_CM.so.1
+%attr(755,root,root) %{_libdir}/libGLESv2.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGLESv2.so.2
+
+%files libGLES-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libGLESv1_CM.so
+%attr(755,root,root) %{_libdir}/libGLESv2.so
+%{_includedir}/GLES
+%{_includedir}/GLES2
+%{_pkgconfigdir}/glesv1_cm.pc
+%{_pkgconfigdir}/glesv2.pc
+
%files libGLU
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libGLU.so.*.*
%if %{with osmesa}
%files libOSMesa
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libOSMesa*.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libOSMesa*.so.7
+%attr(755,root,root) %{_libdir}/libOSMesa.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libOSMesa.so.7
%files libOSMesa-devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libOSMesa*.so
+%attr(755,root,root) %{_libdir}/libOSMesa.so
%{_includedir}/GL/osmesa.h
%if %{with static}
%files libOSMesa-static
%defattr(644,root,root,755)
-%{_libdir}/libOSMesa*.a
+%{_libdir}/libOSMesa.a
%endif
%endif
+%if %{with gallium}
+%files libOpenVG
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libOpenVG.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libOpenVG.so.1
+
+%files libOpenVG-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libOpenVG.so
+%{_includedir}/VG
+%{_pkgconfigdir}/vg.pc
+%endif
+
%files dri-driver-ati-mach64
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/xorg/modules/dri/mach64_dri.so
%files dri-driver-intel-i965
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/xorg/modules/dri/i965_dri.so
+%if %{with gallium_intel}
+%attr(755,root,root) %{_libdir}/xorg/modules/drivers/i965g_drv.so
+%endif
%files dri-driver-matrox
%defattr(644,root,root,755)
%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/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)