Switch to meson buildsystem

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-12-04 15:30:12 +01:00
parent d07e7ed999
commit b708cfc9f3
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
3 changed files with 140 additions and 188 deletions

View File

@ -1,27 +0,0 @@
From b33c8b56abcc4837f96f7f106b108681858482e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Tue, 24 Apr 2018 09:46:41 +0200
Subject: [PATCH] gallium: Disable rgb10 configs by default
Applications tend to not handle rgb10 configs very well, so lets
disable it for now.
https://bugzilla.redhat.com/show_bug.cgi?id=1560481
---
src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
index 21dc599dc2..23f9194149 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -33,5 +33,5 @@ DRI_CONF_SECTION_END
DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER("false")
DRI_CONF_GLSL_ZERO_INIT("false")
- DRI_CONF_ALLOW_RGB10_CONFIGS("true")
+ DRI_CONF_ALLOW_RGB10_CONFIGS("false")
DRI_CONF_SECTION_END
--
2.17.0

View File

@ -1,26 +0,0 @@
From c2b4d93a5e4796ca53361c61d7e31edc24241932 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sun, 20 Mar 2016 13:26:25 +0100
Subject: [PATCH 1/4] llvm SONAME without version
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5f75c60..d77f907 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2645,7 +2645,7 @@
dnl ourselves.
dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
- LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
+ LLVM_SO_NAME=LLVM
AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
if test "x$llvm_have_one_so" = xyes; then
--
2.7.4

275
mesa.spec
View File

