summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/autotools.bbclass3
-rw-r--r--classes/autotools_stage.bbclass1
-rw-r--r--classes/base.bbclass14
-rw-r--r--classes/chicken.bbclass11
-rw-r--r--classes/cmake.bbclass22
-rw-r--r--classes/corecdp-mirrors.bbclass4
-rw-r--r--classes/cpan_build.bbclass1
-rw-r--r--classes/efl.bbclass11
-rw-r--r--classes/gconf.bbclass4
-rw-r--r--classes/gettext.bbclass2
-rw-r--r--classes/glibc-package.bbclass305
-rw-r--r--classes/gtk-icon-cache.bbclass5
-rw-r--r--classes/icecc.bbclass12
-rw-r--r--classes/image.bbclass3
-rw-r--r--classes/insane.bbclass24
-rw-r--r--classes/java.bbclass2
-rw-r--r--classes/kernel-arch.bbclass2
-rw-r--r--classes/kernel.bbclass47
-rw-r--r--classes/linux-kernel-base.bbclass6
-rw-r--r--classes/mime.bbclass4
-rw-r--r--classes/module_strip.bbclass36
-rw-r--r--classes/native.bbclass2
-rw-r--r--classes/openmoko-base.bbclass1
-rw-r--r--classes/openmoko2.bbclass2
-rw-r--r--classes/package.bbclass76
-rw-r--r--classes/package_dbg.bbclass125
-rw-r--r--classes/package_deb.bbclass8
-rw-r--r--classes/package_ipk.bbclass19
-rw-r--r--classes/package_rpm.bbclass11
-rw-r--r--classes/package_tar.bbclass9
-rw-r--r--classes/packaged-staging.bbclass30
-rw-r--r--classes/packagehistory.bbclass6
-rw-r--r--classes/patch.bbclass7
-rw-r--r--classes/pkgconfig.bbclass4
-rw-r--r--classes/qemu.bbclass15
-rw-r--r--classes/qmake_base.bbclass3
-rw-r--r--classes/qt4x11.bbclass2
-rw-r--r--classes/rm_work.bbclass5
-rw-r--r--classes/sanity.bbclass34
-rw-r--r--classes/siteinfo.bbclass4
-rw-r--r--classes/sourcepkg.bbclass4
-rw-r--r--classes/src_distribute.bbclass2
-rw-r--r--classes/task.bbclass1
-rw-r--r--classes/tinderclient.bbclass5
-rw-r--r--classes/update-alternatives.bbclass1
-rw-r--r--classes/update-rc.d.bbclass1
-rw-r--r--classes/xfce.bbclass2
47 files changed, 651 insertions, 247 deletions
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index a944f0ec9f..1ea4b6f1d0 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -2,8 +2,6 @@
AUTOTOOLS_NATIVE_STAGE_INSTALL = "1"
def autotools_dep_prepend(d):
- import bb;
-
if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1):
return ''
@@ -34,7 +32,6 @@ 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 ""
diff --git a/classes/autotools_stage.bbclass b/classes/autotools_stage.bbclass
index 3007eef969..ff0f4cd880 100644
--- a/classes/autotools_stage.bbclass
+++ b/classes/autotools_stage.bbclass
@@ -3,4 +3,3 @@ inherit autotools
do_stage () {
autotools_stage_all
}
-
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 3602801f50..e6cfeccc46 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1072,7 +1072,6 @@ sysroot_stage_all() {
}
def is_legacy_staging(d):
- import bb
stagefunc = bb.data.getVar('do_stage', d, True)
legacy = True
if stagefunc is None:
@@ -1308,19 +1307,6 @@ def check_app_exists(app, d):
path = data.getVar('PATH', d, 1)
return len(which(path, app)) != 0
-def check_gcc3(data):
- # Primarly used by qemu to make sure we have a workable gcc-3.4.x.
- # Start by checking for the program name as we build it, was not
- # all host-provided gcc-3.4's will work.
-
- gcc3_versions = 'gcc-3.4.6 gcc-3.4.4 gcc34 gcc-3.4 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32'
-
- for gcc3 in gcc3_versions.split():
- if check_app_exists(gcc3, data):
- return gcc3
-
- return False
-
# Patch handling
inherit patch
diff --git a/classes/chicken.bbclass b/classes/chicken.bbclass
new file mode 100644
index 0000000000..5ebe1ff462
--- /dev/null
+++ b/classes/chicken.bbclass
@@ -0,0 +1,11 @@
+def chicken_arch(bb, d):
+ import re
+ arch_pattern = re.compile('^i.*86$')
+ target_arch = d.getVar("TARGET_ARCH", 1)
+ if arch_pattern.match(target_arch):
+ return 'x86'
+ else:
+ return target_arch
+
+CHICKEN_ARCH = "${@chicken_arch(bb, d)}"
+
diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
index 4978421b63..f21c4d6545 100644
--- a/classes/cmake.bbclass
+++ b/classes/cmake.bbclass
@@ -20,9 +20,27 @@ cmake_do_configure() {
cmake ${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
- -DCMAKE_FIND_ROOT_PATH=${STAGING_DIR_HOST} \
+ -DCMAKE_FIND_ROOT_PATH:PATH=${STAGING_DIR_HOST} \
${EXTRA_OECMAKE} \
-Wno-dev
}
-EXPORT_FUNCTIONS do_configure
+cmake_do_compile() {
+ if [ ${OECMAKE_BUILDPATH} ]
+ then
+ cd ${OECMAKE_BUILDPATH}
+ fi
+
+ base_do_compile
+}
+
+cmake_do_install() {
+ if [ ${OECMAKE_BUILDPATH} ];
+ then
+ cd ${OECMAKE_BUILDPATH}
+ fi
+
+ autotools_do_install
+}
+
+EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/classes/corecdp-mirrors.bbclass b/classes/corecdp-mirrors.bbclass
new file mode 100644
index 0000000000..0d1f0b4a7b
--- /dev/null
+++ b/classes/corecdp-mirrors.bbclass
@@ -0,0 +1,4 @@
+MIRRORS_append () {
+ftp://.*/.* http://www.multitech.net/corecdp/sources/
+https?$://.*/.* http://www.multitech.net/corecdp/sources/
+}
diff --git a/classes/cpan_build.bbclass b/classes/cpan_build.bbclass
index 2ca01996a9..b2ec8255de 100644
--- a/classes/cpan_build.bbclass
+++ b/classes/cpan_build.bbclass
@@ -12,7 +12,6 @@ INHIBIT_NATIVE_STAGE_INSTALL = "1"
# libmodule-build-perl)
#
def cpan_build_dep_prepend(d):
- import bb;
if bb.data.getVar('CPAN_BUILD_DEPS', d, 1):
return ''
pn = bb.data.getVar('PN', d, 1)
diff --git a/classes/efl.bbclass b/classes/efl.bbclass
index d4c3baa9cf..900d9c7f0d 100644
--- a/classes/efl.bbclass
+++ b/classes/efl.bbclass
@@ -11,16 +11,19 @@ PE = "2"
ARM_INSTRUCTION_SET = "arm"
-AUTOTOOLS_STAGE_PKGCONFIG = "1"
-# do NOT inherit pkgconfig here, see note in autotools_stage_all
inherit autotools
+# evas-native looks at this var, so keep it
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+
do_configure_prepend() {
touch config.rpath
}
-do_stage() {
- autotools_stage_all
+do_install_prepend () {
+ for i in `find ${S}/ -name "*.pc" -type f` ; do \
+ sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
+ done
}
# This construction is stupid, someone with more E knowledge should change it to =+ or something
diff --git a/classes/gconf.bbclass b/classes/gconf.bbclass
index 47df06329b..f55ae2c2ae 100644
--- a/classes/gconf.bbclass
+++ b/classes/gconf.bbclass
@@ -32,10 +32,10 @@ fi
python populate_packages_append () {
import os.path, re
packages = bb.data.getVar('PACKAGES', d, 1).split()
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ pkgdest = bb.data.getVar('PKGDEST', d, 1)
for pkg in packages:
- schema_dir = '%s/install/%s/etc/gconf/schemas' % (workdir, pkg)
+ schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
schemas = []
schema_re = re.compile(".*\.schemas$")
if os.path.exists(schema_dir):
diff --git a/classes/gettext.bbclass b/classes/gettext.bbclass
index bc0a1dfaba..b2ff2849fa 100644
--- a/classes/gettext.bbclass
+++ b/classes/gettext.bbclass
@@ -1,6 +1,5 @@
DEPENDS =+ "gettext-native"
def gettext_after_parse(d):
- import bb
# Remove the NLS bits if USE_NLS is no.
if bb.data.getVar('USE_NLS', d, 1) == 'no':
cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
@@ -15,4 +14,3 @@ python () {
DEPENDS =+ "gettext-native"
EXTRA_OECONF += "--enable-nls"
-
diff --git a/classes/glibc-package.bbclass b/classes/glibc-package.bbclass
new file mode 100644
index 0000000000..90b9bfd584
--- /dev/null
+++ b/classes/glibc-package.bbclass
@@ -0,0 +1,305 @@
+#
+# This class knows how to package up glibc. Its shared since prebuild binary toolchains
+# may need packaging and its pointless to duplicate this code.
+#
+# Caller should set GLIBC_INTERNAL_USE_BINARY_LOCALE to one of:
+# "compile" - Use QEMU to generate the binary locale files
+# "precompiled" - The binary locale files are pregenerated and already present
+# "ondevice" - The device will build the locale files upon first boot through the postinst
+
+inherit qemu
+
+GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice"
+
+PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-static glibc-doc glibc-locale libcidn libmemusage libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*"
+
+INSANE_SKIP_glibc-dbg = True
+
+libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc*.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
+
+# The problem is that if PN = "glibc", FILES_${PN} will overwrite FILES_glibc
+# Solution: Make them both the same thing, then it doesn't matter
+
+glibcfiles = "${libc_baselibs} ${libexecdir}/* ${datadir}/zoneinfo ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}"
+glibcdbgfiles = "${bindir}/.debug ${sbindir}/.debug ${libdir}/.debug \
+ ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug \
+ ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
+glibcdevfiles = "${bindir}/rpcgen ${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
+ ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${libdir}/*nonshared.a \
+ ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal"
+
+FILES_glibc = "${glibcfiles}"
+FILES_${PN} = "${glibcfiles}"
+FILES_ldd = "${bindir}/ldd"
+FILES_libsegfault = "${base_libdir}/libSegFault*"
+FILES_libcidn = "${base_libdir}/libcidn*.so"
+FILES_libmemusage = "${base_libdir}/libmemusage.so"
+FILES_glibc-extra-nss = "${base_libdir}/libnss*"
+FILES_sln = "${base_sbindir}/sln"
+FILES_glibc-dev = "${glibcdevfiles}"
+FILES_${PN}-dev = "${glibcdevfiles}"
+FILES_glibc-dbg = "${glibcdbgfiles}"
+FILES_${PN}-dbg = "${glibcdbgfiles}"
+FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*"
+FILES_glibc-utils = "${bindir}/* ${sbindir}/*"
+FILES_glibc-gconv = "${libdir}/gconv/*"
+FILES_catchsegv = "${bindir}/catchsegv"
+RDEPENDS_catchsegv = "libsegfault"
+FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so"
+FILES_glibc-thread-db = "${base_libdir}/libthread_db*"
+FILES_localedef = "${bindir}/localedef"
+RPROVIDES_glibc-dev += "libc-dev"
+
+DESCRIPTION_sln = "glibc: create symbolic links between files"
+DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts"
+DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services"
+DESCRIPTION_ldd = "glibc: print shared library dependencies"
+DESCRIPTION_localedef = "glibc: compile locale definition files"
+DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
+
+TMP_LOCALE="/tmp/locale${libdir}/locale"
+
+locale_base_postinst() {
+#!/bin/sh
+
+if [ "x$D" != "x" ]; then
+ exit 1
+fi
+
+rm -rf ${TMP_LOCALE}
+mkdir -p ${TMP_LOCALE}
+if [ -f ${libdir}/locale/locale-archive ]; then
+ cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/
+fi
+localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
+mkdir -p ${libdir}/locale/
+mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
+rm -rf ${TMP_LOCALE}
+}
+
+locale_base_postrm() {
+#!/bin/sh
+
+rm -rf ${TMP_LOCALE}
+mkdir -p ${TMP_LOCALE}
+if [ -f ${libdir}/locale/locale-archive ]; then
+ cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/
+fi
+localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
+mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
+rm -rf ${TMP_LOCALE}
+}
+
+do_prep_locale_tree() {
+ treedir=${WORKDIR}/locale-tree
+ rm -rf $treedir
+ mkdir -p $treedir/bin $treedir/lib $treedir/${datadir} $treedir/${libdir}/locale
+ cp -pPR ${PKGD}${datadir}/i18n $treedir/${datadir}/i18n
+ # unzip to avoid parsing errors
+ for i in $treedir/${datadir}/i18n/charmaps/*gz; do
+ gunzip $i
+ done
+ ls -d ${PKGD}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
+ if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
+ cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
+ fi
+ if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
+ cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
+ fi
+ install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin
+}
+
+do_collect_bins_from_locale_tree() {
+ treedir=${WORKDIR}/locale-tree
+
+ mkdir -p ${PKGD}${libdir}
+ cp -pPR $treedir/${libdir}/locale ${PKGD}${libdir}
+}
+
+python package_do_split_gconvs () {
+ import os, re
+ if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'):
+ bb.note("package requested not splitting gconvs")
+ return
+
+ if not bb.data.getVar('PACKAGES', d, 1):
+ return
+
+ libdir = bb.data.getVar('libdir', d, 1)
+ if not libdir:
+ bb.error("libdir not defined")
+ return
+ datadir = bb.data.getVar('datadir', d, 1)
+ if not datadir:
+ bb.error("datadir not defined")
+ return
+
+ gconv_libdir = base_path_join(libdir, "gconv")
+ charmap_dir = base_path_join(datadir, "i18n", "charmaps")
+ locales_dir = base_path_join(datadir, "i18n", "locales")
+ binary_locales_dir = base_path_join(libdir, "locale")
+
+ do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s', extra_depends='glibc-gconv')
+
+ do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', extra_depends='')
+
+ def calc_locale_deps(fn, pkg, file_regex, output_pattern, group):
+ deps = []
+ f = open(fn, "r")
+ c_re = re.compile('^copy "(.*)"')
+ i_re = re.compile('^include "(\w+)".*')
+ for l in f.readlines():
+ m = c_re.match(l) or i_re.match(l)
+ if m:
+ dp = legitimize_package_name('glibc-localedata-%s' % m.group(1))
+ if not dp in deps:
+ deps.append(dp)
+ f.close()
+ if deps != []:
+ bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d)
+
+ do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
+ bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
+
+ use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
+
+ dot_re = re.compile("(.*)\.(.*)")
+
+ if use_bin != "precompiled":
+ supported = bb.data.getVar('GLIBC_GENERATE_LOCALES', d, 1)
+ if not supported or supported == "all":
+ f = open(base_path_join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
+ supported = f.readlines()
+ f.close()
+ else:
+ supported = supported.split()
+ supported = map(lambda s:s.replace(".", " ") + "\n", supported)
+ else:
+ supported = []
+ full_bin_path = bb.data.getVar('PKGD', d, True) + binary_locales_dir
+ for dir in os.listdir(full_bin_path):
+ dbase = dir.split(".")
+ d2 = " "
+ if len(dbase) > 1:
+ d2 = "." + dbase[1].upper() + " "
+ supported.append(dbase[0] + d2)
+
+ # Collate the locales by base and encoding
+ utf8_only = int(bb.data.getVar('LOCALE_UTF8_ONLY', d, 1) or 0)
+ encodings = {}
+ for l in supported:
+ l = l[:-1]
+ (locale, charset) = l.split(" ")
+ if utf8_only and charset != 'UTF-8':
+ continue
+ m = dot_re.match(locale)
+ if m:
+ locale = m.group(1)
+ if not encodings.has_key(locale):
+ encodings[locale] = []
+ encodings[locale].append(charset)
+
+ def output_locale_source(name, pkgname, locale, encoding):
+ bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
+ bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d)
+ bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d)
+
+ def output_locale_binary_rdepends(name, pkgname, locale, encoding):
+ m = re.match("(.*)\.(.*)", name)
+ if m:
+ glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
+ else:
+ glibc_name = name
+ bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d)
+
+ def output_locale_binary(name, pkgname, locale, encoding):
+ # This is a hack till linux-libc-headers gets patched for the missing arm syscalls and all arm device kernels as well
+ if bb.data.getVar("DISTRO_NAME", d, 1) == "Angstrom":
+ kernel_ver = "2.6.24"
+ elif bb.data.getVar("DISTRO_NAME", d, 1) == "KaeilOS":
+ kernel_ver = "2.6.24"
+ else:
+ kernel_ver = bb.data.getVar("OLDEST_KERNEL", d, 1)
+
+ qemu = qemu_target_binary(d) + " -s 1048576"
+ if kernel_ver:
+ qemu += " -r %s" % (kernel_ver)
+ pkgname = 'locale-base-' + legitimize_package_name(name)
+
+ treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree")
+ ldlibdir = "%s/lib" % treedir
+ path = bb.data.getVar("PATH", d, 1)
+ i18npath = base_path_join(treedir, datadir, "i18n")
+
+ localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name)
+
+ qemu_options = bb.data.getVar("QEMU_OPTIONS_%s" % bb.data.getVar('PACKAGE_ARCH', d, 1), d, 1)
+ if not qemu_options:
+ qemu_options = bb.data.getVar('QEMU_OPTIONS', d, 1)
+
+ cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, ldlibdir, qemu_options, treedir, localedef_opts)
+ bb.note("generating locale %s (%s)" % (locale, encoding))
+ if os.system(cmd):
+ raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd)
+
+ def output_locale(name, locale, encoding):
+ pkgname = 'locale-base-' + legitimize_package_name(name)
+ bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d)
+ bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d)
+ rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
+ m = re.match("(.*)_(.*)", name)
+ if m:
+ rprovides += ' virtual-locale-%s' % m.group(1)
+ bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d)
+ if use_bin == "compile":
+ output_locale_binary_rdepends(name, pkgname, locale, encoding)
+ output_locale_binary(name, pkgname, locale, encoding)
+ elif use_bin == "precompiled":
+ output_locale_binary_rdepends(name, pkgname, locale, encoding)
+ else:
+ output_locale_source(name, pkgname, locale, encoding)
+
+ if use_bin == "compile":
+ bb.note("preparing tree for binary locale generation")
+ bb.build.exec_func("do_prep_locale_tree", d)
+
+ # Reshuffle names so that UTF-8 is preferred over other encodings
+ non_utf8 = []
+ for l in encodings.keys():
+ if len(encodings[l]) == 1:
+ output_locale(l, l, encodings[l][0])
+ if encodings[l][0] != "UTF-8":
+ non_utf8.append(l)
+ else:
+ if "UTF-8" in encodings[l]:
+ output_locale(l, l, "UTF-8")
+ encodings[l].remove("UTF-8")
+ else:
+ non_utf8.append(l)
+ for e in encodings[l]:
+ output_locale('%s.%s' % (l, e), l, e)
+
+ if non_utf8 != [] and use_bin != "precompiled":
+ bb.note("the following locales are supported only in legacy encodings:")
+ bb.note(" " + " ".join(non_utf8))
+
+ if use_bin == "compile":
+ bb.note("collecting binary locales from locale tree")
+ bb.build.exec_func("do_collect_bins_from_locale_tree", d)
+ do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True)
+ elif use_bin == "precompiled":
+ do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True)
+ else:
+ bb.note("generation of binary locales disabled. this may break i18n!")
+
+}
+
+# We want to do this indirection so that we can safely 'return'
+# from the called function even though we're prepending
+python populate_packages_prepend () {
+ if bb.data.getVar('DEBIAN_NAMES', d, 1):
+ bb.data.setVar('PKG_glibc', 'libc6', d)
+ bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d)
+ bb.build.exec_func('package_do_split_gconvs', d)
+}
diff --git a/classes/gtk-icon-cache.bbclass b/classes/gtk-icon-cache.bbclass
index ea1fdff3dd..524c2f0c46 100644
--- a/classes/gtk-icon-cache.bbclass
+++ b/classes/gtk-icon-cache.bbclass
@@ -27,12 +27,11 @@ done
}
python populate_packages_append () {
- import os.path
packages = bb.data.getVar('PACKAGES', d, 1).split()
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ pkgdest = bb.data.getVar('PKGDEST', d, 1)
for pkg in packages:
- icon_dir = '%s/install/%s/%s/icons' % (workdir, pkg, bb.data.getVar('datadir', d, 1))
+ icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, bb.data.getVar('datadir', d, 1))
if not os.path.exists(icon_dir):
continue
diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass
index 0eb2d9feee..0a22f70001 100644
--- a/classes/icecc.bbclass
+++ b/classes/icecc.bbclass
@@ -33,10 +33,8 @@ def icc_determine_gcc_version(gcc):
'i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)'
"""
- import os
return os.popen("%s --version" % gcc ).readline().split()[2]
-
def create_cross_env(bb,d):
"""
Create a tar.bz2 of the current toolchain
@@ -47,7 +45,7 @@ def create_cross_env(bb,d):
if len(prefix) == 0:
return ""
- import tarfile, socket, time, os
+ import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d)
@@ -97,7 +95,7 @@ def create_cross_env(bb,d):
def create_native_env(bb,d):
- import tarfile, socket, time, os
+ import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d)
@@ -144,7 +142,7 @@ def get_cross_kernel_cc(bb,d):
def create_cross_kernel_env(bb,d):
- import tarfile, socket, time, os
+ import tarfile, socket, time
ice_dir = bb.data.expand('${CROSS_DIR}', d)
prefix = bb.data.expand('${HOST_PREFIX}' , d)
distro = bb.data.expand('${DISTRO}', d)
@@ -210,8 +208,6 @@ def create_path(compilers, type, bb, d):
"""
Create Symlinks for the icecc in the staging directory
"""
- import os
-
staging = os.path.join(bb.data.expand('${STAGING_DIR}', d), "ice", type)
#check if the icecc path is set by the user
@@ -256,7 +252,7 @@ def icc_path(bb,d):
#"system" package blacklist contains a list of packages that can not distribute compile tasks
#for one reason or the other
- system_package_blacklist = [ "uclibc", "glibc", "gcc", "qemu", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman" ]
+ system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman" ]
user_package_blacklist = (bb.data.getVar('ICECC_USER_PACKAGE_BL', d) or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
diff --git a/classes/image.bbclass b/classes/image.bbclass
index ab580312bb..9dce609733 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -17,6 +17,9 @@ IMAGE_INITSCRIPTS ?= "initscripts"
#
IMAGE_LOGIN_MANAGER ?= "tinylogin"
+# set sane default for the SPLASH variable
+SPLASH ?= ""
+
IMAGE_KEEPROOTFS ?= ""
IMAGE_KEEPROOTFS[doc] = "Set to non-empty to keep ${IMAGE_ROOTFS} around after image creation."
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 950bb9771e..804caf06ee 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -61,6 +61,7 @@ def package_qa_get_machine_dict():
"i486": ( 3, 0, 0, True, True),
"i586": ( 3, 0, 0, True, True),
"i686": ( 3, 0, 0, True, True),
+ "mips": ( 8, 0, 0, False, True),
"mipsel": ( 8, 0, 0, True, True),
"avr32": (6317, 0, 0, False, True),
"sh4": (42, 0, 0, True, True),
@@ -181,7 +182,6 @@ def package_qa_get_elf(path, bits32):
def package_qa_clean_path(path,d):
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
- import bb
return path.replace(bb.data.getVar('TMPDIR',d,True),"")
def package_qa_make_fatal_error(error_class, name, path,d):
@@ -196,7 +196,6 @@ def package_qa_write_error(error_class, name, path, d):
"""
Log the error
"""
- import bb, os
if not bb.data.getVar('QA_LOG', d):
bb.note("a QA error occured but will not be logged because QA_LOG is not set")
return
@@ -221,7 +220,6 @@ def package_qa_write_error(error_class, name, path, d):
f.close()
def package_qa_handle_error(error_class, error_msg, name, path, d):
- import bb
bb.error("QA Issue with %s: %s" % (name, error_msg))
package_qa_write_error(error_class, name, path, d)
return not package_qa_make_fatal_error(error_class, name, path, d)
@@ -258,7 +256,6 @@ def package_qa_check_dev(path, name,d, elf):
Check for ".so" library symlinks in non-dev packages
"""
- import bb, os
sane = True
# SDK packages are special.
@@ -279,7 +276,6 @@ def package_qa_check_dbg(path, name,d, elf):
Chec