[oe-commits] Richard Purdie : native.bbclass: If do_stage isn't overridden, allow do_install to run for native packages (from Poky)

git version control git at git.openembedded.org
Tue Nov 10 13:47:24 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 177d10d75a8d8d9357d42b7b95a937ffe1e1c88b
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=177d10d75a8d8d9357d42b7b95a937ffe1e1c88b

Author: Richard Purdie <rpurdie at linux.intel.com>
Date:   Mon Nov  2 17:34:43 2009 +0000

native.bbclass: If do_stage isn't overridden, allow do_install to run for native packages (from Poky)

Signed-off-by: Richard Purdie <rpurdie at linux.intel.com>

---

 classes/native.bbclass |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/classes/native.bbclass b/classes/native.bbclass
index 70ec81f..f01aba3 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -62,22 +62,28 @@ STAGING_DIR_TARGET = ""
 SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs"
 PKG_CONFIG_DIR = "${libdir}/pkgconfig"
 
-
-do_stage () {
-	if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
+do_stage_native () {
+	# If autotools is active, use the autotools staging function, else 
+	# use our "make install" equivalent
+	if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" == "1" ]
 	then
-		if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" != "1" ]
-		then
-			oe_runmake install
-		else
-			autotools_stage_all
-		fi
+		autotools_stage_all
+	else
+		oe_runmake install
 	fi
 }
 
-do_install () {
-	true
+do_stage () {
+	do_stage_native
 }
 
 PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
 PKG_CONFIG_SYSROOT_DIR = ""
+
+python __anonymous () {
+    # If we've a legacy native do_stage, we need to neuter do_install
+    stagefunc = bb.data.getVar('do_stage', d, True)
+    if (stagefunc.strip() != "do_stage_native" and stagefunc.strip() != "autotools_stage_all") and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1":
+        bb.data.setVar("do_install", "      :", d)
+}
+





More information about the Openembedded-commits mailing list