Skip to content

Commit 4f7900f

Browse files
Initial work on upgrading to support ICU 4.6
1 parent 7400d84 commit 4f7900f

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

assets/icudt46l.zip

2.2 MB
Binary file not shown.

external/Android.mk

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ include $(BUILD_SHARED_LIBRARY)
109109

110110
ICU_COMMON_PATH := icu4c/common
111111

112+
# new icu common build begin
113+
112114
icu_src_files := \
113115
$(ICU_COMMON_PATH)/cmemory.c $(ICU_COMMON_PATH)/cstring.c \
114116
$(ICU_COMMON_PATH)/cwchar.c $(ICU_COMMON_PATH)/locmap.c \
@@ -130,7 +132,7 @@ icu_src_files := \
130132
$(ICU_COMMON_PATH)/ucnv_set.c $(ICU_COMMON_PATH)/ucnv_u16.c \
131133
$(ICU_COMMON_PATH)/ucnv_u32.c $(ICU_COMMON_PATH)/ucnv_u7.c \
132134
$(ICU_COMMON_PATH)/ucnv_u8.c \
133-
$(ICU_COMMON_PATH)/udata.c $(ICU_COMMON_PATH)/udatamem.c \
135+
$(ICU_COMMON_PATH)/udatamem.c \
134136
$(ICU_COMMON_PATH)/udataswp.c $(ICU_COMMON_PATH)/uenum.c \
135137
$(ICU_COMMON_PATH)/uhash.c $(ICU_COMMON_PATH)/uinit.c \
136138
$(ICU_COMMON_PATH)/uinvchar.c $(ICU_COMMON_PATH)/uloc.c \
@@ -188,13 +190,16 @@ icu_src_files += \
188190
$(ICU_COMMON_PATH)/loclikely.cpp $(ICU_COMMON_PATH)/locresdata.cpp \
189191
$(ICU_COMMON_PATH)/normalizer2impl.cpp $(ICU_COMMON_PATH)/normalizer2.cpp \
190192
$(ICU_COMMON_PATH)/filterednormalizer2.cpp $(ICU_COMMON_PATH)/ucol_swp.cpp \
191-
$(ICU_COMMON_PATH)/uprops.cpp $(ICU_COMMON_PATH)/utrie2.cpp
192-
193+
$(ICU_COMMON_PATH)/uprops.cpp $(ICU_COMMON_PATH)/utrie2.cpp \
194+
$(ICU_COMMON_PATH)/charstr.cpp $(ICU_COMMON_PATH)/uts46.cpp \
195+
$(ICU_COMMON_PATH)/udata.cpp
193196

194197
# This is the empty compiled-in icu data structure
195198
# that we need to satisfy the linker.
196199
icu_src_files += $(ICU_COMMON_PATH)/../stubdata/stubdata.c
197200

201+
# new icu common build end
202+
198203
icu_c_includes := \
199204
$(ICU_COMMON_PATH)/ \
200205
$(ICU_COMMON_PATH)//../i18n
@@ -203,10 +208,10 @@ icu_c_includes := \
203208
# device and sim builds can use the same codepath, and it's hard to break one
204209
# without noticing because the other still works.
205210

206-
icu_local_cflags += -D_REENTRANT -DU_COMMON_IMPLEMENTATION -O3 -DHAVE_ANDROID_OS=1
211+
icu_local_cflags += -D_REENTRANT -DU_COMMON_IMPLEMENTATION -O3 -DHAVE_ANDROID_OS=1 -fvisibility=hidden
207212
icu_local_cflags += '-DICU_DATA_DIR_PREFIX_ENV_VAR="SQLCIPHER_ICU_PREFIX"'
208213
icu_local_cflags += '-DICU_DATA_DIR="/icu"'
209-
icu_local_ldlibs := -lc
214+
icu_local_ldlibs := -lc -lpthread -lm
210215

211216
#
212217
# Build for the target (device).
@@ -216,6 +221,8 @@ include $(CLEAR_VARS)
216221
LOCAL_SRC_FILES := $(icu_src_files)
217222
LOCAL_C_INCLUDES := $(icu_c_includes)
218223
LOCAL_CFLAGS := $(icu_local_cflags) -DPIC -fPIC
224+
LOCAL_RTTI_FLAG := -frtti
225+
LOCAL_SHARED_LIBRARIES += libgabi++
219226
LOCAL_LDLIBS += $(icu_local_ldlibs)
220227
LOCAL_MODULE_TAGS := optional
221228
LOCAL_MODULE := libicuuc
@@ -233,15 +240,17 @@ LOCAL_PATH := $(PROJECT_ROOT_PATH)
233240
#ICU_I18N_PATH := $(LOCAL_PATH)/icu4c/i18n
234241
ICU_I18N_PATH := icu4c/i18n
235242

243+
# start new icu18n
244+
236245
src_files := \
237246
$(ICU_I18N_PATH)/bocsu.c $(ICU_I18N_PATH)/ucln_in.c $(ICU_I18N_PATH)/decContext.c \
238247
$(ICU_I18N_PATH)/ulocdata.c $(ICU_I18N_PATH)/utmscale.c $(ICU_I18N_PATH)/decNumber.c
239248

