diff options
author | Christopher Larson <chris_larson@mentor.com> | 2012-09-24 12:00:41 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-25 09:35:55 +0100 |
commit | b744f4cc2912334b8493a89525fd02af8e9b8edf (patch) | |
tree | 9cbacbc93cabaff5298e48095f66cda5ff9440f4 /meta/classes | |
parent | 9327ca868667b15f29af3123611d6f56b4249a63 (diff) | |
download | openembedded-core-b744f4cc2912334b8493a89525fd02af8e9b8edf.tar.gz openembedded-core-b744f4cc2912334b8493a89525fd02af8e9b8edf.tar.bz2 openembedded-core-b744f4cc2912334b8493a89525fd02af8e9b8edf.zip |
Add and use 'localedir' variable
This avoids the hardcoding of ${libdir}/locale which is all over the place,
and will facilitate use of ${exec_prefix}/lib/locale instead of
${libdir}/locale.
This doesn't actually change any output at this time. Verified this with
buildhistory against the packages produced from core-image-base.
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/libc-common.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/libc-package.bbclass | 27 |
2 files changed, 15 insertions, 14 deletions
diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass index 06d520164e..0f499366db 100644 --- a/meta/classes/libc-common.bbclass +++ b/meta/classes/libc-common.bbclass @@ -5,7 +5,7 @@ do_install() { 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 + install -d ${D}${localedir} 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 diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 70490efc77..80d7124002 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -65,12 +65,12 @@ fi rm -rf ${TMP_LOCALE} mkdir -p ${TMP_LOCALE} -if [ -f ${libdir}/locale/locale-archive ]; then - cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ +if [ -f ${localedir}/locale-archive ]; then + cp ${localedir}/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/ +mkdir -p ${localedir}/ +mv ${TMP_LOCALE}/locale-archive ${localedir}/ rm -rf ${TMP_LOCALE} } @@ -80,22 +80,22 @@ locale_base_postrm() { rm -rf ${TMP_LOCALE} mkdir -p ${TMP_LOCALE} -if [ -f ${libdir}/locale/locale-archive ]; then - cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ +if [ -f ${localedir}/locale-archive ]; then + cp ${localedir}/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/ +mv ${TMP_LOCALE}/locale-archive ${localedir}/ rm -rf ${TMP_LOCALE} } -TMP_LOCALE="/tmp/locale${libdir}/locale" +TMP_LOCALE="/tmp/locale${localedir}" LOCALETREESRC ?= "${PKGD}" do_prep_locale_tree() { treedir=${WORKDIR}/locale-tree rm -rf $treedir - mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${libdir}/locale + mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir} tar -cf - -C ${LOCALETREESRC}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir} # unzip to avoid parsing errors for i in $treedir/${datadir}/i18n/charmaps/*gz; do @@ -111,8 +111,9 @@ do_prep_locale_tree() { do_collect_bins_from_locale_tree() { treedir=${WORKDIR}/locale-tree - mkdir -p ${PKGD}${libdir} - tar -cf - -C $treedir/${libdir} -ps locale | tar -xf - -C ${PKGD}${libdir} + parent=$(dirname ${localedir}) + mkdir -p ${PKGD}/$parent + tar -cf - -C $treedir/$parent -ps $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent } inherit qemu @@ -141,7 +142,7 @@ python package_do_split_gconvs () { 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") + binary_locales_dir = d.getVar('localedir', True) def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group): deps = [] @@ -259,7 +260,7 @@ python package_do_split_gconvs () { path = d.getVar("PATH", True) i18npath = base_path_join(treedir, datadir, "i18n") gconvpath = base_path_join(treedir, "iconvdata") - outputpath = base_path_join(treedir, libdir, "locale") + outputpath = base_path_join(treedir, binary_locales_dir) use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", True) or "0" if use_cross_localedef == "1": |