diff options
Diffstat (limited to 'classes')
114 files changed, 3922 insertions, 3135 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/autotools.bbclass b/classes/autotools.bbclass index 8236a27c76..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 '' @@ -27,42 +23,63 @@ def autotools_dep_prepend(d): return deps + 'gnu-config-native ' EXTRA_OEMAKE = "" -DEPENDS_prepend = "${@autotools_dep_prepend(d)}" + +DEPENDS_prepend = "${@autotools_deps(d)}" +DEPENDS_virtclass-native_prepend = "${@autotools_deps(d)}" +DEPENDS_virtclass-nativesdk_prepend = "${@autotools_deps(d)}" + +inherit siteinfo + +def _autotools_get_sitefiles(d): + def inherits(d, *classes): + if any(bb.data.inherits_class(cls, d) for cls in classes): + return True + + if inherits(d, "native", "nativesdk"): + return + + sitedata = siteinfo_data(d) + for path in d.getVar("BBPATH", True).split(":"): + for element in sitedata: + filename = os.path.join(path, "site", element) + if os.path.exists(filename): + yield filename + +# Space separated list of shell scripts with variables defined to supply test +# results for autoconf tests we cannot run at build time. +export CONFIG_SITE = "${@' '.join(_autotools_get_sitefiles(d))}" + acpaths = "default" EXTRA_AUTORECONF = "--exclude=autopoint" def autotools_set_crosscompiling(d): - import bb if not bb.data.inherits_class('native', d): return " cross_compiling=yes" return "" # EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" +CONFIGUREOPTS = " --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${oldincludedir} \ + --infodir=${infodir} \ + --mandir=${mandir}" + oe_runconf () { if [ -x ${S}/configure ] ; then - cfgcmd="${S}/configure \ - --build=${BUILD_SYS} \ - --host=${HOST_SYS} \ - --target=${TARGET_SYS} \ - --prefix=${prefix} \ - --exec_prefix=${exec_prefix} \ - --bindir=${bindir} \ - --sbindir=${sbindir} \ - --libexecdir=${libexecdir} \ - --datadir=${datadir} \ - --sysconfdir=${sysconfdir} \ - --sharedstatedir=${sharedstatedir} \ - --localstatedir=${localstatedir} \ - --libdir=${libdir} \ - --includedir=${includedir} \ - --oldincludedir=${oldincludedir} \ - --infodir=${infodir} \ - --mandir=${mandir} \ - ${EXTRA_OECONF} \ - $@" - oenote "Running $cfgcmd..." - $cfgcmd || oefatal "oe_runconf failed" + ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" else oefatal "no configure script found" fi @@ -115,21 +132,29 @@ autotools_do_configure() { else CONFIGURE_AC=configure.ac fi - if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then + if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then : do nothing -- we still have an old unmodified configure.ac else oenote Executing glib-gettextize --force --copy echo "no" | glib-gettextize --force --copy fi + else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then + if [ -e ${STAGING_DATADIR}/gettext/config.rpath ]; then + |
