summaryrefslogtreecommitdiff
path: root/meta/classes/native.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/native.bbclass')
-rw-r--r--meta/classes/native.bbclass18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 8f7993504..9f6501f58 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -95,3 +95,21 @@ do_install () {
PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
PKG_CONFIG_SYSROOT_DIR = ""
+
+python __anonymous () {
+ pn = bb.data.getVar("PN", d, True)
+ depends = bb.data.getVar("DEPENDS", d, True)
+ deps = bb.utils.explode_deps(depends)
+ if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
+ autoextend = True
+ else:
+ autoextend = False
+ for dep in deps:
+ if not dep.endswith("-native"):
+ if autoextend:
+ depends = depends.replace(dep, dep + "-native")
+ else:
+ bb.note("%s has depends %s which doesn't end in -native?" % (pn, dep))
+ bb.data.setVar("DEPENDS", depends, d)
+}
+