From 7692299e7436dc4e919deb7075e374553edd5b2c Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Jun 15 2020 17:55:06 +0000 Subject: Switch to meson compile / meson install Signed-off-by: Igor Raits --- diff --git a/0001-macros.meson-Switch-to-_smp_build_ncpus.patch b/0001-macros.meson-Switch-to-_smp_build_ncpus.patch new file mode 100644 index 0000000..bdc16e6 --- /dev/null +++ b/0001-macros.meson-Switch-to-_smp_build_ncpus.patch @@ -0,0 +1,44 @@ +From bfb0e8e4de740c07742c7df217b32fdbf2c92536 Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Mon, 15 Jun 2020 19:33:52 +0200 +Subject: [PATCH 1/2] macros.meson: Switch to %{_smp_build_ncpus} + +It is available since RPM 4.15 which has been around 1 year by now. + +Signed-off-by: Igor Raits +--- + data/macros.meson | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/data/macros.meson b/data/macros.meson +index c5b90de03..25601aad3 100644 +--- a/data/macros.meson ++++ b/data/macros.meson +@@ -2,12 +2,6 @@ + %__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 "--num-processes $MESON_BUILD_NCPUS"; fi) +- + %meson \ + %set_build_flags \ + %{shrink:%{__meson} \ +@@ -37,8 +31,8 @@ + %ninja_install -C %{_vpath_builddir} + + %meson_test \ +- %{shrink: %{__meson} test \ ++ %{shrink:%{__meson} test \ + -C %{_vpath_builddir} \ +- %{?_smp_mesonflags} \ ++ --num-processes %{_smp_build_ncpus} \ + --print-errorlogs \ +- %{nil}} ++ %{nil}} +-- +2.27.0 + diff --git a/0002-macros.meson-Switch-to-meson-compile-install.patch b/0002-macros.meson-Switch-to-meson-compile-install.patch new file mode 100644 index 0000000..596008b --- /dev/null +++ b/0002-macros.meson-Switch-to-meson-compile-install.patch @@ -0,0 +1,40 @@ +From 9f2fa65679038c4b9a78191060a79323e827f0d2 Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Mon, 15 Jun 2020 19:36:47 +0200 +Subject: [PATCH 2/2] macros.meson: Switch to meson compile / install + +Signed-off-by: Igor Raits +--- + data/macros.meson | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/data/macros.meson b/data/macros.meson +index 25601aad3..8a66c9657 100644 +--- a/data/macros.meson ++++ b/data/macros.meson +@@ -22,13 +22,19 @@ + --wrap-mode=%{__meson_wrap_mode} \ + --auto-features=%{__meson_auto_features} \ + %{_vpath_srcdir} %{_vpath_builddir} \ +- %{nil}} ++ %{nil}} + + %meson_build \ +- %ninja_build -C %{_vpath_builddir} ++ %{shrink:%{__meson} compile \ ++ -C %{_vpath_builddir} \ ++ -j %{_smp_build_ncpus} \ ++ %{nil}} + + %meson_install \ +- %ninja_install -C %{_vpath_builddir} ++ %{shrink:DESTDIR=%{buildroot} %{__meson} install \ ++ -C %{_vpath_builddir} \ ++ --no-rebuild \ ++ %{nil}} + + %meson_test \ + %{shrink:%{__meson} test \ +-- +2.27.0 + diff --git a/meson.spec b/meson.spec index f0aff90..f131d89 100644 --- a/meson.spec +++ b/meson.spec @@ -7,7 +7,7 @@ Name: meson Version: 0.54.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: High productivity build system License: ASL 2.0 @@ -78,6 +78,11 @@ productivity. It aims to do this by providing simple, out-of-the-box support for modern software development tools and practices, such as unit tests, coverage reports, Valgrind, CCache and the like. +%patchlist +# https://github.com/mesonbuild/meson/pull/7329 +0001-macros.meson-Switch-to-_smp_build_ncpus.patch +0002-macros.meson-Switch-to-meson-compile-install.patch + %prep %autosetup -p1 # Macro should not change when we are redefining bindir @@ -112,6 +117,9 @@ export MESON_PRINT_TEST_OUTPUT=1 %{_datadir}/polkit-1/actions/com.mesonbuild.install.policy %changelog +* Mon Jun 15 19:54:47 CEST 2020 Igor Raits - 0.54.2-3 +- Switch to meson compile / meson install + * Fri May 22 2020 Miro HronĨok - 0.54.2-2 - Rebuilt for Python 3.9