From 795680bbd10068673580261e134e2f4fbac4072d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jul 24 2018 07:01:52 +0000 Subject: macros improvements Signed-off-by: Igor Gnatenko --- diff --git a/0001-rpm-pass-auto-features-enabled-skip-ci.patch b/0001-rpm-pass-auto-features-enabled-skip-ci.patch new file mode 100644 index 0000000..0fd88f1 --- /dev/null +++ b/0001-rpm-pass-auto-features-enabled-skip-ci.patch @@ -0,0 +1,34 @@ +From cb50f9f0778043629c90d660ba4237120dafbdff Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 23 Jul 2018 19:24:33 +0200 +Subject: [PATCH 1/3] rpm: pass --auto-features=enabled [skip ci] + +We really want to be explicit. + +Signed-off-by: Igor Gnatenko +--- + data/macros.meson | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/data/macros.meson b/data/macros.meson +index 732b68d2..31f77951 100644 +--- a/data/macros.meson ++++ b/data/macros.meson +@@ -1,5 +1,6 @@ + %__meson %{_bindir}/meson + %__meson_wrap_mode nodownload ++%__meson_auto_features enabled + + %meson \ + export CFLAGS="${CFLAGS:-%__global_cflags}" \ +@@ -23,6 +24,7 @@ + --localstatedir=%{_localstatedir} \\\ + --sharedstatedir=%{_sharedstatedir} \\\ + --wrap-mode=%{__meson_wrap_mode} \\\ ++ --auto-features=%{__meson_auto_features} \\\ + %{_vpath_srcdir} %{_vpath_builddir} \\\ + %{nil} + +-- +2.18.0 + diff --git a/0002-rpm-use-set_build_flags-skip-ci.patch b/0002-rpm-use-set_build_flags-skip-ci.patch new file mode 100644 index 0000000..bb641b5 --- /dev/null +++ b/0002-rpm-use-set_build_flags-skip-ci.patch @@ -0,0 +1,32 @@ +From f40355d8a1c12504d2a4d7494d1c9c0b92558d9a Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 23 Jul 2018 19:25:30 +0200 +Subject: [PATCH 2/3] rpm: use %set_build_flags [skip ci] + +It has better name and should do the trick. + +Signed-off-by: Igor Gnatenko +--- + data/macros.meson | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/data/macros.meson b/data/macros.meson +index 31f77951..acd3af93 100644 +--- a/data/macros.meson ++++ b/data/macros.meson +@@ -3,11 +3,7 @@ + %__meson_auto_features enabled + + %meson \ +- export CFLAGS="${CFLAGS:-%__global_cflags}" \ +- export CXXFLAGS="${CXXFLAGS:-%__global_cxxflags}" \ +- export FFLAGS="${FFLAGS:-%__global_fflags}" \ +- export FCFLAGS="${FCFLAGS:-%__global_fcflags}" \ +- export LDFLAGS="${LDFLAGS:-%__global_ldflags}" \ ++ %set_build_flags \ + %{__meson} \\\ + --buildtype=plain \\\ + --prefix=%{_prefix} \\\ +-- +2.18.0 + diff --git a/0003-rpm-use-shrink-skip-ci.patch b/0003-rpm-use-shrink-skip-ci.patch new file mode 100644 index 0000000..4a119b3 --- /dev/null +++ b/0003-rpm-use-shrink-skip-ci.patch @@ -0,0 +1,68 @@ +From a1b22cae59c0ac8e0297dd42fad3a4edb6354071 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 23 Jul 2018 19:29:19 +0200 +Subject: [PATCH 3/3] =?UTF-8?q?rpm:=20use=20%{shrink=E2=80=A6}=20[skip=20c?= + =?UTF-8?q?i]?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Make logs look better! + +Signed-off-by: Igor Gnatenko +--- + data/macros.meson | 38 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 19 deletions(-) + +diff --git a/data/macros.meson b/data/macros.meson +index acd3af93..4a8a3ca4 100644 +--- a/data/macros.meson ++++ b/data/macros.meson +@@ -4,25 +4,25 @@ + + %meson \ + %set_build_flags \ +- %{__meson} \\\ +- --buildtype=plain \\\ +- --prefix=%{_prefix} \\\ +- --libdir=%{_libdir} \\\ +- --libexecdir=%{_libexecdir} \\\ +- --bindir=%{_bindir} \\\ +- --sbindir=%{_sbindir} \\\ +- --includedir=%{_includedir} \\\ +- --datadir=%{_datadir} \\\ +- --mandir=%{_mandir} \\\ +- --infodir=%{_infodir} \\\ +- --localedir=%{_datadir}/locale \\\ +- --sysconfdir=%{_sysconfdir} \\\ +- --localstatedir=%{_localstatedir} \\\ +- --sharedstatedir=%{_sharedstatedir} \\\ +- --wrap-mode=%{__meson_wrap_mode} \\\ +- --auto-features=%{__meson_auto_features} \\\ +- %{_vpath_srcdir} %{_vpath_builddir} \\\ +- %{nil} ++ %{shrink:%{__meson} \ ++ --buildtype=plain \ ++ --prefix=%{_prefix} \ ++ --libdir=%{_libdir} \ ++ --libexecdir=%{_libexecdir} \ ++ --bindir=%{_bindir} \ ++ --sbindir=%{_sbindir} \ ++ --includedir=%{_includedir} \ ++ --datadir=%{_datadir} \ ++ --mandir=%{_mandir} \ ++ --infodir=%{_infodir} \ ++ --localedir=%{_datadir}/locale \ ++ --sysconfdir=%{_sysconfdir} \ ++ --localstatedir=%{_localstatedir} \ ++ --sharedstatedir=%{_sharedstatedir} \ ++ --wrap-mode=%{__meson_wrap_mode} \ ++ --auto-features=%{__meson_auto_features} \ ++ %{_vpath_srcdir} %{_vpath_builddir} \ ++ %{nil}} + + %meson_build \ + %ninja_build -C %{_vpath_builddir} +-- +2.18.0 + diff --git a/meson.spec b/meson.spec index 71d0758..f548645 100644 --- a/meson.spec +++ b/meson.spec @@ -4,13 +4,18 @@ Name: meson Version: 0.47.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: High productivity build system License: ASL 2.0 URL: http://mesonbuild.com/ Source0: https://github.com/mesonbuild/meson/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/mesonbuild/meson/pull/3930 +Patch0001: 0001-rpm-pass-auto-features-enabled-skip-ci.patch +Patch0002: 0002-rpm-use-set_build_flags-skip-ci.patch +Patch0003: 0003-rpm-use-shrink-skip-ci.patch + BuildArch: noarch Obsoletes: %{name}-gui < 0.31.0-3 @@ -42,8 +47,10 @@ BuildRequires: gmock-devel BuildRequires: qt5-qtbase-devel BuildRequires: vala # In recent versions it's merged into vala -%if (0%{?fedora} && 0%{?fedora} <= 24) || (0%{?rhel} && 0%{?rhel} <= 7) +%if (0%{?rhel} && 0%{?rhel} <= 7) BuildRequires: vala-tools +%else +BuildRequires: python3-gobject-base %endif BuildRequires: wxGTK3-devel BuildRequires: flex @@ -56,9 +63,6 @@ BuildRequires: pkgconfig(protobuf) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-sharp-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) -%if ! 0%{?rhel} || 0%{?rhel} > 7 -BuildRequires: python3-gobject-base -%endif BuildRequires: gtk-doc BuildRequires: itstool BuildRequires: pkgconfig(zlib) @@ -81,6 +85,8 @@ unit tests, coverage reports, Valgrind, CCache and the like. %autosetup -p1 # Remove MPI tests for now because it is complicated to run rm -rf "test cases/frameworks/17 mpi" +# Macro should not change when we are redefining bindir +sed -i -e "/^%%__meson /s| .*$| %{_bindir}/%{name}|" data/macros.%{name} %build %py3_build @@ -115,6 +121,9 @@ export MESON_PRINT_TEST_OUTPUT=1 %{_datadir}/polkit-1/actions/com.mesonbuild.install.policy %changelog +* Tue Jul 24 2018 Igor Gnatenko - 0.47.1-3 +- Macros improvements + * Fri Jul 13 2018 Fedora Release Engineering - 0.47.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild