diff options
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/icu/icu.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc index a1ef9ec8bf..3fb16b0f68 100644 --- a/meta/recipes-support/icu/icu.inc +++ b/meta/recipes-support/icu/icu.inc | |||
@@ -17,6 +17,8 @@ STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}" | |||
17 | 17 | ||
18 | BINCONFIG = "${bindir}/icu-config" | 18 | BINCONFIG = "${bindir}/icu-config" |
19 | 19 | ||
20 | ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}" | ||
21 | |||
20 | inherit autotools pkgconfig binconfig | 22 | inherit autotools pkgconfig binconfig |
21 | 23 | ||
22 | # ICU needs the native build directory as an argument to its --with-cross-build option when | 24 | # 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}" | |||
26 | EXTRA_OECONF_class-native = "" | 28 | EXTRA_OECONF_class-native = "" |
27 | EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | 29 | EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" |
28 | 30 | ||
31 | EXTRA_OECONF_append_class-target = "${@base_conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}" | ||
32 | TARGET_CXXFLAGS_append = "${@base_conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}" | ||
29 | 33 | ||
30 | # strtod_l() is not supported by musl; also xlocale.h is missing | 34 | # strtod_l() is not supported by musl; also xlocale.h is missing |
31 | # It is not possible to disable its use via configure switches or env vars | 35 | # It is not possible to disable its use via configure switches or env vars |
@@ -44,6 +48,15 @@ do_install_append_class-native() { | |||
44 | cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} | 48 | cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} |
45 | } | 49 | } |
46 | 50 | ||
51 | do_install_append_class-target() { | ||
52 | # The native pkgdata can not generate the correct data file. | ||
53 | # Use icupkg to re-generate it. | ||
54 | if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then | ||
55 | rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
56 | icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
57 | fi | ||
58 | } | ||
59 | |||
47 | PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio" | 60 | PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio" |
48 | 61 | ||
49 | FILES_${PN}-dev += "${libdir}/${BPN}/" | 62 | FILES_${PN}-dev += "${libdir}/${BPN}/" |