SOURCES: rpm.macros - pass same flags to %scons as to %configure -...

glen glen at pld-linux.org
Thu Jun 14 22:31:06 CEST 2007


Author: glen                         Date: Thu Jun 14 20:31:06 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- pass same flags to %scons as to %configure
- also pass prefix and libprefix

---- Files affected:
SOURCES:
   rpm.macros (1.384 -> 1.385) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.384 SOURCES/rpm.macros:1.385
--- SOURCES/rpm.macros:1.384	Sun Jun  3 19:43:47 2007
+++ SOURCES/rpm.macros	Thu Jun 14 22:31:01 2007
@@ -147,10 +147,18 @@
 }
 
 # override __scons to add -j4 in your ~/.rpmmacros for parallel make
-# TODO: find way to pass CC/CXX and CC/CXXFLAGS
 %__scons	/usr/bin/scons
 %scons { \
 %{__scons} \
+	LDFLAGS="${LDFLAGS:-%rpmldflags}" \
+	CFLAGS="${CFLAGS:-%rpmcflags}" \
+	CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" \
+	FFLAGS="${FFLAGS:-%rpmcflags}" \
+	CPPFLAGS="${CPPFLAGS:-}" \
+	%{?__cc:CC="%{__cc}"} \
+	%{?__cxx:CXX="%{__cxx}"} \
+	libsuffix=%{_lib} \
+	prefix=%{_prefix} \
 }
 
 # waf. see waf.spec
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rpm.macros?r1=1.384&r2=1.385&f=u



More information about the pld-cvs-commit mailing list