From f88d07b9148b6c5b6768b2b41cb74aada3f9aff8 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Mon, 7 Jun 2021 14:17:48 +0200 Subject: [PATCH] Allow overriding CFLAGS/CXXFLAGS/LDFLAGS for %%mingw_meson --- macros.mingw32 | 4 +++- macros.mingw64 | 4 +++- mingw-filesystem.spec | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/macros.mingw32 b/macros.mingw32 index 49efc47..3c393e1 100644 --- a/macros.mingw32 +++ b/macros.mingw32 @@ -153,7 +153,9 @@ %mingw32_meson %{mingw32_env} ; \ unset CC CFLAGS CPPFLAGS CXX CXXFLAGS LD LDFLAGS; \\\ - export CFLAGS="%{mingw32_cflags}" CXXFLAGS="%{mingw32_cflags}" LDFLAGS="%{mingw32_ldflags}"; \\\ + CFLAGS="${MINGW32_CFLAGS-%mingw32_cflags}"; export CFLAGS; \\\ + CPPFLAGS="${MINGW32_CPPFLAGS-%mingw32_cppflags}"; export CPPFLAGS; \\\ + LDFLAGS="${MINGW32_LDFLAGS:-%mingw32_ldflags}"; export LDFLAGS; \\\ if test -f meson.build; then __mingw32_topdir=.; \\\ elif test -f ../meson.build; then __mingw32_topdir=..; \\\ else __mingw32_topdir=""; fi; \\\ diff --git a/macros.mingw64 b/macros.mingw64 index 8183fb2..cb37add 100644 --- a/macros.mingw64 +++ b/macros.mingw64 @@ -153,7 +153,9 @@ %mingw64_meson %{mingw64_env} ; \ unset CC CFLAGS CPPFLAGS CXX CXXFLAGS LD LDFLAGS; \\\ - export CFLAGS="%{mingw64_cflags}" CXXFLAGS="%{mingw64_cflags}" LDFLAGS="%{mingw64_ldflags}"; \\\ + CFLAGS="${MINGW64_CFLAGS-%mingw64_cflags}"; export CFLAGS; \\\ + CPPFLAGS="${MINGW64_CPPFLAGS-%mingw64_cppflags}"; export CPPFLAGS; \\\ + LDFLAGS="${MINGW64_LDFLAGS:-%mingw64_ldflags}"; export LDFLAGS; \\\ if test -f meson.build; then __mingw64_topdir=.; \\\ elif test -f ../meson.build; then __mingw64_topdir=..; \\\ else __mingw64_topdir=""; fi; \\\ diff --git a/mingw-filesystem.spec b/mingw-filesystem.spec index 4452a61..005f59f 100644 --- a/mingw-filesystem.spec +++ b/mingw-filesystem.spec @@ -6,7 +6,7 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: mingw-filesystem -Version: 117 +Version: 118 Release: 1%{?dist} Summary: MinGW cross compiler base filesystem and environment @@ -318,6 +318,9 @@ install -m 0644 %{SOURCE19} $RPM_BUILD_ROOT%{_datadir}/mingw/ %changelog +* Mon Jun 07 2021 Sandro Mani - 118-1 +- Allow overriding CFLAGS/CXXFLAGS/LDFLAGS for %%mingw_meson + * Mon Feb 01 2021 Sandro Mani - 117-1 - Filter Windows API umbrella libraries from requires