代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/third_party_pcre2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2021 北京万里红科技有限公司
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
PCRE2_LIB_DIR = "//third_party/pcre2/pcre2"
config("third_party_pcre2_config") {
include_dirs = [ "$PCRE2_LIB_DIR/src" ]
}
pcre2_sources = [
"$PCRE2_LIB_DIR/src/pcre2_auto_possess.c",
"$PCRE2_LIB_DIR/src/pcre2_compile.c",
"$PCRE2_LIB_DIR/src/pcre2_config.c",
"$PCRE2_LIB_DIR/src/pcre2_context.c",
"$PCRE2_LIB_DIR/src/pcre2_convert.c",
"$PCRE2_LIB_DIR/src/pcre2_dfa_match.c",
"$PCRE2_LIB_DIR/src/pcre2_error.c",
"$PCRE2_LIB_DIR/src/pcre2_extuni.c",
"$PCRE2_LIB_DIR/src/pcre2_find_bracket.c",
"$PCRE2_LIB_DIR/src/pcre2_jit_compile.c",
"$PCRE2_LIB_DIR/src/pcre2_maketables.c",
"$PCRE2_LIB_DIR/src/pcre2_match.c",
"$PCRE2_LIB_DIR/src/pcre2_match_data.c",
"$PCRE2_LIB_DIR/src/pcre2_newline.c",
"$PCRE2_LIB_DIR/src/pcre2_ord2utf.c",
"$PCRE2_LIB_DIR/src/pcre2_pattern_info.c",
"$PCRE2_LIB_DIR/src/pcre2_script_run.c",
"$PCRE2_LIB_DIR/src/pcre2_serialize.c",
"$PCRE2_LIB_DIR/src/pcre2_string_utils.c",
"$PCRE2_LIB_DIR/src/pcre2_study.c",
"$PCRE2_LIB_DIR/src/pcre2_substitute.c",
"$PCRE2_LIB_DIR/src/pcre2_substring.c",
"$PCRE2_LIB_DIR/src/pcre2_tables.c",
"$PCRE2_LIB_DIR/src/pcre2_ucd.c",
"$PCRE2_LIB_DIR/src/pcre2_valid_utf.c",
"$PCRE2_LIB_DIR/src/pcre2_xclass.c",
]
ohos_shared_library("libpcre2") {
branch_protector_ret = "pac_ret"
md5_check_script = rebase_path("$PCRE2_LIB_DIR/check_md5.sh")
_arguments_config = [
rebase_path("$PCRE2_LIB_DIR/src/config.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src/config.h"),
]
check_config_result =
exec_script(md5_check_script, _arguments_config, "string")
if (check_config_result == "") {
exec_script("/usr/bin/env",
[
"cp",
"-f",
rebase_path("$PCRE2_LIB_DIR/src/config.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src/config.h"),
])
}
_arguments_pcre2 = [
rebase_path("$PCRE2_LIB_DIR/src/pcre2.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src/pcre2.h"),
]
check_pcre2_result = exec_script(md5_check_script, _arguments_pcre2, "string")
if (check_pcre2_result == "") {
exec_script("/usr/bin/env",
[
"cp",
"-f",
rebase_path("$PCRE2_LIB_DIR/src/pcre2.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src/pcre2.h"),
])
}
_arguments_pcre2_chartables = [
rebase_path("$PCRE2_LIB_DIR/src/pcre2_chartables.c.dist"),
rebase_path("$PCRE2_LIB_DIR/src/pcre2_chartables.c"),
]
check_pcre2_chartables_result =
exec_script(md5_check_script, _arguments_pcre2_chartables, "string")
if (check_pcre2_chartables_result == "") {
exec_script("/usr/bin/env",
[
"cp",
"-f",
rebase_path("$PCRE2_LIB_DIR/src/pcre2_chartables.c.dist"),
rebase_path("$PCRE2_LIB_DIR/src/pcre2_chartables.c"),
])
}
output_name = "libpcre2"
sources = pcre2_sources
sources += [ "$PCRE2_LIB_DIR/src/pcre2_chartables.c" ]
include_dirs = [ "$PCRE2_LIB_DIR/src" ]
public_configs = [ ":third_party_pcre2_config" ]
cflags = [
"-D_GNU_SOURCE",
"-DHAVE_CONFIG_H",
"-DSUPPORT_PCRE2_8=1",
"-DPCRE2_CODE_UNIT_WIDTH=8",
"-w",
]
install_enable = true
install_images = [
"system",
"ramdisk",
"updater",
]
license_file = "$PCRE2_LIB_DIR/LICENCE"
innerapi_tags = [
"platformsdk_indirect",
"chipsetsdk_indirect",
]
part_name = "pcre2"
subsystem_name = "thirdparty"
}
ohos_static_library("libpcre2_static") {
exec_script("/usr/bin/env",
[
"mkdir",
"-p",
rebase_path("$PCRE2_LIB_DIR/src_static"),
])
md5_check_script = rebase_path("$PCRE2_LIB_DIR/check_md5.sh")
_arguments_config = [
rebase_path("$PCRE2_LIB_DIR/src/config.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src_static/config.h"),
]
check_config_result =
exec_script(md5_check_script, _arguments_config, "string")
if (check_config_result == "") {
exec_script("/usr/bin/env",
[
"cp",
"-f",
rebase_path("$PCRE2_LIB_DIR/src/config.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src_static/config.h"),
])
}
_arguments_pcre2 = [
rebase_path("$PCRE2_LIB_DIR/src/pcre2.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src_static/pcre2.h"),
]
check_pcre2_result = exec_script(md5_check_script, _arguments_pcre2, "string")
if (check_pcre2_result == "") {
exec_script("/usr/bin/env",
[
"cp",
"-f",
rebase_path("$PCRE2_LIB_DIR/src/pcre2.h.generic"),
rebase_path("$PCRE2_LIB_DIR/src_static/pcre2.h"),
])
}
_arguments_pcre2_chartables = [
rebase_path("$PCRE2_LIB_DIR/src/pcre2_chartables.c.dist"),
rebase_path("$PCRE2_LIB_DIR/src_static/pcre2_chartables.c"),
]
check_pcre2_chartables_result =
exec_script(md5_check_script, _arguments_pcre2_chartables, "string")
if (check_pcre2_chartables_result == "") {
exec_script("/usr/bin/env",
[
"cp",
"-f",
rebase_path("$PCRE2_LIB_DIR/src/pcre2_chartables.c.dist"),
rebase_path("$PCRE2_LIB_DIR/src_static/pcre2_chartables.c"),
])
}
output_name = "libpcre2_static"
sources = pcre2_sources
sources += [ "$PCRE2_LIB_DIR/src_static/pcre2_chartables.c" ]
include_dirs = [ "$PCRE2_LIB_DIR/src" ]
include_dirs += [ "$PCRE2_LIB_DIR/src_static" ]
public_configs = [ ":third_party_pcre2_config" ]
cflags = [
"-D_GNU_SOURCE",
"-DHAVE_CONFIG_H",
"-DSUPPORT_PCRE2_8=1",
"-DPCRE2_CODE_UNIT_WIDTH=8",
"-w",
]
license_file = "$PCRE2_LIB_DIR/LICENCE"
part_name = "pcre2"
subsystem_name = "thirdparty"
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。