File project.diff of Package meson

--- meson.spec
+++ meson.spec
@@ -43,6 +43,10 @@ Patch0:         https://github.com/meson
 Patch1:         meson-test-installed-bin.patch
 # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchvatal@suse.com -- build and install using distutils instead of full setuptools
 Patch2:         meson-distutils.patch
+# PATCH-FIX-OPENSUSE give more time to testsuites that run emulated
+Patch98:        extend-test-timeout-on-qemu-builds.patch
+# remove dependancy with rpm 4.15 by reverting the use of new rpm macros
+Patch99:        revert-Switch-to-_smp_build_ncpus.diff
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  python3-base
@@ -129,10 +133,6 @@ BuildRequires:  mono-core
 BuildRequires:  wxWidgets-devel
 %endif
 %endif
-# meson makes use of macros that were only defined with rpm 4.15
-%if (0%{?suse_version} < 1550 && 0%{?sle_version} < 150400)
-Conflicts:      rpm-build < 4.15
-%endif
 
 %description
 Meson is a build system designed to optimise programmer productivity.
@@ -166,6 +166,8 @@ This package provides support for meson.
 %if !%{with setuptools}
 %patch2 -p1
 %endif
+%patch98 -p1
+%patch99 -p1
 
 # We do not have appleframeworks available at this moment - can't run the test suite for it
 # boost is currently borked too
--- extend-test-timeout-on-qemu-builds.patch	2023-02-05 09:39:16.228214566 +0100
+++ extend-test-timeout-on-qemu-builds.patch	2023-02-05 13:38:17.726896926 +0100
@@ -0,0 +1,8 @@
+--- a/data/macros.meson
++++ b/data/macros.meson
+@@ -42,4 +42,5 @@
+         -C %{_vpath_builddir} \
+         --num-processes %{_smp_build_ncpus} \
+         --print-errorlogs \
++        %{?qemu_user_space_build: -t 10} \
+         %{nil}}
--- revert-Switch-to-_smp_build_ncpus.diff	2023-02-05 09:39:16.228214566 +0100
+++ revert-Switch-to-_smp_build_ncpus.diff	2023-02-05 13:47:28.269677101 +0100
@@ -0,0 +1,33 @@
+--- a/data/macros.meson
++++ b/data/macros.meson
+@@ -2,6 +2,12 @@
+ %__meson_wrap_mode nodownload
+ %__meson_auto_features enabled
+ 
++%_smp_mesonflags %([ -z "$MESON_BUILD_NCPUS" ] \\\
++	&& MESON_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
++        ncpus_max=%{?_smp_ncpus_max}; \\\
++        if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$MESON_BUILD_NCPUS" -gt "$ncpus_max" ]; then MESON_BUILD_NCPUS="$ncpus_max"; fi; \\\
++        if [ "$MESON_BUILD_NCPUS" -gt 1 ]; then echo "$MESON_BUILD_NCPUS"; else echo "1"; fi)
++
+ %meson \
+     %set_build_flags \
+     %{shrink:%{__meson} \
+@@ -27,7 +33,7 @@
+ %meson_build \
+     %{shrink:%{__meson} compile \
+         -C %{_vpath_builddir} \
+-        -j %{_smp_build_ncpus} \
++        -j %{?_smp_mesonflags} \
+         --verbose \
+         %{nil}}
+ 
+@@ -40,7 +46,7 @@
+ %meson_test \
+     %{shrink:%{__meson} test \
+         -C %{_vpath_builddir} \
+-        --num-processes %{_smp_build_ncpus} \
++        --num-processes %{?_smp_mesonflags} \
+         --print-errorlogs \
+         %{?qemu_user_space_build: -t 10} \
+         %{nil}}
openSUSE Build Service is sponsored by