diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-06-23 23:08:36 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-25 10:23:37 +0100 |
| commit | c1ded5d898cec13afee3aacce3e25b4926b281b6 (patch) | |
| tree | ba053b420783f430632d9c30c4bbd944d53ec8e7 | |
| parent | 132952c59c85ef15554dae088ffe934940cb3020 (diff) | |
| download | poky-c1ded5d898cec13afee3aacce3e25b4926b281b6.tar.gz | |
icu: merge .inc into main recipe
Both parts are rather convoluted, so it is better to have them in a single file.
(From OE-Core rev: e8faa3416bc85dab7e7e638448dcb11ff88354a3)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/icu/icu.inc | 84 | ||||
| -rw-r--r-- | meta/recipes-support/icu/icu_67.1.bb | 85 |
2 files changed, 84 insertions, 85 deletions
diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc deleted file mode 100644 index 6d9728903d..0000000000 --- a/meta/recipes-support/icu/icu.inc +++ /dev/null | |||
| @@ -1,84 +0,0 @@ | |||
| 1 | SUMMARY = "International Component for Unicode libraries" | ||
| 2 | DESCRIPTION = "The International Component for Unicode (ICU) is a mature, \ | ||
| 3 | portable set of C/C++ and Java libraries for Unicode support, software \ | ||
| 4 | internationalization (I18N) and globalization (G11N), giving applications the \ | ||
| 5 | same results on all platforms." | ||
| 6 | HOMEPAGE = "http://site.icu-project.org/" | ||
| 7 | |||
| 8 | LICENSE = "ICU" | ||
| 9 | DEPENDS = "icu-native" | ||
| 10 | DEPENDS_class-native = "" | ||
| 11 | |||
| 12 | CVE_PRODUCT = "international_components_for_unicode" | ||
| 13 | |||
| 14 | S = "${WORKDIR}/icu/source" | ||
| 15 | SPDX_S = "${WORKDIR}/icu" | ||
| 16 | STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}" | ||
| 17 | |||
| 18 | BINCONFIG = "${bindir}/icu-config" | ||
| 19 | |||
| 20 | ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}" | ||
| 21 | |||
| 22 | inherit autotools pkgconfig binconfig multilib_script | ||
| 23 | |||
| 24 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/icu-config" | ||
| 25 | |||
| 26 | # ICU needs the native build directory as an argument to its --with-cross-build option when | ||
| 27 | # cross-compiling. Taken the situation that different builds may share a common sstate-cache | ||
| 28 | # into consideration, the native build directory needs to be staged. | ||
| 29 | EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
| 30 | EXTRA_OECONF_class-native = "" | ||
| 31 | EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
| 32 | |||
| 33 | EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}" | ||
| 34 | TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}" | ||
| 35 | |||
| 36 | ASNEEDED = "" | ||
| 37 | |||
| 38 | do_compile_prepend_class-target () { | ||
| 39 | # Make sure certain build host references do not end up being compiled | ||
| 40 | # in the image. This only affects libicutu and icu-dbg | ||
| 41 | sed \ | ||
| 42 | -e 's,DU_BUILD=,DU_BUILD_unused=,g' \ | ||
| 43 | -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
| 44 | -i ${B}/tools/toolutil/Makefile | ||
| 45 | } | ||
| 46 | |||
| 47 | PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}" | ||
| 48 | do_install_append_class-native() { | ||
| 49 | mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
| 50 | cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
| 51 | cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
| 52 | cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE} | ||
| 53 | cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE} | ||
| 54 | cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} | ||
| 55 | } | ||
| 56 | |||
| 57 | do_install_append_class-target() { | ||
| 58 | # The native pkgdata can not generate the correct data file. | ||
| 59 | # Use icupkg to re-generate it. | ||
| 60 | if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then | ||
| 61 | rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
| 62 | icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
| 63 | fi | ||
| 64 | |||
| 65 | # Remove build host references... | ||
| 66 | sed -i \ | ||
| 67 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
| 68 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 69 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 70 | ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \ | ||
| 71 | ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc | ||
| 72 | } | ||
| 73 | |||
| 74 | PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio" | ||
| 75 | |||
| 76 | FILES_${PN}-dev += "${libdir}/${BPN}/" | ||
| 77 | |||
| 78 | FILES_libicudata = "${libdir}/libicudata.so.*" | ||
| 79 | FILES_libicuuc = "${libdir}/libicuuc.so.*" | ||
| 80 | FILES_libicui18n = "${libdir}/libicui18n.so.*" | ||
| 81 | FILES_libicutu = "${libdir}/libicutu.so.*" | ||
| 82 | FILES_libicuio = "${libdir}/libicuio.so.*" | ||
| 83 | |||
| 84 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-support/icu/icu_67.1.bb b/meta/recipes-support/icu/icu_67.1.bb index 58638507c9..5814fa41bd 100644 --- a/meta/recipes-support/icu/icu_67.1.bb +++ b/meta/recipes-support/icu/icu_67.1.bb | |||
| @@ -1,4 +1,87 @@ | |||
| 1 | require icu.inc | 1 | SUMMARY = "International Component for Unicode libraries" |
| 2 | DESCRIPTION = "The International Component for Unicode (ICU) is a mature, \ | ||
| 3 | portable set of C/C++ and Java libraries for Unicode support, software \ | ||
| 4 | internationalization (I18N) and globalization (G11N), giving applications the \ | ||
| 5 | same results on all platforms." | ||
| 6 | HOMEPAGE = "http://site.icu-project.org/" | ||
| 7 | |||
| 8 | LICENSE = "ICU" | ||
| 9 | DEPENDS = "icu-native" | ||
| 10 | DEPENDS_class-native = "" | ||
| 11 | |||
| 12 | CVE_PRODUCT = "international_components_for_unicode" | ||
| 13 | |||
| 14 | S = "${WORKDIR}/icu/source" | ||
| 15 | SPDX_S = "${WORKDIR}/icu" | ||
| 16 | STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}" | ||
| 17 | |||
| 18 | BINCONFIG = "${bindir}/icu-config" | ||
| 19 | |||
| 20 | ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}" | ||
| 21 | |||
| 22 | inherit autotools pkgconfig binconfig multilib_script | ||
| 23 | |||
| 24 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/icu-config" | ||
| 25 | |||
| 26 | # ICU needs the native build directory as an argument to its --with-cross-build option when | ||
| 27 | # cross-compiling. Taken the situation that different builds may share a common sstate-cache | ||
| 28 | # into consideration, the native build directory needs to be staged. | ||
| 29 | EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
| 30 | EXTRA_OECONF_class-native = "" | ||
| 31 | EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
| 32 | |||
| 33 | EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}" | ||
| 34 | TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}" | ||
| 35 | |||
| 36 | ASNEEDED = "" | ||
| 37 | |||
| 38 | do_compile_prepend_class-target () { | ||
| 39 | # Make sure certain build host references do not end up being compiled | ||
| 40 | # in the image. This only affects libicutu and icu-dbg | ||
| 41 | sed \ | ||
| 42 | -e 's,DU_BUILD=,DU_BUILD_unused=,g' \ | ||
| 43 | -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
| 44 | -i ${B}/tools/toolutil/Makefile | ||
| 45 | } | ||
| 46 | |||
| 47 | PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}" | ||
| 48 | do_install_append_class-native() { | ||
| 49 | mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
| 50 | cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
| 51 | cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
| 52 | cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE} | ||
| 53 | cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE} | ||
| 54 | cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} | ||
| 55 | } | ||
| 56 | |||
| 57 | do_install_append_class-target() { | ||
| 58 | # The native pkgdata can not generate the correct data file. | ||
| 59 | # Use icupkg to re-generate it. | ||
| 60 | if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then | ||
| 61 | rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
| 62 | icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
| 63 | fi | ||
| 64 | |||
| 65 | # Remove build host references... | ||
| 66 | sed -i \ | ||
| 67 | -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
| 68 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 69 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 70 | ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \ | ||
| 71 | ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc | ||
| 72 | } | ||
| 73 | |||
| 74 | PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio" | ||
| 75 | |||
| 76 | FILES_${PN}-dev += "${libdir}/${BPN}/" | ||
| 77 | |||
| 78 | FILES_libicudata = "${libdir}/libicudata.so.*" | ||
| 79 | FILES_libicuuc = "${libdir}/libicuuc.so.*" | ||
| 80 | FILES_libicui18n = "${libdir}/libicui18n.so.*" | ||
| 81 | FILES_libicutu = "${libdir}/libicutu.so.*" | ||
| 82 | FILES_libicuio = "${libdir}/libicuio.so.*" | ||
| 83 | |||
| 84 | BBCLASSEXTEND = "native nativesdk" | ||
| 2 | 85 | ||
| 3 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=a3808a5b70071b07f87ff2205e4d75a0" | 86 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=a3808a5b70071b07f87ff2205e4d75a0" |
| 4 | 87 | ||
