diff options
Diffstat (limited to 'classes')
122 files changed, 4903 insertions, 3111 deletions
diff --git a/classes/amend.bbclass b/classes/amend.bbclass new file mode 100644 index 0000000000..2d928286b3 --- /dev/null +++ b/classes/amend.bbclass @@ -0,0 +1,45 @@ +# Allows tweaks to be amended to a recipe via a .inc in its FILESPATH +# +# Simply drop amend.inc into an appropriate place in a recipe's FILESPATH and +# it'll be parsed in after the recipe itself is. +# +# Copyright (c) 2009 MontaVista Software, Inc. All rights reserved. +# +# Released under the MIT license (see LICENSE.MIT for the terms) + +python () { + import bb, os + + filespath = d.getVar("FILESPATH", 1).split(":") + amendfiles = [os.path.join(fpath, "amend.inc") + for fpath in filespath] + + newdata = [] + seen = set() + for file in amendfiles: + if file in seen: + continue + seen.add(file) + + if os.path.exists(file): + bb.parse.handle(file, d, 1) + else: + # Manually add amend.inc files that don't exist to the __depends, to + # ensure that creating them invalidates the bitbake cache for that recipe. + newdata.append((file, 0)) + + if not newdata: + return + + depends = d.getVar("__depends", False) + bbversion = tuple(int(i) for i in bb.__version__.split(".")) + if bbversion < (1, 11, 0): + if depends is None: + depends = [] + depends += newdata + else: + if depends is None: + depends = set() + depends |= set(newdata) + d.setVar("__depends", depends) +} diff --git a/classes/angstrom-mirrors.bbclass b/classes/angstrom-mirrors.bbclass index 10bf75044f..1ba60e9252 100644 --- a/classes/angstrom-mirrors.bbclass +++ b/classes/angstrom-mirrors.bbclass @@ -1,3 +1,11 @@ +PREMIRRORS_append () { +cvs://.*/.* http://www.angstrom-distribution.org/unstable/sources/ +svn://.*/.* http://www.angstrom-distribution.org/unstable/sources/ +git://.*/.* http://www.angstrom-distribution.org/unstable/sources/ +hg://.*/.* http://www.angstrom-distribution.org/unstable/sources/ +bzr://.*/.* http://www.angstrom-distribution.org/unstable/sources/ +} + MIRRORS_append () { ftp://.*/.* http://www.angstrom-distribution.org/unstable/sources/ https?$://.*/.* http://www.angstrom-distribution.org/unstable/sources/ diff --git a/classes/angstrom.bbclass b/classes/angstrom.bbclass new file mode 100644 index 0000000000..4a810a638a --- /dev/null +++ b/classes/angstrom.bbclass @@ -0,0 +1,19 @@ +# anonymous support class for angstrom +# +# Features: +# +# * blacklist handling, set ANGSTROM_BLACKLIST_pn-blah = "message" +# + +python () { + import bb + + blacklist = bb.data.getVar("ANGSTROM_BLACKLIST", d, 1) + pkgnm = bb.data.getVar("PN", d, 1) + + if blacklist: + bb.note("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist)) + raise bb.parse.SkipPackage("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist)) + +} + diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 20f371a987..b2de2b13f7 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -1,11 +1,7 @@ -inherit base - # use autotools_stage_all for native packages AUTOTOOLS_NATIVE_STAGE_INSTALL = "1" -def autotools_dep_prepend(d): - import bb; - +def autotools_deps(d): if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1): return '' @@ -20,48 +16,70 @@ def autotools_dep_prepend(d): deps += 'libtool-native ' if not bb.data.inherits_class('native', d) \ and not bb.data.inherits_class('cross', d) \ + and not bb.data.inherits_class('sdk', d) \ and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1): deps += 'libtool-cross ' return deps + 'gnu-config-native ' EXTRA_OEMAKE = "" -DEPENDS_prepend = "${@autotools_dep_prepend(d)}" + +DEPEND |
