#
# TODO:
+# - check if gallium_intel note is still valid, switch the bcond if not
# - consider:
# - subpackage with non-dri libGL for use with X-servers with missing GLX extension?
# - resurrect static if it's useful (using plain xorg target? DRI doesn't support static)
%define libdrm_ver 2.4.39
%define dri2proto_ver 2.6
%define glproto_ver 1.4.14
-#
+
%define snap 20120921
-#
Summary: Free OpenGL implementation
Summary(pl.UTF-8): Wolnodostępna implementacja standardu OpenGL
Name: Mesa
-Version: 9.0
-Release: 0.1
+Version: 9.0.3
+Release: 1
License: MIT (core) and others - see license.html file
Group: X11/Libraries
Source0: ftp://ftp.freedesktop.org/pub/mesa/%{version}/%{name}Lib-%{version}.tar.bz2
-# Source0-md5: 60e557ce407be3732711da484ab3db6c
+# Source0-md5: d7515cc5116c72ac63d735655bd63689
Patch0: %{name}-link.patch
+Patch1: %{name}-llvm3.2-support.patch
URL: http://www.mesa3d.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake
BuildRequires: libtalloc-devel >= 2:2.0.1
BuildRequires: libtool >= 2:2.2
BuildRequires: libvdpau-devel >= 0.4.1
-BuildRequires: libxcb-devel >= 1.8.1
+BuildRequires: libxcb-devel >= 1.9
BuildRequires: llvm-devel >= 3.1
+%{?with_opencl:BuildRequires: llvm-libclc}
BuildRequires: perl-base
BuildRequires: pixman-devel
BuildRequires: pkgconfig
BuildRequires: sed >= 4.0
%{?with_egl:BuildRequires: udev-devel >= 1:150}
# wayland-{client,server}
-%{?with_wayland:BuildRequires: wayland-devel}
+%{?with_wayland:BuildRequires: wayland-devel >= 1.0.0}
BuildRequires: xorg-lib-libXdamage-devel
BuildRequires: xorg-lib-libXext-devel >= 1.0.5
BuildRequires: xorg-lib-libXfixes-devel
%undefine with_wayland
%endif
-# _glapi_tls_Dispatch is defined in libglapi, but it's some kind of symbol ldd -r doesn't notice(?)
-%define skip_post_check_so libGLESv1_CM.so.1.* libGLESv2.so.2.* libGL.so.1.* libXvMCnouveau.so.* libdricore.*.so.* libOSMesa.so.* libdricore.*so.*
+# libGLESv1_CM, libGLESv2, libGL, libOSMesa:
+# _glapi_tls_Dispatch is defined in libglapi, but it's some kind of symbol ldd -r doesn't notice(?)
+# libdricore: internal library, not linked with libglapi
+# libgbm: circular dependency with libEGL (wayland_buffer_is_drm symbol)
+%define skip_post_check_so libGLESv1_CM.so.1.* libGLESv2.so.2.* libGL.so.1.* libOSMesa.so.* libdricore.*.so.* libgbm.*.so.*
# llvm build broken
%define filterout_ld -Wl,--as-needed
# glx driver in libEGL dlopens libGL.so
Requires: OpenGL >= 1.2
Requires: libdrm >= %{libdrm_ver}
+Requires: libxcb >= 1.9
+%{?with_wayland:Requires: wayland >= 1.0.0}
%if %{with gallium}
# for egl_gallium.so
Requires: %{name}-libOpenVG = %{version}-%{release}
License: MIT
Group: Libraries
Requires: libdrm >= %{libdrm_ver}
+Requires: llvm-libclc
Requires: udev-libs >= 1:150
Provides: OpenCL = 1.1
Requires: %{name}-libOpenCL = %{version}-%{release}
%description opencl-driver-radeonsi
-radeonsi driver for Mesa OpenCL implementation. It supports ATI
-Radeon adapters based on Southern Islands chips.
+radeonsi driver for Mesa OpenCL implementation. It supports ATI Radeon
+adapters based on Southern Islands chips.
%description opencl-driver-radeonsi -l pl.UTF-8
Sterownik radeonsi dla implementacji Mesa standardu OpenCL. Obsługuje
Group: Development/Libraries
Requires: %{name}-libwayland-egl = %{version}-%{release}
Requires: libdrm-devel >= %{libdrm_ver}
-Requires: wayland-devel
%description libwayland-egl-devel
Development files for Wayland EGL platform library.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
%endif
%if %{with gallium}
--enable-gallium-llvm \
- --with-llvm-shared-libs \ \
+ --with-llvm-shared-libs \
%{__enable egl gallium-egl} \
%{__enable gbm gallium-gbm} \
%{?with_opencl:--enable-opencl} \
# dlopened by soname
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libXvMC*.so
# not used externally
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{dricore9.0.0,glapi}.so
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib{dricore%{version},glapi}.so
# dlopened
%{__rm} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/dri/*.la
# not defined by standards; and not needed, there is pkg-config support
%attr(755,root,root) %{_libdir}/libOpenCL.so
%{_includedir}/CL
+%if %{with gallium_intel}
+%files opencl-driver-i915
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/opencl/pipe_i915.so
+%endif
+
%if %{with gallium_nouveau}
%files opencl-driver-nouveau
%defattr(644,root,root,755)
%files dri-core
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libdricore9.0.0.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libdricore9.0.0.so.1
+%attr(755,root,root) %{_libdir}/libdricore%{version}.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdricore%{version}.so.1
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drirc
%files dri-driver-ati-radeon-R100