diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-10 13:53:17 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-10 13:53:17 +0000 |
commit | 4ecbf17b161b54780c26af2c6e90333f8825b013 (patch) | |
tree | d8b60ff4db8bf1495218ddc40beff722ecf8c698 /classes/native.bbclass | |
parent | ab35aa34f3de37365d46692555c8a2ec3667da56 (diff) |
native.bbclass: Add BBCLASSEXTEND support (from poky)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'classes/native.bbclass')
-rw-r--r-- | classes/native.bbclass | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/classes/native.bbclass b/classes/native.bbclass index f01aba30c2..6292e4b121 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -80,10 +80,38 @@ do_stage () { PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}" PKG_CONFIG_SYSROOT_DIR = "" +ORIG_DEPENDS := "${DEPENDS}" + +DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}" + 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) + + if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): + pn = bb.data.getVar("PN", d, True) + depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) + deps = bb.utils.explode_deps(depends) + newdeps = [] + for dep in deps: + if dep.endswith("-cross"): + newdeps.append(dep.replace("-cross", "-native")) + elif not dep.endswith("-native"): + + newdeps.append(dep + "-native") + else: + newdeps.append(dep) + bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d) + provides = bb.data.getVar("PROVIDES", d, True) + for prov in provides.split(): + if prov.find(pn) != -1: + continue + if not prov.endswith("-native"): + + provides = provides.replace(prov, prov + "-native") + bb.data.setVar("PROVIDES", provides, d) + bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d) } |