!847 适配ohos_sdk编译

Merge pull request !847 from LY/master
This commit is contained in:
openharmony_ci 2024-10-16 07:41:33 +00:00 committed by Gitee
commit 739d799e48
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 109 additions and 114 deletions

View File

@ -77,123 +77,125 @@ ohos_shared_library("intl_util") {
branch_protector_ret = "pac_ret"
public_configs = [ ":intl_util_config" ]
include_dirs = []
sources = [
"entity_recognition/date_time_recognition/src/date_rule_init.cpp",
"entity_recognition/date_time_recognition/src/date_time_filter.cpp",
"entity_recognition/date_time_recognition/src/date_time_matched.cpp",
"entity_recognition/date_time_recognition/src/date_time_rule.cpp",
"entity_recognition/date_time_recognition/src/date_time_sequence.cpp",
"entity_recognition/date_time_recognition/src/rules_engine.cpp",
"entity_recognition/phone_number_recognition/src/border_rule.cpp",
"entity_recognition/phone_number_recognition/src/code_rule.cpp",
"entity_recognition/phone_number_recognition/src/find_rule.cpp",
"entity_recognition/phone_number_recognition/src/negative_rule.cpp",
"entity_recognition/phone_number_recognition/src/phone_number_matched.cpp",
"entity_recognition/phone_number_recognition/src/phone_number_rule.cpp",
"entity_recognition/phone_number_recognition/src/positive_rule.cpp",
"entity_recognition/phone_number_recognition/src/regex_rule.cpp",
"entity_recognition/src/entity_recognizer.cpp",
"src/character.cpp",
"src/collator.cpp",
"src/date_time_format.cpp",
"src/holiday_manager.cpp",
"src/i18n_break_iterator.cpp",
"src/i18n_calendar.cpp",
"src/i18n_normalizer.cpp",
"src/i18n_timezone.cpp",
"src/index_util.cpp",
"src/locale_compare.cpp",
"src/locale_config.cpp",
"src/locale_data.cpp",
"src/locale_info.cpp",
"src/locale_matcher.cpp",
"src/locale_util.cpp",
"src/lunar_calendar.cpp",
"src/measure_data.cpp",
"src/multi_users.cpp",
"src/number_format.cpp",
"src/phone_number_format.cpp",
"src/plural_rules.cpp",
"src/relative_time_format.cpp",
"src/signature_verifier.cpp",
"src/system_locale_manager.cpp",
"src/taboo.cpp",
"src/taboo_utils.cpp",
"src/utils.cpp",
]
version_script = "libintl_util.map"
sources = [ "src/lunar_calendar.cpp" ]
external_deps = [ "hilog:libhilog" ]
cflags_cc = [
"-Wall",
"-fPIC",
"-frtti",
]
remove_configs = [ "//build/config/compiler:no_rtti" ]
deps = [
":CN_phonenumber_xml",
":GB_phonenumber_xml",
":bo_lang_xml",
":common_datetime_xml",
":common_phonenumber_xml",
":config_locales_xml",
":dialect_languages_xml",
":en_Latn_lang_xml",
":en_Latn_region_xml",
":en_datetime_xml",
":i18n.para",
":i18n.para.dac",
":i18n_param_config_xml",
":lang_supported_locales",
":region_supported_locales_xml",
":root_timezone_xml",
":timezones_xml",
":ug_lang_xml",
":zh_Hans_lang_xml",
":zh_Hans_region_xml",
":zh_Hans_timezone_xml",
":zh_Hant_HK_lang_xml",
":zh_Hant_lang_xml",
":zh_datetime_xml",
]
use_exceptions = true
external_deps = [
"access_token:libaccesstoken_sdk",
"access_token:libtokenid_sdk",
"c_utils:utils",
"config_policy:configpolicy_util",
"hilog:libhilog",
"icu:icundk",
"icu:shared_icui18n",
"icu:shared_icuuc",
"init:libbegetutil",
"ipc:ipc_core",
"libphonenumber:phonenumber_standard",
"libpng:libpng",
"libxml2:libxml2",
"openssl:libcrypto_shared",
"openssl:libssl_shared",
"os_account:os_account_innerkits",
"preferences:native_preferences",
]
public_external_deps = []
defines = []
if (i18n_support_ui) {
public_external_deps += [
"ability_base:base",
"ability_base:configuration",
"ability_base:want",
if (!build_ohos_sdk) {
sources += [
"entity_recognition/date_time_recognition/src/date_rule_init.cpp",
"entity_recognition/date_time_recognition/src/date_time_filter.cpp",
"entity_recognition/date_time_recognition/src/date_time_matched.cpp",
"entity_recognition/date_time_recognition/src/date_time_rule.cpp",
"entity_recognition/date_time_recognition/src/date_time_sequence.cpp",
"entity_recognition/date_time_recognition/src/rules_engine.cpp",
"entity_recognition/phone_number_recognition/src/border_rule.cpp",
"entity_recognition/phone_number_recognition/src/code_rule.cpp",
"entity_recognition/phone_number_recognition/src/find_rule.cpp",
"entity_recognition/phone_number_recognition/src/negative_rule.cpp",
"entity_recognition/phone_number_recognition/src/phone_number_matched.cpp",
"entity_recognition/phone_number_recognition/src/phone_number_rule.cpp",
"entity_recognition/phone_number_recognition/src/positive_rule.cpp",
"entity_recognition/phone_number_recognition/src/regex_rule.cpp",
"entity_recognition/src/entity_recognizer.cpp",
"src/character.cpp",
"src/collator.cpp",
"src/date_time_format.cpp",
"src/holiday_manager.cpp",
"src/i18n_break_iterator.cpp",
"src/i18n_calendar.cpp",
"src/i18n_normalizer.cpp",
"src/i18n_timezone.cpp",
"src/index_util.cpp",
"src/locale_compare.cpp",
"src/locale_config.cpp",
"src/locale_data.cpp",
"src/locale_info.cpp",
"src/locale_matcher.cpp",
"src/locale_util.cpp",
"src/measure_data.cpp",
"src/multi_users.cpp",
"src/number_format.cpp",
"src/phone_number_format.cpp",
"src/plural_rules.cpp",
"src/relative_time_format.cpp",
"src/signature_verifier.cpp",
"src/system_locale_manager.cpp",
"src/taboo.cpp",
"src/taboo_utils.cpp",
"src/utils.cpp",
]
version_script = "libintl_util.map"
deps = [
":CN_phonenumber_xml",
":GB_phonenumber_xml",
":bo_lang_xml",
":common_datetime_xml",
":common_phonenumber_xml",
":config_locales_xml",
":dialect_languages_xml",
":en_Latn_lang_xml",
":en_Latn_region_xml",
":en_datetime_xml",
":i18n.para",
":i18n.para.dac",
":i18n_param_config_xml",
":lang_supported_locales",
":region_supported_locales_xml",
":root_timezone_xml",
":timezones_xml",
":ug_lang_xml",
":zh_Hans_lang_xml",
":zh_Hans_region_xml",
":zh_Hans_timezone_xml",
":zh_Hant_HK_lang_xml",
":zh_Hant_lang_xml",
":zh_datetime_xml",
]
external_deps += [
"ability_runtime:ability_manager",
"ability_runtime:app_manager",
"common_event_service:cesfwk_innerkits",
"access_token:libaccesstoken_sdk",
"access_token:libtokenid_sdk",
"c_utils:utils",
"config_policy:configpolicy_util",
"icu:icundk",
"icu:shared_icui18n",
"icu:shared_icuuc",
"init:libbegetutil",
"ipc:ipc_core",
"libphonenumber:phonenumber_standard",
"libpng:libpng",
"libxml2:libxml2",
"openssl:libcrypto_shared",
"openssl:libssl_shared",
"os_account:os_account_innerkits",
"preferences:native_preferences",
]
defines += [ "SUPPORT_GRAPHICS" ]
}
if (is_asan) {
defines += [ "SUPPORT_ASAN" ]
}
if (target_platform == "pc") {
defines += [ "SUPPORT_MULTI_USER" ]
public_external_deps = []
defines = []
if (i18n_support_ui) {
public_external_deps += [
"ability_base:base",
"ability_base:configuration",
"ability_base:want",
]
external_deps += [
"ability_runtime:ability_manager",
"ability_runtime:app_manager",
"common_event_service:cesfwk_innerkits",
]
defines += [ "SUPPORT_GRAPHICS" ]
}
if (is_asan) {
defines += [ "SUPPORT_ASAN" ]
}
if (target_platform == "pc") {
defines += [ "SUPPORT_MULTI_USER" ]
}
}
install_images = [ system_base_dir ]
relative_install_dir = "platformsdk"

View File

@ -19,11 +19,6 @@
#include <unordered_map>
#include <vector>
#include "unicode/locid.h"
#include "unicode/calendar.h"
#include "unicode/ucal.h"
#include "unicode/utypes.h"
namespace OHOS {
namespace Global {
namespace I18n {
@ -73,8 +68,6 @@ private:
bool isLeapMonth = false;
bool isGregorianLeapYear = false;
bool isValidDate = false;
// icu::Calendar* gregorianCalendar;
};
} // namespace I18n
} // namespace Global