summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-06-25 12:45:53 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-06-27 14:38:15 -0400
commit316dfdd917bec6a218f431211d28bf8df6b6fb0f (patch)
tree5541073f9851f44c2bd67b4959dc776ee3c3810f /import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
parent36acd3e888044dea2ac0b2946f15616f968388c9 (diff)
downloadblackbird-openbmc-316dfdd917bec6a218f431211d28bf8df6b6fb0f.tar.gz
blackbird-openbmc-316dfdd917bec6a218f431211d28bf8df6b6fb0f.zip
Yocto 2.5
Move OpenBMC to Yocto 2.5(sumo) Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/icu/icu.inc')
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/icu/icu.inc30
1 files changed, 30 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc b/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
index a1ef9ec8b..983118cd6 100644
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu.inc
@@ -17,6 +17,8 @@ STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
BINCONFIG = "${bindir}/icu-config"
+ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
+
inherit autotools pkgconfig binconfig
# ICU needs the native build directory as an argument to its --with-cross-build option when
@@ -26,6 +28,8 @@ EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
EXTRA_OECONF_class-native = ""
EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
+EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
+TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
# strtod_l() is not supported by musl; also xlocale.h is missing
# It is not possible to disable its use via configure switches or env vars
@@ -34,6 +38,15 @@ do_configure_prepend_libc-musl () {
sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
}
+do_compile_prepend_class-target () {
+ # Make sure certain build host references do not end up being compiled
+ # in the image. This only affects libicutu and icu-dbg
+ sed \
+ -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+ -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -i ${B}/tools/toolutil/Makefile
+}
+
PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
do_install_append_class-native() {
mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
@@ -44,6 +57,23 @@ do_install_append_class-native() {
cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
}
+do_install_append_class-target() {
+ # The native pkgdata can not generate the correct data file.
+ # Use icupkg to re-generate it.
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
+ rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ fi
+
+ # Remove build host references...
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \
+ ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc
+}
+
PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
FILES_${PN}-dev += "${libdir}/${BPN}/"
OpenPOWER on IntegriCloud