File project.diff of Package meson
--- meson.spec (revision 8ba76324eef02c646028bbb9caa41af2)
+++ meson.spec (working copy)
@@ -41,6 +41,8 @@
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
+# 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
@@ -128,10 +130,6 @@
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.
@@ -164,5 +166,6 @@
%if !%{with setuptools}
%patch2 -p1
%endif
+%patch99 -p1
# We do not have appleframeworks available at this moment - can't run the test suite for it
--- revert-Switch-to-_smp_build_ncpus.diff (revision 0)
+++ revert-Switch-to-_smp_build_ncpus.diff (revision 0)
@@ -0,0 +1,32 @@
+--- 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,6 +46,6 @@
+ %meson_test \
+ %{shrink:%{__meson} test \
+ -C %{_vpath_builddir} \
+- --num-processes %{_smp_build_ncpus} \
++ --num-processes %{?_smp_mesonflags} \
+ --print-errorlogs \
+ %{nil}}