]> git.pld-linux.org Git - packages/Mesa.git/blobdiff - Mesa.spec
Version: 19.0.6
[packages/Mesa.git] / Mesa.spec
index ceef13856dd8432d3b6c5c1da75685fe3d90cdd4..f151951b9cb3458734a2ab15df67f819576d1ee9 100644 (file)
--- 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
 # (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
@@ -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 >= 1.5
 BuildRequires: pkgconfig
 BuildRequires: pkgconfig(talloc) >= 2.0.1
 BuildRequires: pkgconfig(xcb-dri2) >= 1.8
@@ -93,24 +100,21 @@ BuildRequires:     sed >= 4.0
 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
@@ -1123,6 +1127,7 @@ License:  MIT
 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}
@@ -1156,6 +1161,7 @@ License:  MIT
 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}
@@ -1172,8 +1178,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
@@ -1185,18 +1200,22 @@ i965 i915 \
 
 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
 "
@@ -1216,25 +1235,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 +1272,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 +1355,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 +1430,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 +1576,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 +1610,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 +1621,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libswrAVX2.so
 %endif
 %endif
+%endif
 
 %if %{with nine}
 %files d3d
@@ -1622,6 +1641,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 +1650,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
This page took 0.064982 seconds and 4 git commands to generate.