summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/icu/icu_66.1.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-04-04 16:02:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-05 11:46:38 +0100
commit72a56c2bd02d32382260d4f4fd14ab4c8d4cb8f4 (patch)
tree1dd7c89a247c7150ef837f9dad86d62b6098ed95 /meta/recipes-support/icu/icu_66.1.bb
parent8fad68fb3cdb4a17b973463ba403ef136aae3946 (diff)
downloadpoky-72a56c2bd02d32382260d4f4fd14ab4c8d4cb8f4.tar.gz
icu: Add knobs to generate a subset of ICU data
Recent versions of ICU (64+) provides a tool for configuring ICU locale data file with finer granularity [1] Default generated size for libicudata.so.66.1 is ~27M, which is quite large for embedded systems and all of them may not even need all locale data. This patch calls the icudata buildtool during configure on the icudata and utilizes a filter called 'filter.json` ( empty by default) to create the data, default behavior should remain same but someone can add a filter.json in own layer to configure this data, e.g. { "localeFilter": { "filterType": "language", "whitelist": [ "en", "de", "it" ] } } would only generate the locale data for english/german/italian This would reduce the size of libicudata.so.66.1 to 12M Ensure that icudata is generated using host-tools so it can deal with endianness correctly, when host and target systems have different endianness install the icudtata file back into in/ folder so that main build can now pickup this data file instead of regenerating it and wiping out the filter changes that are expected to take effect Use native compiler tools Update the big-endian support patch to apply to latest Makefile.in from icudata source and mark it as backport defer applying 0001-Fix-big-endian-build.patch after moving new data/ in [1] https://github.com/unicode-org/icu/blob/master/docs/userguide/icu_data/buildtool.md (From OE-Core rev: 5e5be67744d7ddf5a9ac433ecba02f697a84a325) Signed-off-by: Khem Raj <raj.khem@gmail.com> Suggested-by: Wouter Meek <w.meek@metrological.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/icu/icu_66.1.bb')
-rw-r--r--meta/recipes-support/icu/icu_66.1.bb37
1 files changed, 33 insertions, 4 deletions
diff --git a/meta/recipes-support/icu/icu_66.1.bb b/meta/recipes-support/icu/icu_66.1.bb
index 5018464c14..0d26f52f20 100644
--- a/meta/recipes-support/icu/icu_66.1.bb
+++ b/meta/recipes-support/icu/icu_66.1.bb
@@ -18,18 +18,47 @@ ARM_INSTRUCTION_SET_armv4 = "arm"
18ARM_INSTRUCTION_SET_armv5 = "arm" 18ARM_INSTRUCTION_SET_armv5 = "arm"
19 19
20BASE_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-src.tgz" 20BASE_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-src.tgz"
21SRC_URI = "${BASE_SRC_URI} \ 21DATA_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-data.zip"
22SRC_URI = "${BASE_SRC_URI};name=code \
23 ${DATA_SRC_URI};name=data \
24 file://filter.json \
22 file://icu-pkgdata-large-cmd.patch \ 25 file://icu-pkgdata-large-cmd.patch \
23 file://fix-install-manx.patch \ 26 file://fix-install-manx.patch \
24 file://0001-Fix-big-endian-build.patch \ 27 file://0001-Fix-big-endian-build.patch;apply=no \
25 file://0001-icu-Added-armeb-support.patch \ 28 file://0001-icu-Added-armeb-support.patch \
26 " 29 "
27 30
28SRC_URI_append_class-target = "\ 31SRC_URI_append_class-target = "\
29 file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ 32 file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
30 " 33 "
31SRC_URI[md5sum] = "b33dc6766711517c98d318447e5110f8" 34SRC_URI[code.sha256sum] = "52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e"
32SRC_URI[sha256sum] = "52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e" 35SRC_URI[data.sha256sum] = "8be647f738891d2beb79d48f99077b3499948430eae6f1be112553b15ab0243e"
33 36
34UPSTREAM_CHECK_REGEX = "icu4c-(?P<pver>\d+(_\d+)+)-src" 37UPSTREAM_CHECK_REGEX = "icu4c-(?P<pver>\d+(_\d+)+)-src"
35UPSTREAM_CHECK_URI = "https://github.com/unicode-org/icu/releases" 38UPSTREAM_CHECK_URI = "https://github.com/unicode-org/icu/releases"
39
40do_make_icudata_class-target () {
41 cd ${S}
42 rm -rf data
43 cp -a ${WORKDIR}/data .
44 patch -p1 < ${WORKDIR}/0001-Fix-big-endian-build.patch
45 AR='${BUILD_AR}' \
46 CC='${BUILD_CC}' \
47 CPP='${BUILD_CPP}' \
48 CXX='${BUILD_CXX}' \
49 RANLIB='${BUILD_RANLIB}' \
50 CFLAGS='${BUILD_CFLAGS}' \
51 CPPFLAGS='${BUILD_CPPFLAGS}' \
52 CXXFLAGS='${BUILD_CXXFLAGS}' \
53 LDFLAGS='${BUILD_LDFLAGS}' \
54 ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \
55 ./runConfigureICU Linux --with-data-packaging=archive
56 oe_runmake ${PARALLEL_MAKE}
57 install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat
58}
59
60do_make_icudata() {
61 :
62}
63
64addtask make_icudata before do_configure after do_patch