From: Richard Purdie Date: Fri, 28 Jul 2006 17:48:27 +0000 (+0000) Subject: glibc: Limit the locales that are generated under qemu. Note this patch totally trash... X-Git-Tag: 2011-1~12812 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=5599ea7fb19258cc7695c9a38219c75338578759;p=openembedded-core.git glibc: Limit the locales that are generated under qemu. Note this patch totally trashes the other locales and would therefore need refinement for OE. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@583 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- diff --git a/meta/packages/glibc/glibc-package.bbclass b/meta/packages/glibc/glibc-package.bbclass index d6decfb709..680831e822 100644 --- a/meta/packages/glibc/glibc-package.bbclass +++ b/meta/packages/glibc/glibc-package.bbclass @@ -77,6 +77,13 @@ do_install() { grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED done + # If indicated, only build a limited selection of locales + if [ "${LIMIT_BUILT_LOCALES}" != "${LIMIT_BUILT_LOCALES}" ]; then + for i in ${LIMIT_BUILT_LOCALES}; do + grep $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp + mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED + done + fi rm -f ${D}/etc/rpc } diff --git a/meta/packages/glibc/glibc.inc b/meta/packages/glibc/glibc.inc new file mode 100644 index 0000000000..4459f76a87 --- /dev/null +++ b/meta/packages/glibc/glibc.inc @@ -0,0 +1,17 @@ + +do_rig_locales() { + # If indicated, only build a limited selection of locales + if [ "x${LIMIT_BUILT_LOCALES}" != "${LIMIT_BUILT_LOCALES}" ]; then + INFILE="${S}/localedata/SUPPORTED" + OUTFILE="${S}/localedata/SUPPORTED.tmp" + head -n 3 $INFILE > $OUTFILE + for i in ${LIMIT_BUILT_LOCALES}; do + echo + grep $i $INFILE >> $OUTFILE + done + head --lines=-1 $OUTFILE > $INFILE + tail --lines=1 $OUTFILE | sed 's#\\##' >> $INFILE + fi +} + +addtask rig_locales before do_compile after do_configure diff --git a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb index c8f1d56841..b6af34efdd 100644 --- a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb +++ b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb @@ -14,6 +14,8 @@ GLIBC_EXTRA_OECONF ?= "" GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN" +LIMIT_BUILT_LOCALES = "en_GB" + # # 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 @@ -173,3 +175,4 @@ do_stage() { } include glibc-package.bbclass +include glibc.inc