summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/libc-common.bbclass2
-rw-r--r--meta/classes/libc-package.bbclass27
-rw-r--r--meta/conf/bitbake.conf1
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale.inc6
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc11
-rw-r--r--meta/recipes-core/eglibc/eglibc.inc1
6 files changed, 28 insertions, 20 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() {
5 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/ 5 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
6 done 6 done
7 install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ 7 install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
8 install -d ${D}${libdir}/locale 8 install -d ${D}${localedir}
9 make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" 9 make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
10 # get rid of some broken files... 10 # get rid of some broken files...
11 for i in ${GLIBC_BROKEN_LOCALES}; do 11 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
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":
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9b41749e2d..3496d2bb8c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -40,6 +40,7 @@ export libdir = "${exec_prefix}/${baselib}"
40export includedir = "${exec_prefix}/include" 40export includedir = "${exec_prefix}/include"
41export oldincludedir = "${exec_prefix}/include" 41export oldincludedir = "${exec_prefix}/include"
42export systemd_unitdir = "${base_libdir}/systemd" 42export systemd_unitdir = "${base_libdir}/systemd"
43localedir = "${libdir}/locale"
43 44
44# Linkage between native/cross/nativesdk layouts 45# Linkage between native/cross/nativesdk layouts
45base_bindir_native = "/bin" 46base_bindir_native = "/bin"
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
index 296afdef6e..105cf2efd3 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -69,12 +69,12 @@ FILES_localedef = "${bindir}/localedef"
69LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}" 69LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}"
70 70
71do_install () { 71do_install () {
72 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir} 72 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir} ${D}${localedir}
73 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then 73 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
74 cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir} 74 cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
75 fi 75 fi
76 if [ -e ${LOCALETREESRC}/${libdir}/locale ]; then 76 if [ -n "$(ls ${LOCALETREESRC}/${localedir})" ]; then
77 cp -fpPR ${LOCALETREESRC}/${libdir}/locale ${D}${libdir} 77 cp -fpPR ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
78 fi 78 fi
79 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then 79 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
80 cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir} 80 cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index ab7540afb4..0059bcfc1c 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -98,7 +98,9 @@ do_install_locale () {
98 if [ -e ${D}${libdir}/gconv ]; then 98 if [ -e ${D}${libdir}/gconv ]; then
99 mv -f ${D}${libdir}/gconv ${dest}${libdir} 99 mv -f ${D}${libdir}/gconv ${dest}${libdir}
100 fi 100 fi
101 cp -fpPR ${D}${libdir}/* ${dest}${libdir} 101 if [ -e ${D}${exec_prefix}/lib ]; then
102 cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
103 fi
102 if [ -e ${D}${datadir}/i18n ]; then 104 if [ -e ${D}${datadir}/i18n ]; then
103 mv ${D}${datadir}/i18n ${dest}${datadir} 105 mv ${D}${datadir}/i18n ${dest}${datadir}
104 fi 106 fi
@@ -113,6 +115,9 @@ PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess"
113 115
114eglibc_package_preprocess () { 116eglibc_package_preprocess () {
115 rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS} 117 rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}
116 rm -rf ${PKGD}/${libdir}/locale 118 rm -rf ${PKGD}/${localedir}
119 if [ "${libdir}" != "${exec_prefix}/lib" ]; then
120 # This dir only exists to hold locales
121 rm -rf ${PKGD}${exec_prefix}/lib
122 fi
117} 123}
118
diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 29e303fafd..cae955d523 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -34,6 +34,7 @@ LEAD_SONAME = "libc.so"
34 34
35CACHED_CONFIGUREVARS += "ac_cv_path_KSH=${base_bindir}/bash \ 35CACHED_CONFIGUREVARS += "ac_cv_path_KSH=${base_bindir}/bash \
36 ac_cv_path_BASH_SHELL=${base_bindir}/bash \ 36 ac_cv_path_BASH_SHELL=${base_bindir}/bash \
37 libc_cv_localedir=${localedir} \
37 libc_cv_ssp=no \ 38 libc_cv_ssp=no \
38 " 39 "
39 40