X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=Mesa.spec;h=cd7039ce894813d420944b0604fab5bfb8f24556;hb=d91f0cac64c29471ece2b77b305fb6b045cf11f1;hp=ceef13856dd8432d3b6c5c1da75685fe3d90cdd4;hpb=1ea9613cb89f54f3df70b20d782d05aea24919df;p=packages%2FMesa.git diff --git a/Mesa.spec b/Mesa.spec index ceef138..cd7039c 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -1,3 +1,4 @@ +# TODO: libtizonia >= 0.10.0 as an alternative for bellagio? # # Conditional build: %bcond_without gallium # gallium drivers @@ -7,6 +8,7 @@ %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 @@ -44,20 +46,23 @@ %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: 18.3.4 +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: 64fefeab30a36fd64be935e66c450154 +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 @@ -75,6 +80,8 @@ BuildRequires: libxcb-devel >= 1.13 %{?with_radv:BuildRequires: llvm-devel >= %{llvm_ver}} %{?with_opencl:BuildRequires: llvm-libclc} %{?with_omx:BuildRequires: libomxil-bellagio-devel} +BuildRequires: meson >= 0.45 +BuildRequires: ninja BuildRequires: pkgconfig BuildRequires: pkgconfig(talloc) >= 2.0.1 BuildRequires: pkgconfig(xcb-dri2) >= 1.8 @@ -106,11 +113,7 @@ 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 @@ -1172,8 +1175,17 @@ radv - eksperymentalny sterownik Vulkan dla GPU firmy AMD. %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 @@ -1193,10 +1205,13 @@ r300 r600 radeonsi \ %if %{with gallium_nouveau} nouveau %endif -%ifarch %{arm} +%ifarch %{arm} aarch64 etnaviv \ freedreno \ imx \ +pl111 \ +tegra \ +v3d \ vc4 \ %endif " @@ -1216,25 +1231,33 @@ vulkan_drivers=$(echo $vulkan_drivers | xargs | tr ' ' ',') -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 @@ -1245,19 +1268,8 @@ rm -rf $RPM_BUILD_ROOT %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), @@ -1339,7 +1351,7 @@ rm -rf $RPM_BUILD_ROOT # (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) @@ -1414,15 +1426,13 @@ rm -rf $RPM_BUILD_ROOT %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} @@ -1562,6 +1572,7 @@ rm -rf $RPM_BUILD_ROOT %endif %if %{with gallium} +%if %{with opencl} %ifarch %{arm} %files pipe-driver-msm %defattr(644,root,root,755) @@ -1595,7 +1606,10 @@ rm -rf $RPM_BUILD_ROOT %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) @@ -1603,6 +1617,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libswrAVX2.so %endif %endif +%endif %if %{with nine} %files d3d @@ -1622,6 +1637,7 @@ rm -rf $RPM_BUILD_ROOT %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 @@ -1630,18 +1646,21 @@ rm -rf $RPM_BUILD_ROOT %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