cross.bbclass: add virtclass handler

Allow use of BBCLASSEXTEND with 'cross' and use of virtclass-cross in
recipes.

(From OE-Core rev: 9624a817bb7d2d9fce10704b1c1a047f93260f36)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Otavio Salvador 2011-11-12 17:16:42 +00:00 committed by Richard Purdie
parent af85900ba7
commit ef5bad08de
1 changed files with 17 additions and 0 deletions

View File

@ -55,6 +55,23 @@ libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}"
do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}"
python cross_virtclass_handler () {
if not isinstance(e, bb.event.RecipePreFinalise):
return
classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
if "cross" not in classextend:
return
pn = e.data.getVar("PN", True)
if not pn.endswith("-cross"):
return
bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-cross", e.data)
}
addhandler cross_virtclass_handler
do_install () {
oe_runmake 'DESTDIR=${D}' install
}