sg3-utils: add newer buildable version
[openembedded.git] / classes / scons.bbclass
index 6d0a783..1dbce0d 100644 (file)
@@ -1,14 +1,24 @@
 DEPENDS += "python-scons-native"
 
+export TARGET_LINK_HASH_STYLE
+EXTRA_OESCONS ?= ""
+
 scons_do_compile() {
-        ${STAGING_BINDIR_NATIVE}/scons PREFIX=${prefix} prefix=${prefix} || \
-        oefatal "scons build execution failed."
+    if [ "${SCONS_FIX_ENV}" = "1" ] ; then
+        if grep "toolchain-from-env" ${S}/SConstruct ; then
+            echo "Toolchain overrides already applied"
+        else
+           cat ${STAGING_DATADIR_NATIVE}/scons/toolchain-from-env.SConscript >> ${S}/SConstruct
+        fi
+    fi
+
+        ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
+        die "scons build execution failed."
 }
 
 scons_do_install() {
-       install -d ${D}${prefix}
-        ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} prefix=${D}${prefix} install || \
-        oefatal "scons install execution failed."
+        ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} prefix=${D}${prefix} install ${EXTRA_OESCONS}|| \
+        die "scons install execution failed."
 }
 
 EXPORT_FUNCTIONS do_compile do_install