--- cauldron/mesa/current/SPECS/mesa.spec 2017/11/20 22:06:50 1177988 +++ cauldron/mesa/current/SPECS/mesa.spec 2018/11/30 10:03:04 1336871 @@ -1,9 +1,3 @@ -%if "%distro_section" == "tainted" -%global build_plf 1 -%else -%global build_plf 0 -%endif - # (cg) Cheater... %define Werror_cflags %nil @@ -12,12 +6,12 @@ # https://cgit.freedesktop.org/mesa/mesa/commit/?h=13.0&id=3bb0415ab96f74183f7aa58c1a543448653ccb3e %define git 0 -%define git_branch 17.3 +%define git_branch 18.0 %define opengl_ver 4.5 # define version, RC & release -%define main_version 17.3.0 +%define main_version 18.3.0 %define relc 5 %define rel 1 @@ -90,17 +84,29 @@ %define mesasrcdir %{_prefix}/src/Mesa/ +%define with_vaapi 1 + # (akien) Not adding on arm as it would break the build there %define enable_vulkan 0 %ifarch %{ix86} x86_64 %define enable_vulkan 1 %endif + +%ifarch %{arm} aarch64 +%define with_etnaviv 1 +%define with_freedreno 1 +%define with_vc4 1 +%endif + %define base_drivers swrast,nouveau,radeon,r200 %ifarch %{ix86} x86_64 %define platform_drivers ,i915,i965 %define gallium_platform_drivers ,svga %endif + +%define with_wayland_egl 0 + %define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} Name: mesa @@ -121,24 +127,31 @@ BuildRequires: pkgconfig(expat) >= 2.0.1 BuildRequires: gccmakedep BuildRequires: x11-proto-devel >= 7.3 -BuildRequires: pkgconfig(libdrm) >= 2.4.60 +BuildRequires: pkgconfig(libdrm) >= 2.4.91 BuildRequires: pkgconfig(xcb-dri3) BuildRequires: pkgconfig(xcb-present) >= 1.11 BuildRequires: pkgconfig(xext) >= 1.1.1 BuildRequires: pkgconfig(xxf86vm) >= 1.1.0 BuildRequires: pkgconfig(xi) >= 1.3 +BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(talloc) -BuildRequires: libxml2-python -BuildRequires: python-mako +BuildRequires: python2-libxml2 +BuildRequires: python2-mako +BuildRequires: python3-libxml2 +BuildRequires: python3-mako BuildRequires: makedepend BuildRequires: bison BuildRequires: flex BuildRequires: pkgconfig(libelf) BuildRequires: llvm-devel >= 3.9.1-5 BuildRequires: pkgconfig(libudev) +%if 0%{?with_vaapi} BuildRequires: pkgconfig(libva) +%endif BuildRequires: pkgconfig(vdpau) -BuildRequires: wayland-devel +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-server) +BuildRequires: pkgconfig(wayland-protocols) %if %{enable_vulkan} BuildRequires: libgcrypt-devel %endif @@ -154,35 +167,13 @@ %endif Source3: make-git-snapshot.sh -# Instructions to setup your repository clone -# git://git.freedesktop.org/git/mesa/mesa -# git checkout mesa_7_5_branch -# git branch mdv-cherry-picks -# git am ../02??-*.patch -# git branch mdv-redhat -# git am ../03??-*.patch -# git branch mdv-patches -# git am ../09??-*.patch -# In order to update to the branch via patches, issue this command: -# git format-patch --start-number 100 mesa_7_5_1..mesa_7_5_branch | sed 's/^0\([0-9]\+\)-/Patch\1: 0\1-/' - -# from mesa master: https://cgit.freedesktop.org/mesa/mesa/commit/?id=c591b1e59454db2e8854e36852e0d413ce38b2f2 -Patch100: i965-expose-SRGB-visuals-and-turn-on-EGL_KHR_gl-colorspace.patch - -# Cherry picks -# git format-patch --start-number 200 mesa_7_5_branch..mdv-cherry-picks - -# Patches "liberated" from Fedora: -# http://pkgs.fedoraproject.org/cgit/rpms/mesa.git/ -# git format-patch --start-number 300 mdv-cherry-picks..mdv-redhat +Patch000: fix-linking.patch -# https://cgit.freedesktop.org/~ajax/mesa/log/?h=mesa-17.2-s3tc +# mesa staging/18.3 branch from 1 +Patch001: winsys-amdgpu-fix-a-buffer-leak-in-amdgpu_bo_from_handle.patch -# Patches from ChromiumOS -# http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=tree;f=media-libs/mesa/files;hb=HEAD +# mesa master branch from 101 -# Mageia/Mandriva patches -# git format-patch --start-number 900 mdv-redhat..mdv-patches #------------------------------------------------------------------------------ @@ -318,6 +309,7 @@ Provides: lib%{gbmname}-devel Provides: %{gbmname}-devel +%if %{?with_wayland_egl} %package -n %{libwaylandeglname} Summary: Files for Mesa (Wayland EGL libs) Group: System/Libraries @@ -329,6 +321,7 @@ Requires: %{libwaylandeglname} = %{version}-%{release} Provides: lib%{waylandeglname}-devel Provides: %{waylandeglname}-devel +%endif %package -n %{_lib}vdpau-driver-nouveau Summary: VDPAU plugin for nouveau driver @@ -472,6 +465,7 @@ Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. GBM (Graphics Buffer Manager) development parts. +%if %{?with_wayland_egl} %description -n %{libwaylandeglname} Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. Wayland EGL platform parts. @@ -479,6 +473,7 @@ %description -n %{libwaylandeglname}-devel Mesa is an OpenGL %{opengl_ver} compatible 3D graphics library. Wayland EGL platform development parts. +%endif %description -n %{libxaname} This packages provides the xa shared library used by gallium. @@ -518,10 +513,6 @@ %prep %autosetup -n %{name}-%{version}%{?relc:-rc%{relc}} -p1 -# this is a hack for S3TC support. r200_screen.c is symlinked to -# radeon_screen.c in git, but is its own file in the tarball. -cp -f src/mesa/drivers/dri/{radeon,r200}/radeon_screen.c - %build # (re)generate auto* generated files using our autotools and libtoolize autoreconf -vfi @@ -540,8 +531,8 @@ --enable-gles2 \ --disable-xvmc \ --enable-vdpau \ - --enable-va \ - --with-platforms=x11,wayland,drm \ + %{?with_vaapi:--enable-va} \ + --with-platforms=x11,drm,surfaceless,wayland \ --enable-shared-glapi \ --enable-gbm \ --enable-glx \ @@ -551,7 +542,7 @@ --enable-dri \ --enable-xa \ --enable-nine \ - --with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl%{?gallium_platform_drivers} \ + --with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_vc4:vc4,}virgl%{?gallium_platform_drivers} \ %{?dri_drivers} # end of configure options @@ -582,10 +573,16 @@ # remove .la files find %{buildroot} -name '*.la' -delete +# remove libwayland-egl on F28+ where it's built as part of wayland source package +%if !%{?with_wayland_egl} +rm -f %{buildroot}%{_libdir}/libwayland-egl.so* +rm -f %{buildroot}%{_libdir}/pkgconfig/wayland-egl.pc +%endif + #------------------------------------------------------------------------------ %files -%config(noreplace) %{_sysconfdir}/drirc +/usr/share/drirc.d/ %files -n %{dridrivers} %dir %{_libdir}/dri @@ -619,9 +616,11 @@ %{_libdir}/libgbm.so.%{gbmmajor} %{_libdir}/libgbm.so.%{gbmmajor}.* +%if %{?with_wayland_egl} %files -n %{libwaylandeglname} %{_libdir}/libwayland-egl.so.%{waylandeglmajor} %{_libdir}/libwayland-egl.so.%{waylandeglmajor}.* +%endif %files -n %{libxaname} %{_libdir}/libxatracker.so.%{xamajor}{,.*} @@ -679,9 +678,11 @@ %{_includedir}/gbm.h %{_libdir}/pkgconfig/gbm.pc +%if %{?with_wayland_egl} %files -n %{libwaylandeglname}-devel %{_libdir}/libwayland-egl.so %{_libdir}/pkgconfig/wayland-egl.pc +%endif %files -n %{libxaname}-devel %{_libdir}/libxatracker.so