summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-03 11:27:13 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-03 16:25:39 +0000
commitee0faf1346cabb0c90f43891ede3f88878f87b8b (patch)
tree7a31547ef9e139377a1aa3f57098183d013a2a7c /meta/classes
parentade351e2f4c3693d4c2ecf3891899c2dcd082491 (diff)
downloadopenembedded-core-ee0faf1346cabb0c90f43891ede3f88878f87b8b.tar.gz
openembedded-core-ee0faf1346cabb0c90f43891ede3f88878f87b8b.tar.bz2
openembedded-core-ee0faf1346cabb0c90f43891ede3f88878f87b8b.zip
native/sdk.bbclass: Handle DEPENDS and PROVIDES fields magically, remove a number of xorg sdk and native packages replacing with BBCLASSEXTEND
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/native.bbclass18
-rw-r--r--meta/classes/sdk.bbclass31
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 8f79935040..9f6501f583 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)
+}
+
diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
index 62d4b2b6f9..dd62e2a028 100644
--- a/meta/classes/sdk.bbclass
+++ b/meta/classes/sdk.bbclass
@@ -71,3 +71,34 @@ python () {
bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
}
+python __anonymous () {
+ pn = bb.data.getVar("PN", d, True)
+ depends = bb.data.getVar("DEPENDS", d, True)
+ deps = bb.utils.explode_deps(depends)
+ if "sdk" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
+ autoextend = True
+ else:
+ autoextend = False
+ for dep in deps:
+ if dep.endswith("-native") or dep.endswith("-cross") or dep.startswith("virtual/"):
+ continue
+ if not dep.endswith("-sdk"):
+ if autoextend:
+ depends = depends.replace(dep, dep + "-sdk")
+ else:
+ bb.note("%s has depends %s which doesn't end in -sdk?" % (pn, dep))
+ bb.data.setVar("DEPENDS", depends, d)
+ provides = bb.data.getVar("PROVIDES", d, True)
+ for prov in provides.split():
+ if prov.find(pn) != -1:
+ continue
+ if not prov.endswith("-sdk"):
+ if autoextend:
+ provides = provides.replace(prov, prov + "-sdk")
+ #else:
+ # bb.note("%s has rouge PROVIDES of %s which doesn't end in -sdk?" % (pn, prov))
+ bb.data.setVar("PROVIDES", provides, d)
+
+}
+
+