summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-19 22:37:45 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-19 22:37:45 +0000
commit1e549b98e1afbc91a5673dd00954f7c4a358b8c0 (patch)
tree835affae2c6b4ecd8dd54887a4daf9c123e28bed /meta
parentebf6159c7b63ae01d20b83fdb38201189f0f9a1e (diff)
downloadopenembedded-core-1e549b98e1afbc91a5673dd00954f7c4a358b8c0.tar.gz
openembedded-core-1e549b98e1afbc91a5673dd00954f7c4a358b8c0.tar.bz2
openembedded-core-1e549b98e1afbc91a5673dd00954f7c4a358b8c0.zip
glibc: Separate out core glibc packaging functionality into a class
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/glibc-package.bbclass (renamed from meta/packages/glibc/glibc-package.bbclass)95
-rw-r--r--meta/packages/glibc/glibc_2.3.5+cvs20050627.bb2
-rw-r--r--meta/packages/glibc/glibc_2.4.bb2
-rw-r--r--meta/packages/glibc/glibc_2.5.bb2
-rw-r--r--meta/packages/glibc/glibc_2.6.1.bb2
-rw-r--r--meta/packages/glibc/glibc_2.9.bb2
-rw-r--r--meta/packages/glibc/glibc_csl-2005q3-2.bb2
7 files changed, 21 insertions, 86 deletions
diff --git a/meta/packages/glibc/glibc-package.bbclass b/meta/classes/glibc-package.bbclass
index 561805a66e..b16daa47f7 100644
--- a/meta/packages/glibc/glibc-package.bbclass
+++ b/meta/classes/glibc-package.bbclass
@@ -1,37 +1,20 @@
#
-# For now, we will skip building of a gcc package if it is a uclibc one
-# and our build is not a uclibc one, and we skip a glibc one if our build
-# is a uclibc build.
+# This class knows how to package up glibc. Its shared since prebuild binary toolchains
+# may need packaging and its pointless to duplicate this code.
#
-# See the note in gcc/gcc_3.4.0.oe
-#
-
-python __anonymous () {
- import bb, re
- uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
- if uc_os:
- raise bb.parse.SkipPackage("incompatible with target %s" %
- bb.data.getVar('TARGET_OS', d, 1))
-}
-
-
-# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
-# is set. The idea is to avoid running localedef on the target (at first boot)
-# to decrease initial boot time and avoid localedef being killed by the OOM
-# killer which used to effectively break i18n on machines with < 128MB RAM.
+# 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
-# default to disabled until qemu works for everyone
-ENABLE_BINARY_LOCALE_GENERATION ?= "0"
+GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice"
-# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
-BINARY_LOCALE_ARCHES ?= "arm.*"
-
-PACKAGES = "${PN}-dbg ${PN} catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*"
libc_baselibs = "${base_libdir}/libc* ${base_libdir}/libm* ${base_libdir}/ld* ${base_libdir}/libpthread* ${base_libdir}/libresolv* ${base_libdir}/librt* ${base_libdir}/libutil* ${base_libdir}/libnsl* ${base_libdir}/libnss_files* ${base_libdir}/libnss_compat* ${base_libdir}/libnss_dns* ${base_libdir}/libdl* ${base_libdir}/libanl* ${base_libdir}/libBrokenLocale*"
-FILES_${PN} = "${sysconfdir} ${libc_baselibs} ${base_sbindir}/ldconfig ${libexecdir}/* ${datadir}/zoneinfo"
+FILES_glibc = "${sysconfdir} ${libc_baselibs} ${base_sbindir}/ldconfig ${libexecdir}/* ${datadir}/zoneinfo"
FILES_ldd = "${bindir}/ldd"
FILES_libsegfault = "${base_libdir}/libSegFault*"
FILES_glibc-extra-nss = "${base_libdir}/libnss*"
@@ -40,7 +23,9 @@ FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*"
FILES_glibc-utils = "${bindir}/* ${sbindir}/*"
FILES_glibc-gconv = "${libdir}/gconv/*"
-FILES_${PN}-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
+FILES_glibc-dbg = "${bindir}/.debug ${sbindir}/.debug ${libdir}/.debug \
+ ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug \
+ ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so"
@@ -55,36 +40,6 @@ 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, ..."
-def get_glibc_fpu_setting(bb, d):
- if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
- return "--without-fp"
- return ""
-
-EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
-EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
-
-OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
-
-do_install() {
- oe_runmake install_root=${D} install
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
- done
- install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
- install -d ${D}${libdir}/locale
- make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
- # get rid of some broken files...
- for i in ${GLIBC_BROKEN_LOCALES}; do
- grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
- mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
- done
- rm -f ${D}/etc/rpc
- rm -f ${D}${includedir}/scsi/sg.h
- rm -f ${D}${includedir}/scsi/scsi_ioctl.h
- rm -f ${D}${includedir}/scsi/scsi.h
-}
-
TMP_LOCALE="/tmp/locale${libdir}/locale"
locale_base_postinst() {
@@ -118,26 +73,6 @@ mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
rm -rf ${TMP_LOCALE}
}
-python __anonymous () {
- enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
-
- if enabled and int(enabled):
- import re
-
- target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
- binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
-
- for regexp in binary_arches.split(" "):
- r = re.compile(regexp)
-
- if r.match(target_arch):
- depends = bb.data.getVar("DEPENDS", d, 1)
- depends = "%s qemu-native" % depends
- bb.data.setVar("DEPENDS", depends, d)
- bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "1", d)
- break
-}
-
do_prep_locale_tree() {
treedir=${WORKDIR}/locale-tree
rm -rf $treedir
@@ -276,13 +211,13 @@ python package_do_split_gconvs () {
def output_locale(name, locale, encoding):
use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
- if use_bin:
+ if use_bin == "compile":
output_locale_binary(name, locale, encoding)
else:
output_locale_source(name, locale, encoding)
use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
- if use_bin:
+ if use_bin == "compile":
bb.note("preparing tree for binary locale generation")
bb.build.exec_func("do_prep_locale_tree", d)
@@ -307,7 +242,7 @@ python package_do_split_gconvs () {
bb.note(" " + " ".join(non_utf8))
use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
- if use_bin:
+ 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)
diff --git a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
index 3111ed3583..8c44c21156 100644
--- a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
+++ b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
@@ -107,4 +107,4 @@ do_compile () {
require glibc-stage.inc
-require glibc-package.bbclass
+require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.4.bb b/meta/packages/glibc/glibc_2.4.bb
index 3f184a6b13..3102c5953c 100644
--- a/meta/packages/glibc/glibc_2.4.bb
+++ b/meta/packages/glibc/glibc_2.4.bb
@@ -134,4 +134,4 @@ do_compile () {
require glibc-stage.inc
-require glibc-package.bbclass
+require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.5.bb b/meta/packages/glibc/glibc_2.5.bb
index 5f95280584..a63b678949 100644
--- a/meta/packages/glibc/glibc_2.5.bb
+++ b/meta/packages/glibc/glibc_2.5.bb
@@ -145,4 +145,4 @@ do_compile () {
require glibc-stage.inc
-require glibc-package.bbclass
+require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.6.1.bb b/meta/packages/glibc/glibc_2.6.1.bb
index 3521f66fe3..790fdde97a 100644
--- a/meta/packages/glibc/glibc_2.6.1.bb
+++ b/meta/packages/glibc/glibc_2.6.1.bb
@@ -151,4 +151,4 @@ do_compile () {
require glibc-stage.inc
-require glibc-package.bbclass
+require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.9.bb b/meta/packages/glibc/glibc_2.9.bb
index 75f56d6146..7e3c70e204 100644
--- a/meta/packages/glibc/glibc_2.9.bb
+++ b/meta/packages/glibc/glibc_2.9.bb
@@ -155,6 +155,6 @@ do_compile () {
require glibc-stage.inc
-require glibc-package.bbclass
+require glibc-package.inc
BBCLASSEXTEND = "nativesdk"
diff --git a/meta/packages/glibc/glibc_csl-2005q3-2.bb b/meta/packages/glibc/glibc_csl-2005q3-2.bb
index d2aa11605b..b1ea27dec5 100644
--- a/meta/packages/glibc/glibc_csl-2005q3-2.bb
+++ b/meta/packages/glibc/glibc_csl-2005q3-2.bb
@@ -86,4 +86,4 @@ do_compile () {
require glibc-stage.inc
-require glibc-package.bbclass
+require glibc-package.inc