Signed-off-by: 罗博明 <luoboming@huawei.com>
This commit is contained in:
罗博明 2024-08-20 08:16:44 +00:00 committed by Gitee
parent f22e57919c
commit 80cf7826ce
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 15 additions and 18 deletions

View File

@ -17,4 +17,6 @@ declare_args() {
icu_support_libbegetutil = true
distro_tzdata_dir = "\"/system/etc/tzdata_distro\""
system_tzdata_dir = "\"/system/etc/icu_tzdata\""
icu_dat_name = "icudt72l"
icu_data_filter_dir = "full"
}

View File

@ -54,6 +54,15 @@ ohos_static_library("static_icustubdata") {
subsystem_name = "thirdparty"
}
ohos_prebuilt_etc("ohos_icudat") {
source = "$root_out_dir/thirdparty/icu/out/$icu_dat_name.dat"
deps = [ "//third_party/icu/ohos_icu4c:pkg_icudata" ]
module_install_dir = "usr/ohos_icu/"
part_name = "icu"
subsystem_name = "thirdparty"
}
icu_common_source = [
"//third_party/icu/icu4c/source/common/ubiditransform.cpp",
"//third_party/icu/icu4c/source/common/locutil.cpp",
@ -526,7 +535,10 @@ ohos_shared_library("shared_icuuc") {
"SYSTEM_TZDATA_DIR=${system_tzdata_dir}",
]
sources = icu_common_source
deps = [ ":static_icustubdata" ]
deps = [
":ohos_icudat",
":static_icustubdata",
]
cflags_cc = [
"-O3",
"-W",

View File

@ -15,9 +15,6 @@ import("//build/ohos.gni")
import("//build/ohos/ndk/ndk.gni")
import("//third_party/icu/icu.gni")
icu_dat_name = "icudt72l"
icu_data_filter_dir = "full"
ohos_shared_library("icundk") {
ldflags = [
"-shared",
@ -32,7 +29,6 @@ ohos_shared_library("icundk") {
sources = [ "src/icu_addon.cpp" ]
deps = [
":ohos_icudat",
"//third_party/icu/icu4c:shared_icui18n",
"//third_party/icu/icu4c:shared_icuuc",
]
@ -75,16 +71,3 @@ action("pkg_icudata") {
]
outputs = [ "$root_out_dir/thirdparty/icu/out/$icu_dat_name.dat" ]
}
ohos_prebuilt_etc("ohos_icudat") {
if ("${product_name}" == "ohcore") {
source = "//third_party/icu/ohos_icu4j/data/icudt68l.dat"
} else {
source = "$root_out_dir/thirdparty/icu/out/$icu_dat_name.dat"
}
deps = [ ":pkg_icudata" ]
module_install_dir = "usr/ohos_icu/"
part_name = "icu"
subsystem_name = "thirdparty"
}