summaryrefslogtreecommitdiffstats
path: root/meta/classes/libc-package.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/libc-package.bbclass')
-rw-r--r--meta/classes/libc-package.bbclass27
1 files changed, 14 insertions, 13 deletions
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
65 65
66rm -rf ${TMP_LOCALE} 66rm -rf ${TMP_LOCALE}
67mkdir -p ${TMP_LOCALE} 67mkdir -p ${TMP_LOCALE}
68if [ -f ${libdir}/locale/locale-archive ]; then 68if [ -f ${localedir}/locale-archive ]; then
69 cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ 69 cp ${localedir}/locale-archive ${TMP_LOCALE}/
70fi 70fi
71localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s 71localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
72mkdir -p ${libdir}/locale/ 72mkdir -p ${localedir}/
73mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ 73mv ${TMP_LOCALE}/locale-archive ${localedir}/
74rm -rf ${TMP_LOCALE} 74rm -rf ${TMP_LOCALE}
75} 75}
76 76
@@ -80,22 +80,22 @@ locale_base_postrm() {
80 80
81rm -rf ${TMP_LOCALE} 81rm -rf ${TMP_LOCALE}
82mkdir -p ${TMP_LOCALE} 82mkdir -p ${TMP_LOCALE}
83if [ -f ${libdir}/locale/locale-archive ]; then 83if [ -f ${localedir}/locale-archive ]; then
84 cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ 84 cp ${localedir}/locale-archive ${TMP_LOCALE}/
85fi 85fi
86localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s 86localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
87mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ 87mv ${TMP_LOCALE}/locale-archive ${localedir}/
88rm -rf ${TMP_LOCALE} 88rm -rf ${TMP_LOCALE}
89} 89}
90 90
91 91
92TMP_LOCALE="/tmp/locale${libdir}/locale" 92TMP_LOCALE="/tmp/locale${localedir}"
93LOCALETREESRC ?= "${PKGD}" 93LOCALETREESRC ?= "${PKGD}"
94 94
95do_prep_locale_tree() { 95do_prep_locale_tree() {
96 treedir=${WORKDIR}/locale-tree 96 treedir=${WORKDIR}/locale-tree
97 rm -rf $treedir 97 rm -rf $treedir
98 mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${libdir}/locale 98 mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${localedir}
99 tar -cf - -C ${LOCALETREESRC}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir} 99 tar -cf - -C ${LOCALETREESRC}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir}
100 # unzip to avoid parsing errors 100 # unzip to avoid parsing errors
101 for i in $treedir/${datadir}/i18n/charmaps/*gz; do 101 for i in $treedir/${datadir}/i18n/charmaps/*gz; do
@@ -111,8 +111,9 @@ do_prep_locale_tree() {
111do_collect_bins_from_locale_tree() { 111do_collect_bins_from_locale_tree() {
112 treedir=${WORKDIR}/locale-tree 112 treedir=${WORKDIR}/locale-tree
113 113
114 mkdir -p ${PKGD}${libdir} 114 parent=$(dirname ${localedir})
115 tar -cf - -C $treedir/${libdir} -ps locale | tar -xf - -C ${PKGD}${libdir} 115 mkdir -p ${PKGD}/$parent
116 tar -cf - -C $treedir/$parent -ps $(basename ${localedir}) | tar -xf - -C ${PKGD}$parent
116} 117}
117 118
118inherit qemu 119inherit qemu
@@ -141,7 +142,7 @@ python package_do_split_gconvs () {
141 gconv_libdir = base_path_join(libdir, "gconv") 142 gconv_libdir = base_path_join(libdir, "gconv")
142 charmap_dir = base_path_join(datadir, "i18n", "charmaps") 143 charmap_dir = base_path_join(datadir, "i18n", "charmaps")
143 locales_dir = base_path_join(datadir, "i18n", "locales") 144 locales_dir = base_path_join(datadir, "i18n", "locales")
144 binary_locales_dir = base_path_join(libdir, "locale") 145 binary_locales_dir = d.getVar('localedir', True)
145 146
146 def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group): 147 def calc_gconv_deps(fn, pkg, file_regex, output_pattern, group):
147 deps = [] 148 deps = []
@@ -259,7 +260,7 @@ python package_do_split_gconvs () {
259 path = d.getVar("PATH", True) 260 path = d.getVar("PATH", True)
260 i18npath = base_path_join(treedir, datadir, "i18n") 261 i18npath = base_path_join(treedir, datadir, "i18n")
261 gconvpath = base_path_join(treedir, "iconvdata") 262 gconvpath = base_path_join(treedir, "iconvdata")
262 outputpath = base_path_join(treedir, libdir, "locale") 263 outputpath = base_path_join(treedir, binary_locales_dir)
263 264
264 use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", True) or "0" 265 use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", True) or "0"
265 if use_cross_localedef == "1": 266 if use_cross_localedef == "1":