[cmake] Sync FFLAGS and LDFLAGS in the %cmake macro with redhat-rpm-config.

Orion Poplawski orion at fedoraproject.org
Tue Sep 13 21:56:13 UTC 2011


commit d8fd6d266c97f2f8cff1e97696a7be07437151c8
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Tue Sep 13 15:55:59 2011 -0600

    Sync FFLAGS and LDFLAGS in the %cmake macro with redhat-rpm-config.

 cmake.spec   |    5 ++++-
 macros.cmake |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/cmake.spec b/cmake.spec
index 674b2c7..8637290 100644
--- a/cmake.spec
+++ b/cmake.spec
@@ -8,7 +8,7 @@
 
 Name:           cmake
 Version:        2.8.6
-Release:        0.2.rc2%{?dist}
+Release:        0.3.rc2%{?dist}
 Summary:        Cross-platform make system
 
 Group:          Development/Tools
@@ -160,6 +160,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 
 
 %changelog
+* Sun Sep 11 2011 Ville Skyttä <ville.skytta at iki.fi> - 2.8.6-0.3.rc2
+- Sync FFLAGS and LDFLAGS in the %%cmake macro with redhat-rpm-config.
+
 * Tue Sep 6 2011 Orion Poplawski <orion at cora.nwra.com> - 2.8.6-0.2.rc2
 - Update to 2.8.6 RC 2
 - Drop aclocal patch
diff --git a/macros.cmake b/macros.cmake
index cae6394..cc4df56 100644
--- a/macros.cmake
+++ b/macros.cmake
@@ -9,7 +9,8 @@
 %cmake \
   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
   CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
-  FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
+  FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
+  %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
   %__cmake \\\
         -DCMAKE_VERBOSE_MAKEFILE=ON \\\
         -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\


More information about the scm-commits mailing list