From c5f5b6b1c0720a672722fb29cac4d556d96e8393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Wed, 5 Feb 2020 13:26:07 +0100 Subject: [PATCH] Use %%set_build_flags macro to export buildflags, if available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Björn Esser --- ninja-build.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ninja-build.spec b/ninja-build.spec index 4416b47..aec45b8 100644 --- a/ninja-build.spec +++ b/ninja-build.spec @@ -37,7 +37,15 @@ fast as possible. %autosetup -n ninja-%{version} -p1 %build -CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \ +%if 0%{?set_build_flags:1} +%{set_build_flags} +%else +CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS +CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS +FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS +FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS +%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} +%endif %if 0%{?rhel} && 0%{?rhel} <= 7 %{__python2} \ %else @@ -92,6 +100,7 @@ ln -s ninja %{buildroot}%{_bindir}/ninja-build %changelog * Wed Feb 05 2020 Björn Esser - 1.9.0-5 - Add conditional for bootstrapping new architectures +- Use %%set_build_flags macro to export buildflags, if available * Wed Jan 29 2020 Fedora Release Engineering - 1.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild