oe.external: move common functions here

Also provide external-common.bbclass to wrap its inclusion and setup
associated metadata. This will make easier to search sysroots for files
without pulling in the rest of the external toolchain class.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2015-07-28 13:21:43 -07:00
parent 3dab88e583
commit bfc86fd9c4
15 changed files with 172 additions and 157 deletions

View File

@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
BUGTRACKER = "http://sourceware.org/bugzilla/"
SECTION = "devel"
PN .= "-${TARGET_ARCH}"
PV := "${@external_run(d, 'ld', '-v').splitlines()[0].split()[-1].rstrip()}"
PV := "${@oe.external.run(d, 'ld', '-v').splitlines()[0].split()[-1].rstrip()}"
LICENSE = "${@'GPLv3' if '${PV}'.split('.') > '2.17.50.0.12'.split('.') else 'GPLv2'}"
PROVIDES += "\