240249
src_files += \
241-
$(ICU_I18N_PATH)/indiancal.cpp $(ICU_I18N_PATH)/dtptngen.cpp $(ICU_I18N_PATH)/dtrule.cpp \
242-
$(ICU_I18N_PATH)/persncal.cpp $(ICU_I18N_PATH)/rbtz.cpp $(ICU_I18N_PATH)/reldtfmt.cpp \
243-
$(ICU_I18N_PATH)/taiwncal.cpp $(ICU_I18N_PATH)/tzrule.cpp $(ICU_I18N_PATH)/tztrans.cpp \
244-
$(ICU_I18N_PATH)/udatpg.cpp $(ICU_I18N_PATH)/vtzone.cpp \
250+
$(ICU_I18N_PATH)/indiancal.cpp $(ICU_I18N_PATH)/dtptngen.cpp $(ICU_I18N_PATH)/dtrule.cpp \
251+
$(ICU_I18N_PATH)/persncal.cpp $(ICU_I18N_PATH)/rbtz.cpp $(ICU_I18N_PATH)/reldtfmt.cpp \
252+
$(ICU_I18N_PATH)/taiwncal.cpp $(ICU_I18N_PATH)/tzrule.cpp $(ICU_I18N_PATH)/tztrans.cpp \
253+
$(ICU_I18N_PATH)/udatpg.cpp $(ICU_I18N_PATH)/vtzone.cpp \
245254
$(ICU_I18N_PATH)/anytrans.cpp $(ICU_I18N_PATH)/astro.cpp $(ICU_I18N_PATH)/buddhcal.cpp \
246255
$(ICU_I18N_PATH)/basictz.cpp $(ICU_I18N_PATH)/calendar.cpp $(ICU_I18N_PATH)/casetrn.cpp \
247256
$(ICU_I18N_PATH)/choicfmt.cpp $(ICU_I18N_PATH)/coleitr.cpp $(ICU_I18N_PATH)/coll.cpp \
@@ -281,32 +290,34 @@ src_files += \
281290
$(ICU_I18N_PATH)/plurfmt.cpp $(ICU_I18N_PATH)/dtitvfmt.cpp $(ICU_I18N_PATH)/dtitvinf.cpp \
282291
$(ICU_I18N_PATH)/tmunit.cpp $(ICU_I18N_PATH)/tmutamt.cpp $(ICU_I18N_PATH)/tmutfmt.cpp \
283292
$(ICU_I18N_PATH)/colldata.cpp $(ICU_I18N_PATH)/bmsearch.cpp $(ICU_I18N_PATH)/bms.cpp \
284-
$(ICU_I18N_PATH)/currpinf.cpp $(ICU_I18N_PATH)/uspoof.cpp $(ICU_I18N_PATH)/uspoof_impl.cpp \
285-
$(ICU_I18N_PATH)/uspoof_build.cpp \
286-
$(ICU_I18N_PATH)/regextxt.cpp $(ICU_I18N_PATH)/selfmt.cpp $(ICU_I18N_PATH)/uspoof_conf.cpp \
287-
$(ICU_I18N_PATH)/uspoof_wsconf.cpp $(ICU_I18N_PATH)/ztrans.cpp $(ICU_I18N_PATH)/zrule.cpp \
288-
$(ICU_I18N_PATH)/vzone.cpp $(ICU_I18N_PATH)/fphdlimp.cpp $(ICU_I18N_PATH)/fpositer.cpp\
289-
$(ICU_I18N_PATH)/locdspnm.cpp $(ICU_I18N_PATH)/decnumstr.cpp $(ICU_I18N_PATH)/ucol_wgt.cpp
293+
$(ICU_I18N_PATH)/currpinf.cpp $(ICU_I18N_PATH)/uspoof.cpp $(ICU_I18N_PATH)/uspoof_impl.cpp \
294+
$(ICU_I18N_PATH)/uspoof_build.cpp \
295+
$(ICU_I18N_PATH)/regextxt.cpp $(ICU_I18N_PATH)/selfmt.cpp $(ICU_I18N_PATH)/uspoof_conf.cpp \
296+
$(ICU_I18N_PATH)/uspoof_wsconf.cpp $(ICU_I18N_PATH)/ztrans.cpp $(ICU_I18N_PATH)/zrule.cpp \
297+
$(ICU_I18N_PATH)/vzone.cpp $(ICU_I18N_PATH)/fphdlimp.cpp $(ICU_I18N_PATH)/fpositer.cpp\
298+
$(ICU_I18N_PATH)/locdspnm.cpp $(ICU_I18N_PATH)/decnumstr.cpp $(ICU_I18N_PATH)/ucol_wgt.cpp
299+
300+
# end new icu18n
290301

291302
c_includes = \
292303
$(ICU_I18N_PATH)/ \
293304
$(ICU_I18N_PATH)/../common
294305

295-
296306
#
297307
# Build for the target (device).
298308
#
299309

300310
include $(CLEAR_VARS)
301311

302312
LOCAL_SRC_FILES := $(src_files)
303-
LOCAL_C_INCLUDES := $(c_includes)
304-
305-
LOCAL_CFLAGS += -D_REENTRANT -DPIC -DU_I18N_IMPLEMENTATION -fPIC
313+
LOCAL_C_INCLUDES := $(c_includes) \
314+
abi/cpp/include
315+
LOCAL_CFLAGS += -D_REENTRANT -DPIC -DU_I18N_IMPLEMENTATION -fPIC -fvisibility=hidden
306316
LOCAL_CFLAGS += -O3
307-
317+
LOCAL_RTTI_FLAG := -frtti
318+
LOCAL_SHARED_LIBRARIES += libgabi++
308319
LOCAL_STATIC_LIBRARIES += libicuuc
309-
LOCAL_LDLIBS += -lc
320+
LOCAL_LDLIBS += -lc -lpthread -lm
310321
LOCAL_MODULE_TAGS := optional
311322
LOCAL_MODULE := libicui18n
312323

external/icu4c

Submodule icu4c updated from fa7b84a to 0fa67b9

0 commit comments

Comments
 (0)