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