From ee0faf1346cabb0c90f43891ede3f88878f87b8b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Jan 2009 11:27:13 +0000 Subject: native/sdk.bbclass: Handle DEPENDS and PROVIDES fields magically, remove a number of xorg sdk and native packages replacing with BBCLASSEXTEND --- meta/classes/sdk.bbclass | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'meta/classes/sdk.bbclass') diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass index 62d4b2b6f..dd62e2a02 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) + +} + + -- cgit v1.2.3