+# TODO: libtizonia >= 0.10.0 as an alternative for bellagio?
#
# Conditional build:
%bcond_without gallium # gallium drivers
%bcond_without gbm # Graphics Buffer Manager
%bcond_without nine # Nine Direct3D 9+ state tracker (for Wine)
%bcond_without opencl # OpenCL support
+%bcond_without ocl_icd # OpenCL as ICD (installable client driver)
%bcond_with glvnd # OpenGL vendor neutral dispatcher support
%bcond_without omx # OpenMAX (Bellagio OMXIL) support
%bcond_without va # VA library
# (until they start to be somehow versioned themselves)
%define glapi_ver 7.1.0
# other packages
-%define libdrm_ver 2.4.95
+%define libdrm_ver 2.4.97
%define dri2proto_ver 2.8
%define glproto_ver 1.4.14
%define zlib_ver 1.2.8
%define wayland_ver 1.11
-%define llvm_ver 6.0.0
+%define llvm_ver 7.0.0
%define gcc_ver 6:4.8.0
%if %{without gallium}
%undefine with_wayland
%endif
+%if %{without opencl}
+%undefine with_ocl_icd
+%endif
+
Summary: Free OpenGL implementation
Summary(pl.UTF-8): Wolnodostępna implementacja standardu OpenGL
Name: Mesa
-Version: 18.3.0
-Release: 0.1
+Version: 19.0.6
+Release: 1
License: MIT (core) and others - see license.html file
Group: X11/Libraries
#Source0: ftp://ftp.freedesktop.org/pub/mesa/mesa-%{version}.tar.xz
## Source0-md5: 7c61a801311fb8d2f7b3cceb7b5cf308
Source0: https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-%{version}/mesa-mesa-%{version}.tar.bz2
-# Source0-md5: f57785009d23751324e4585678b7f3d0
+# Source0-md5: cedec874ddab11a8650e9a405e335036
+Patch0: nouveau_no_rtti.patch
URL: http://www.mesa3d.org/
-BuildRequires: meson >= 0.45
-BuildRequires: ninja
%{?with_opencl:BuildRequires: clang-devel >= %{llvm_ver}}
BuildRequires: elfutils-devel
BuildRequires: expat-devel >= 1.95
%{?with_radv:BuildRequires: llvm-devel >= %{llvm_ver}}
%{?with_opencl:BuildRequires: llvm-libclc}
%{?with_omx:BuildRequires: libomxil-bellagio-devel}
+BuildRequires: meson >= 0.45
+BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
BuildRequires: pkgconfig(talloc) >= 2.0.1
BuildRequires: pkgconfig(xcb-dri2) >= 1.8
BuildRequires: xorg-lib-libXdamage-devel >= 1.1
BuildRequires: xorg-lib-libXext-devel >= 1.0.5
BuildRequires: xorg-lib-libXfixes-devel
+BuildRequires: xorg-lib-libXrandr-devel >= 1.3
BuildRequires: xorg-lib-libXvMC-devel >= 1.0.6
BuildRequires: xorg-lib-libXxf86vm-devel
BuildRequires: xorg-lib-libxshmfence-devel >= 1.1
BuildRequires: xorg-proto-dri2proto-devel >= %{dri2proto_ver}
BuildRequires: xorg-proto-glproto-devel >= %{glproto_ver}
%if %{with gallium}
-%{?with_lm_sensors:BuildRequires: lm_sensors-devel >= 4.0}
+%{?with_lm_sensors:BuildRequires: lm_sensors-devel}
%endif
BuildRequires: zlib-devel >= %{zlib_ver}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# libGLESv1_CM, libGLESv2, libGL, libOSMesa:
# _glapi_tls_Dispatch is defined in libglapi, but it's some kind of symbol ldd -r doesn't notice(?)
-# 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.* libgbm.*.so.* libGLX_mesa.so.0.*
-
-## llvm build broken
-#%%define filterout_ld -Wl,--as-needed
+%define skip_post_check_so libGLESv1_CM.so.1.* libGLESv2.so.2.* libGL.so.1.* libOSMesa.so.* libGLX_mesa.so.0.*
%description
Mesa is a 3-D graphics library with an API which is very similar to
Group: Libraries
Requires: libdrm >= %{libdrm_ver}
Requires: libxcb >= 1.13
+Requires: xorg-lib-libXrandr >= 1.3
Requires: xorg-lib-libxshmfence >= 1.1
# wayland-client
Requires: wayland >= %{wayland_ver}
Group: Libraries
Requires: libdrm >= %{libdrm_ver}
Requires: libxcb >= 1.13
+Requires: xorg-lib-libXrandr >= 1.3
Requires: xorg-lib-libxshmfence >= 1.1
# wayland-client
Requires: wayland >= %{wayland_ver}
%prep
%setup -q -n mesa-mesa-%{version}
+%patch0 -p1
+
%build
+%if %{with opencl}
+if [ "$(llvm-config --has-rtti)" != "YES" ] ; then
+ echo "Clover (gallium OpenCL) requires LLVM with RTTI!"
+ exit 1
+fi
+%endif
+
dri_drivers="nouveau r100 r200 \
%if %{without gallium}
swrast
dri_drivers=$(echo $dri_drivers | xargs | tr ' ' ',')
-gallium_drivers="svga virgl \
-swrast
+gallium_drivers="virgl swrast \
+%ifarch %{ix86} %{x8664} x32
+svga \
+%endif
%if %{with gallium_radeon}
r300 r600 radeonsi \
%endif
%if %{with gallium_nouveau}
nouveau
%endif
-%ifarch %{arm}
+%ifarch %{arm} aarch64
etnaviv \
freedreno \
-imx \
+kmsro \
+tegra \
+v3d \
vc4 \
%endif
"
-Ddri3=true \
-Ddri-drivers=${dri_drivers} \
-Ddri-drivers-path=%{_libdir}/xorg/modules/dri \
+ -Degl=%{?with_egl:true}%{!?with_egl:false} \
-Dgallium-drivers=${gallium_drivers} \
%{?with_hud_extra:-Dgallium-extra-hud=true} \
+ -Dgallium-nine=%{?with_nine:true}%{!?with_nine:false} \
+ -Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \
+%if %{with opencl}
+%if %{with ocl_icd}
+ -Dgallium-opencl=icd \
+%else
+ -Dgallium-opencl=standalone \
+%endif
+%else
+ -Dgallium-opencl=disabled \
+%endif
+ -Dgallium-va=%{?with_va:true}%{!?with_va:false} \
-Dgallium-vdpau=true \
-Dgallium-xvmc=true \
- -Dgallium-omx=%{?with_omx:bellagio}%{?!with_omx:disabled} \
- -Dgallium-va=%{?with_va:true}%{?!with_va:false} \
- -Dva-libs-path=%{_libdir}/libva/dri \
- -Dgallium-xa=%{?with_xa:true}%{?!with_xa:false} \
- -Dgallium-nine=%{?with_nine:true}%{?!with_nine:false} \
- -Dgallium-opencl=%{?with_opencl:icd}%{?!with_opencl:disabled} \
- -Dvulkan-drivers=${vulkan_drivers} \
- -Dvulkan-icd-dir=/usr/share/vulkan/icd.d \
- -Dgbm=%{?with_gbm:true}%{?!with_gbm:false} \
- -Degl=%{?with_egl:true}%{?!with_egl:false} \
- -Dglvnd=%{?with_glvnd:true}%{?!with_glvnd:false} \
+ -Dgallium-xa=%{?with_xa:true}%{!?with_xa:false} \
+ -Dgbm=%{?with_gbm:true}%{!?with_gbm:false} \
+ -Dglvnd=%{?with_glvnd:true}%{!?with_glvnd:false} \
-Dlibunwind=true \
- -Dlmsensors=%{?with_lm_sensors:true}%{?!with_lm_sensors:false} \
+ -Dlmsensors=%{?with_lm_sensors:true}%{!?with_lm_sensors:false} \
+ -Dosmesa=%{?with_gallium:gallium}%{!?with_gallium:classic} \
-Dselinux=true \
- -Dosmesa=%{?with_gallium:gallium}%{?!with_gallium:classic}
+ -Dva-libs-path=%{_libdir}/libva/dri \
+ -Dvulkan-drivers=${vulkan_drivers} \
+ -Dvulkan-icd-dir=/usr/share/vulkan/icd.d
%meson_build -C build
%meson_install -C build
-# dlopened by soname
-%{?with_gallium:%{__rm} $RPM_BUILD_ROOT%{_libdir}/libXvMC*.so}
-%{?with_gallium:%{__rm} $RPM_BUILD_ROOT%{_libdir}/libXvMC*.so.1.0}
-# dlopened by soname or .so link
-%{?with_gallium:%{__rm} $RPM_BUILD_ROOT%{_libdir}/vdpau/libvdpau_*.so.1.0}
# not used externally
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libglapi.so
-# dlopened
-%{?with_omx:%{__rm} $RPM_BUILD_ROOT%{_libdir}/bellagio/libomx_*.la}
-%{?with_nine:%{__rm} $RPM_BUILD_ROOT%{_libdir}/d3d/d3dadapter9.la}
-%{?with_gallium:%{__rm} $RPM_BUILD_ROOT%{_libdir}/gallium-pipe/pipe_*.la}
-# not defined by standards; and not needed, there is pkg-config support
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
%if %{without glvnd}
# remove "OS ABI: Linux 2.4.20" tag, so private copies (nvidia or fglrx),
# (and dlopen libGL.so instead of libGL.so.1; the same does Mesa libEGL)
%attr(755,root,root) %{_libdir}/libGL.so
%endif
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/drirc
+%{_datadir}/drirc.d
%files libGL-devel
%defattr(644,root,root,755)
%if %{with gallium_nouveau}
%files libXvMC-nouveau
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libXvMCnouveau.so.1.0.0
-%attr(755,root,root) %ghost %{_libdir}/libXvMCnouveau.so.1
+%attr(755,root,root) %{_libdir}/libXvMCnouveau.so
%endif
%if %{with gallium_radeon}
%files libXvMC-r600
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libXvMCr600.so.1.0.0
-%attr(755,root,root) %ghost %{_libdir}/libXvMCr600.so.1
+%attr(755,root,root) %{_libdir}/libXvMCr600.so
%endif
%if %{with va}
%endif
%if %{with gallium}
+%if %{with opencl}
%ifarch %{arm}
%files pipe-driver-msm
%defattr(644,root,root,755)
%files pipe-driver-vmwgfx
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/gallium-pipe/pipe_vmwgfx.so
+%endif
+# currently disabled as cannot be built with swrast
+%if 0
%ifarch %{x8664}
%files swr
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libswrAVX2.so
%endif
%endif
+%endif
%if %{with nine}
%files d3d
%files -n libvdpau-driver-mesa-nouveau
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nouveau.so.1.0.0
+%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nouveau.so.1.0
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nouveau.so.1
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nouveau.so
%endif
%files -n libvdpau-driver-mesa-r300
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r300.so.1.0.0
+%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r300.so.1.0
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r300.so.1
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r300.so
%files -n libvdpau-driver-mesa-r600
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r600.so.1.0.0
+%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r600.so.1.0
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r600.so.1
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_r600.so
%files -n libvdpau-driver-mesa-radeonsi
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_radeonsi.so.1.0.0
+%attr(755,root,root) %{_libdir}/vdpau/libvdpau_radeonsi.so.1.0
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_radeonsi.so.1
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_radeonsi.so
%endif