summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Werner <ken.werner@linaro.org>2012-02-15 09:49:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-21 17:59:39 +0000
commit9c1678692872a871cd0f128eb6cb83754451962f (patch)
treeb1c9c975058436c2cd7ca48494893a7b7d71a8c0
parentb2a84e717e2893ae98f9c1cb7c982745a37c3154 (diff)
downloadpoky-9c1678692872a871cd0f128eb6cb83754451962f.tar.gz
Add sanity checks for eglibc locale
Add sanity checks that test for the existance of folders. This allows to use an external binary toolchain that doesn't have localization support. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale.inc20
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc4
2 files changed, 18 insertions, 6 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
index b4646fac7e..2e9b4d4059 100644
--- a/meta/recipes-core/eglibc/eglibc-locale.inc
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -72,11 +72,21 @@ LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS
72 72
73do_install () { 73do_install () {
74 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir} 74 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
75 cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir} 75 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
76 cp -fpPR ${LOCALETREESRC}/${libdir}/locale ${D}${libdir} 76 cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
77 cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir} 77 fi
78 cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir} 78 if [ -e ${LOCALETREESRC}/${libdir}/locale ]; then
79 cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir} 79 cp -fpPR ${LOCALETREESRC}/${libdir}/locale ${D}${libdir}
80 fi
81 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
82 cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
83 fi
84 if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
85 cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
86 fi
87 if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
88 cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
89 fi
80 cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR} 90 cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
81} 91}
82 92
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 870b95dc87..2a1d939786 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -91,7 +91,9 @@ do_install_locale () {
91 mv -f ${D}${libdir}/gconv ${dest}${libdir} 91 mv -f ${D}${libdir}/gconv ${dest}${libdir}
92 fi 92 fi
93 cp -fpPR ${D}${libdir}/* ${dest}${libdir} 93 cp -fpPR ${D}${libdir}/* ${dest}${libdir}
94 mv ${D}${datadir}/i18n ${dest}${datadir} 94 if [ -e ${D}${datadir}/i18n ]; then
95 mv ${D}${datadir}/i18n ${dest}${datadir}
96 fi
95 cp -fpPR ${D}${datadir}/* ${dest}${datadir} 97 cp -fpPR ${D}${datadir}/* ${dest}${datadir}
96 cp -fpPR ${WORKDIR}/SUPPORTED ${dest} 98 cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
97} 99}