Use original CJK segmetation rules on Android.
The original CJK segmenation rules are the rules before patches/brkitr.patch
applied. Use that to avoid using the cjdict to reduce binary size.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9599024/
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/icu46@125455 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/README.chromium b/README.chromium
index 6c4ccab..ee81298 100644
--- a/README.chromium
+++ b/README.chromium
@@ -70,6 +70,10 @@
* brklocal.mk : build file changes to drop unnecessary brkitr rule
files (e.g. word_ja.txt, line_he.txt)
+ - android/brkitr.patch :
+ Reverts some changes about Chinese/Japanese segmentation rules in
+ patches/brkitr.patch to reduce binary size for Android.
+
If you want to run ICU tests, you have to copy source/data/brkitr/cjdict.txt
to source/test/testdata/cjdict-truncated.txt to pass TestTrieWithValue test.
@@ -158,7 +162,10 @@
files everytime ICU is upgraded to a new version.
- {mac,linux}/icudt46l_dat.S : Built on Mac and Linux with all the
- patches above applied and checked in.
+ patches above (except android/brkitr.patch) applied and checked in.
+
+ - android/icudt46l_dat.S : Built on Linux with all the patches above and
+ android/brkitr.patch applied and checked in.
11. The header files were moved as shown below:
diff --git a/icu.gyp b/icu.gyp
index 6280896..c027789 100644
--- a/icu.gyp
+++ b/icu.gyp
@@ -48,6 +48,7 @@
# version is an identical copy of the (mac) icudt46l_dat.S file,
# modulo removal of the .private_extern and .const directives and
# with no leading underscore on the icudt46_dat symbol.
+ 'android/icudt46l_dat.S',
'linux/icudt46l_dat.S',
'mac/icudt46l_dat.S',
],
@@ -63,12 +64,15 @@
},
],
}],
- [ 'OS == "win" or OS == "mac"', {
+ [ 'OS == "win" or OS == "mac" or OS == "android"', {
'sources!': ['linux/icudt46l_dat.S'],
}],
[ 'OS != "mac"', {
'sources!': ['mac/icudt46l_dat.S'],
}],
+ [ 'OS != "android"', {
+ 'sources!': ['android/icudt46l_dat.S'],
+ }],
[ 'OS != "win" and icu_use_data_file_flag', {
# Remove any assembly data file.
'sources/': [['exclude', 'icudt46l_dat']],
@@ -293,31 +297,8 @@
}
}],
['OS == "android"', {
- 'include_dirs': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/include',
- ],
- 'conditions': [
- ['target_arch=="arm" and armv7==1', {
- 'link_settings': {
- 'libraries': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/armeabi-v7a/libgabi++_static.a',
- ]
- },
- }],
- ['target_arch=="arm" and armv7==0', {
- 'link_settings': {
- 'libraries': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/armeabi/libgabi++_static.a',
- ]
- },
- }],
- ['target_arch=="ia32"', {
- 'link_settings': {
- 'libraries': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/x86/libgabi++_static.a',
- ]
- },
- }],
+ 'dependencies': [
+ 'gabi++',
],
}],
['clang==1', {
@@ -559,31 +540,8 @@
}
}],
['OS == "android"', {
- 'include_dirs': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/include',
- ],
- 'conditions': [
- ['target_arch=="arm" and armv7==1', {
- 'link_settings': {
- 'libraries': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/armeabi-v7a/libgabi++_static.a',
- ]
- },
- }],
- ['target_arch=="arm" and armv7==0', {
- 'link_settings': {
- 'libraries': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/armeabi/libgabi++_static.a',
- ]
- },
- }],
- ['target_arch=="ia32"', {
- 'link_settings': {
- 'libraries': [
- '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/x86/libgabi++_static.a',
- ]
- },
- }],
+ 'dependencies': [
+ 'gabi++',
],
}],
['clang==1', {
@@ -613,6 +571,44 @@
],
},
],
+ 'conditions': [
+ ['OS=="android"', {
+ 'targets': [
+ {
+ 'target_name': 'gabi++',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(android_ndk_root)/sources/cxx-stl/gabi++/include',
+ ],
+ },
+ 'conditions': [
+ ['target_arch=="arm" and armv7==1', {
+ 'link_settings': {
+ 'libraries': [
+ '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/armeabi-v7a/libgabi++_static.a',
+ ]
+ },
+ }],
+ ['target_arch=="arm" and armv7==0', {
+ 'link_settings': {
+ 'libraries': [
+ '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/armeabi/libgabi++_static.a',
+ ]
+ },
+ }],
+ ['target_arch=="ia32"', {
+ 'link_settings': {
+ 'libraries': [
+ '<(android_ndk_root)/sources/cxx-stl/gabi++/libs/x86/libgabi++_static.a',
+ ]
+ },
+ }],
+ ],
+ },
+ ],
+ }],
+ ],
}, { # use_system_icu != 0
'targets': [
{