@ -1,41 +1,50 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=1546714 # https://bugzilla.redhat.com/show_bug.cgi?id=1546714
%undefine _annotated_build %undefine _annotated_build
%ifarch s390x %ifnarch s390x
%define with_hardware 0 %global with_hardware 1
%define base_drivers swrast %global with_vdpau 1
%else %global with_vaapi 1
%define with_hardware 1 %global with_nine 1
%define with_vdpau 1 %global with_omx 1
%define with_vaapi 1 %global with_opencl 1
%define with_nine 1 %global base_drivers nouveau,r100,r200
%define with_omx 1
%define with_opencl 1
%define base_drivers swrast,nouveau,radeon,r200
%endif %endif
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
%define platform_drivers ,i915,i965 %global platform_drivers ,i915,i965
%define with_vmware 1 %global with_vmware 1
%define with_xa 1 %global with_xa 1
%define vulkan_drivers --with-vulkan-drivers=intel,radeon %global vulkan_drivers intel,amd
%else %else
%define vulkan_drivers --with-vulkan-drivers=radeon %ifnarch s390x
%global vulkan_drivers amd
%endif
%endif %endif
%ifarch %{arm} aarch64 %ifarch %{arm} aarch64
%define with_etnaviv 1 %global with_etnaviv 1
%define with_freedreno 1 %global with_freedreno 1
%define with_tegra 1 %global with_tegra 1
%define with_vc4 1 %global with_vc4 1
%define with_xa 1 %global with_xa 1
%endif %endif
%ifnarch %{arm} s390x %ifnarch %{arm} s390x
%define with_radeonsi 1 %global with_radeonsi 1
%endif %endif
%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} %ifnarch %{x86}
%global with_asm 1
%endif
%ifarch %{valgrind_arches}
%bcond_without valgrind
%else
%bcond_with valgrind
%endif
%global dri_drivers %{?base_drivers}%{?platform_drivers}
%global sanitize 0 %global sanitize 0
@ -43,7 +52,7 @@ Name: mesa
Summary: Mesa graphics libraries Summary: Mesa graphics libraries
%global ver 18.3.1 %global ver 18.3.1
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 1%{?dist} Release: 2%{?dist}
License: MIT License: MIT
URL: http://www.mesa3d.org URL: http://www.mesa3d.org
@ -57,77 +66,86 @@ Source3: Makefile
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. # Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source4: Mesa-MLAA-License-Clarification-Email.txt Source4: Mesa-MLAA-License-Clarification-Email.txt
Patch1: 0001-llvm-SONAME-without-version.patch
Patch3: 0003-evergreen-big-endian.patch Patch3: 0003-evergreen-big-endian.patch
# Disable rgb10 configs by default:
# https://bugzilla.redhat.com/show_bug.cgi?id=1560481
#Patch7: 0001-gallium-Disable-rgb10-configs-by-default.patch
# https://lists.freedesktop.org/archives/mesa-dev/2018-November/210797.html # https://lists.freedesktop.org/archives/mesa-dev/2018-November/210797.html
# https://bugzilla.redhat.com/show_bug.cgi?id=1650929 # https://bugzilla.redhat.com/show_bug.cgi?id=1650929
Patch10: 0001-wayland-egl-Ensure-EGL-surface-is-resized-on-DRI-upd.patch Patch10: 0001-wayland-egl-Ensure-EGL-surface-is-resized-on-DRI-upd.patch
BuildRequires: meson >= 0.45
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: automake BuildRequires: gettext
BuildRequires: autoconf
BuildRequires: libtool
%if %{with_hardware} %if 0%{?with_hardware}
BuildRequires: kernel-headers BuildRequires: kernel-headers
%endif %endif
BuildRequires: libdrm-devel >= 2.4.42 %ifarch %{ix86} x86_64
BuildRequires: libXxf86vm-devel BuildRequires: pkgconfig(libdrm_intel) >= 2.4.75
BuildRequires: expat-devel
BuildRequires: xorg-x11-proto-devel
BuildRequires: makedepend
BuildRequires: libselinux-devel
BuildRequires: pkgconfig(xrandr)
BuildRequires: libXext-devel
BuildRequires: libXfixes-devel
BuildRequires: libXdamage-devel
BuildRequires: libXi-devel
BuildRequires: libXmu-devel
BuildRequires: libxshmfence-devel
BuildRequires: elfutils
BuildRequires: python3
BuildRequires: python2
BuildRequires: gettext
BuildRequires: llvm-devel >= 3.4-7
%if 0%{?with_opencl}
BuildRequires: clang-devel >= 3.0
%endif %endif
BuildRequires: elfutils-libelf-devel %if 0%{?with_radeonsi}
BuildRequires: python3-libxml2 BuildRequires: pkgconfig(libdrm_amdgpu) >= 2.4.95
BuildRequires: python2-libxml2 %endif
BuildRequires: libudev-devel BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.71
BuildRequires: bison flex BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.66
BuildRequires: pkgconfig(wayland-client) %if 0%{?with_etnaviv}
BuildRequires: pkgconfig(wayland-server) BuildRequires: pkgconfig(libdrm_etnaviv) >= 2.4.89
BuildRequires: pkgconfig(wayland-protocols) %endif
%if 0%{?with_vc4}
BuildRequires: pkgconfig(libdrm) >= 2.4.89
%endif
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(zlib) >= 1.2.3
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-protocols) >= 1.8
BuildRequires: pkgconfig(wayland-client) >= 1.11
BuildRequires: pkgconfig(wayland-server) >= 1.11
BuildRequires: pkgconfig(wayland-egl-backend) >= 3
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xdamage) >= 1.1
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xcb-glx) >= 1.8.1
BuildRequires: pkgconfig(xxf86vm)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb-dri2) >= 1.8
BuildRequires: pkgconfig(xcb-dri3)
BuildRequires: pkgconfig(xcb-present)
BuildRequires: pkgconfig(xcb-sync)
BuildRequires: pkgconfig(xshmfence) >= 1.1
BuildRequires: pkgconfig(dri2proto) >= 2.8
BuildRequires: pkgconfig(glproto) >= 1.4.14
BuildRequires: pkgconfig(xcb-xfixes)
BuildRequires: pkgconfig(xcb-randr) >= 1.12
BuildRequires: pkgconfig(xrandr) >= 1.3
BuildRequires: bison
BuildRequires: flex
%if 0%{?with_vdpau} %if 0%{?with_vdpau}
BuildRequires: libvdpau-devel BuildRequires: pkgconfig(vdpau) >= 1.1
%endif %endif
%if 0%{?with_vaapi} %if 0%{?with_vaapi}
BuildRequires: libva-devel >= 0.39.0 BuildRequires: pkgconfig(libva) >= 0.38.0
%endif %endif
BuildRequires: pkgconfig(zlib)
%if 0%{?with_omx} %if 0%{?with_omx}
BuildRequires: libomxil-bellagio-devel BuildRequires: pkgconfig(libomxil-bellagio)
%endif %endif
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(libglvnd) >= 0.2.0
BuildRequires: llvm-devel >= 6.0.0
%if 0%{?with_opencl} %if 0%{?with_opencl}
BuildRequires: libclc-devel opencl-filesystem BuildRequires: clang-devel
BuildRequires: pkgconfig(libclc)
%endif %endif
%if %{with valgrind}
BuildRequires: pkgconfig(valgrind)
%endif
BuildRequires: python3-devel
BuildRequires: python3-mako
%if 0%{?with_hardware} %if 0%{?with_hardware}
BuildRequires: vulkan-devel BuildRequires: vulkan-devel
%endif %endif
BuildRequires: python3-mako
BuildRequires: python2-mako
%ifarch %{valgrind_arches}
BuildRequires: pkgconfig(valgrind)
%endif
BuildRequires: pkgconfig(libglvnd) >= 0.2.0
%description %description
%{summary}. %{summary}.
@ -355,74 +373,57 @@ cp %{SOURCE4} docs/
cmp %{SOURCE1} src/gallium/auxiliary/vl/vl_decoder.c cmp %{SOURCE1} src/gallium/auxiliary/vl/vl_decoder.c
cmp %{SOURCE2} src/gallium/auxiliary/vl/vl_mpeg12_decoder.c cmp %{SOURCE2} src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
%endif %endif
autoreconf -vfi
%ifarch %{ix86} %meson -Dcpp_std=gnu++11 \
%global asm_flags --disable-asm -Dplatforms=x11,wayland,drm,surfaceless \
%endif -Ddri3=true \
-Ddri-drivers=%{?dri_drivers} \
%configure \
%{?asm_flags} \
--enable-libglvnd \
--enable-selinux \
--enable-gallium-osmesa \
--with-dri-driverdir=%{_libdir}/dri \
--enable-egl \
--disable-gles1 \
--enable-gles2 \
--disable-xvmc \
%{?with_vdpau:--enable-vdpau} \
%{?with_vaapi:--enable-va} \
--with-platforms=x11,drm,surfaceless,wayland \
--enable-shared-glapi \
--enable-gbm \
%{?with_omx:--enable-omx-bellagio} \
%{?with_opencl:--enable-opencl --enable-opencl-icd} %{!?with_opencl:--disable-opencl} \
--enable-glx-tls \
--enable-texture-float=yes \
%if 0%{?with_hardware} %if 0%{?with_hardware}
%{?vulkan_drivers} \ -Dgallium-drivers=swrast,virgl,r300,nouveau%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv,imx}%{?with_tegra:,tegra}%{?with_vc4:,vc4} \
%endif
--enable-llvm \
--enable-llvm-shared-libs \
--enable-dri \
%if %{with_hardware}
%{?with_xa:--enable-xa} \
%{?with_nine:--enable-nine} \
--with-gallium-drivers=%{?with_vmware:svga,}%{?with_radeonsi:radeonsi,r600,}swrast,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_tegra:tegra,}%{?with_vc4:vc4,}virgl,r300,nouveau \
%else %else
--with-gallium-drivers=swrast,virgl \ -Dgallium-drivers=swrast,virgl \
%endif %endif
%{?dri_drivers} -Dgallium-vdpau=%{?with_vdpau:true}%{!?with_vdpau:false} \
-Dgallium-xvmc=false \
%make_build MKDEP=/bin/true V=1 -Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \
-Dgallium-va=%{?with_vaapi:true}%{!?with_vaapi:false} \
-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} \
-Dshared-glapi=true \
-Dgles1=false \
-Dgles2=true \
-Dopengl=true \
-Dgbm=true \
-Dglx=dri \
-Degl=true \
-Dglvnd=true \
-Dasm=%{?with_asm:true}%{!?with_asm:false} \
-Dllvm=true \
-Dshared-llvm=true \
-Dvalgrind=%{?with_valgrind:true}%{!?with_valgrind:false} \
-Dbuild-tests=false \
-Dselinux=true \
-Dosmesa=gallium \
%{nil}
%meson_build
%install %install
%make_install %meson_install
# libvdpau opens the versioned name, don't bother including the unversioned # libvdpau opens the versioned name, don't bother including the unversioned
rm -f %{buildroot}%{_libdir}/vdpau/*.so rm -vf %{buildroot}%{_libdir}/vdpau/*.so
# likewise glvnd # likewise glvnd
rm -f %{buildroot}%{_libdir}/libGLX_mesa.so rm -vf %{buildroot}%{_libdir}/libGLX_mesa.so
rm -f %{buildroot}%{_libdir}/libEGL_mesa.so rm -vf %{buildroot}%{_libdir}/libEGL_mesa.so
# XXX can we just not build this # XXX can we just not build this
rm -f %{buildroot}%{_libdir}/libGLES* rm -vf %{buildroot}%{_libdir}/libGLES*
# glvnd needs a default provider for indirect rendering where it cannot # glvnd needs a default provider for indirect rendering where it cannot
# determine the vendor # determine the vendor
ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_system.so.0 ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_system.so.0
# strip out useless headers
rm -f %{buildroot}%{_includedir}/GL/w*.h
# these are shipped already in vulkan-devel
mkdir -p %{buildroot}/%{_includedir}/vulkan/
rm -f %{buildroot}/%{_includedir}/vulkan/vk_platform.h
rm -f %{buildroot}/%{_includedir}/vulkan/vulkan.h
# remove .la files
find %{buildroot} -name '*.la' -delete
# this keeps breaking, check it early. note that the exit from eu-ftr is odd. # this keeps breaking, check it early. note that the exit from eu-ftr is odd.
pushd %{buildroot}%{_libdir} pushd %{buildroot}%{_libdir}
for i in libOSMesa*.so libGL.so ; do for i in libOSMesa*.so libGL.so ; do
@ -433,7 +434,7 @@ popd
%files filesystem %files filesystem
%doc docs/Mesa-MLAA-License-Clarification-Email.txt %doc docs/Mesa-MLAA-License-Clarification-Email.txt
%dir %{_libdir}/dri %dir %{_libdir}/dri
%if %{with_hardware} %if 0%{?with_hardware}
%if 0%{?with_vdpau} %if 0%{?with_vdpau}
%dir %{_libdir}/vdpau %dir %{_libdir}/vdpau
%endif %endif
@ -513,13 +514,13 @@ popd
%if 0%{?with_xa} %if 0%{?with_xa}
%ldconfig_scriptlets libxatracker %ldconfig_scriptlets libxatracker
%files libxatracker %files libxatracker
%if %{with_hardware} %if 0%{?with_hardware}
%{_libdir}/libxatracker.so.2 %{_libdir}/libxatracker.so.2
%{_libdir}/libxatracker.so.2.* %{_libdir}/libxatracker.so.2.*
%endif %endif
%files libxatracker-devel %files libxatracker-devel
%if %{with_hardware} %if 0%{?with_hardware}
%{_libdir}/libxatracker.so %{_libdir}/libxatracker.so
%{_includedir}/xa_tracker.h %{_includedir}/xa_tracker.h
%{_includedir}/xa_composite.h %{_includedir}/xa_composite.h
@ -551,7 +552,7 @@ popd
%files dri-drivers %files dri-drivers
%dir %{_datadir}/drirc.d %dir %{_datadir}/drirc.d
%{_datadir}/drirc.d/00-mesa-defaults.conf %{_datadir}/drirc.d/00-mesa-defaults.conf
%if %{with_hardware} %if 0%{?with_hardware}
%{_libdir}/dri/radeon_dri.so %{_libdir}/dri/radeon_dri.so
%{_libdir}/dri/r200_dri.so %{_libdir}/dri/r200_dri.so
%{_libdir}/dri/nouveau_vieux_dri.so %{_libdir}/dri/nouveau_vieux_dri.so
@ -596,7 +597,7 @@ popd
%{_libdir}/dri/swrast_dri.so %{_libdir}/dri/swrast_dri.so
%{_libdir}/dri/virtio_gpu_dri.so %{_libdir}/dri/virtio_gpu_dri.so
%if %{with_hardware} %if 0%{?with_hardware}
%if 0%{?with_omx} %if 0%{?with_omx}
%files omx-drivers %files omx-drivers
%{_libdir}/bellagio/libomx_mesa.so %{_libdir}/bellagio/libomx_mesa.so
@ -609,9 +610,6 @@ popd
%{_libdir}/vdpau/libvdpau_r600.so.1* %{_libdir}/vdpau/libvdpau_r600.so.1*
%{_libdir}/vdpau/libvdpau_radeonsi.so.1* %{_libdir}/vdpau/libvdpau_radeonsi.so.1*
%endif %endif
%if 0%{?with_tegra}
%{_libdir}/vdpau/libvdpau_tegra.so.1*
%endif
%endif %endif
%endif %endif
@ -626,9 +624,16 @@ popd
%endif %endif
%files vulkan-devel %files vulkan-devel
%{_includedir}/vulkan/ %if 0%{?with_hardware}
%ifarch %{ix86} x86_64
%{_includedir}/vulkan/vulkan_intel.h
%endif
%endif
%changelog %changelog
* Wed Dec 19 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 18.3.1-2
- Switch to meson buildsystem
* Tue Dec 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 18.3.1-1 * Tue Dec 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 18.3.1-1
- Update to 18.3.1 - Update to 18.3.1