]> code.ossystems Code Review - openembedded-core.git/commit
icu: Add knobs to generate a subset of ICU data
authorKhem Raj <raj.khem@gmail.com>
Sat, 4 Apr 2020 23:02:57 +0000 (16:02 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Apr 2020 10:46:34 +0000 (11:46 +0100)
commit5e5be67744d7ddf5a9ac433ecba02f697a84a325
tree32d87056bb9e7d4650047ed49f5b1dcf43d2dbd3
parent1921711c9e7a915dbf04c3909bee39450c907845
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

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>
meta/recipes-support/icu/icu/0001-Fix-big-endian-build.patch
meta/recipes-support/icu/icu/filter.json [new file with mode: 0644]
meta/recipes-support/icu/icu_66.1.bb