[libphonenumber] Bump to 8.13.17 & fix linux and macOS build (#32899)

* [libphonenumber] Bump to 8.13.17 & fix linux and macOS build

* update version database

* fix windows icui18n lib name

* update version database

* fix patches

* update version database

* fix ci.baseline.txt
This commit is contained in:
Weihang Ding 2023-08-08 00:07:45 +08:00 committed by GitHub
parent 0ae3ed5f1c
commit a67ca6b1ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 52 additions and 41 deletions

View File

@ -1,8 +1,8 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 86f2212..46913fd 100644
index 10b6dce7..50f06eda 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -44,6 +44,7 @@ function (print_error DESCRIPTION FILE)
@@ -46,6 +46,7 @@ function (print_error DESCRIPTION FILE)
"Can't find ${DESCRIPTION}: can't locate ${FILE}. Please read the README.")
endfunction ()

View File

@ -1,13 +1,17 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index cdd7a08..627f897 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -192,7 +192,7 @@ set (ICU_INCLUDE_DIR ${ICU_UC_INCLUDE_DIR})
set (ICU_LIB ${ICU_UC_LIB})
# If ICU regexp engine is used or if the geocoder is built, use icui18n as well.
if (USE_ICU_REGEXP OR BUILD_GEOCODER)
- find_required_library (ICU_I18N unicode/regex.h icui18n "ICU")
+ find_required_library (ICU_I18N unicode/regex.h icuin "ICU")
check_library_version (PC_ICU_I18N icu-i18n>=4.4)
list (APPEND ICU_INCLUDE_DIR ${ICU_I18N_INCLUDE_DIR})
list (APPEND ICU_LIB ${ICU_I18N_LIB})
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index cdd7a081..10b6dce7 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -192,7 +192,11 @@ set (ICU_INCLUDE_DIR ${ICU_UC_INCLUDE_DIR})
set (ICU_LIB ${ICU_UC_LIB})
# If ICU regexp engine is used or if the geocoder is built, use icui18n as well.
if (USE_ICU_REGEXP OR BUILD_GEOCODER)
- find_required_library (ICU_I18N unicode/regex.h icui18n "ICU")
+ if (NOT WIN32)
+ find_required_library (ICU_I18N unicode/regex.h "icui18n" "ICU")
+ else ()
+ find_required_library (ICU_I18N unicode/regex.h "icuin" "ICU")
+ endif ()
check_library_version (PC_ICU_I18N icu-i18n>=4.4)
list (APPEND ICU_INCLUDE_DIR ${ICU_I18N_INCLUDE_DIR})
list (APPEND ICU_LIB ${ICU_I18N_LIB})

View File

@ -1,13 +1,13 @@
diff --git a/cpp/src/phonenumbers/regexp_adapter_re2.cc b/cpp/src/phonenumbers/regexp_adapter_re2.cc
index bb54223..398f369 100644
--- a/cpp/src/phonenumbers/regexp_adapter_re2.cc
+++ b/cpp/src/phonenumbers/regexp_adapter_re2.cc
@@ -31,6 +31,8 @@
namespace i18n {
namespace phonenumbers {
+using re2::StringPiece;
+
// Implementation of RegExpInput abstract class.
class RE2RegExpInput : public RegExpInput {
public:
diff --git a/cpp/src/phonenumbers/regexp_adapter_re2.cc b/cpp/src/phonenumbers/regexp_adapter_re2.cc
index bb542234..398f369b 100644
--- a/cpp/src/phonenumbers/regexp_adapter_re2.cc
+++ b/cpp/src/phonenumbers/regexp_adapter_re2.cc
@@ -31,6 +31,8 @@
namespace i18n {
namespace phonenumbers {
+using re2::StringPiece;
+
// Implementation of RegExpInput abstract class.
class RE2RegExpInput : public RegExpInput {
public:

View File

@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/libphonenumber
REF "v${VERSION}"
SHA512 03bd6a6c4499a7135dbfe30acfd0ede818008a1c9a40068c04c0d3cff5638ea10502e186b625534d9f06cbc69da81c470f7d7308cdd08b41428b1a2e0236f409
SHA512 b1ec99aa952558d2ba26d95d7c1bdfd8169f992b3190cc4236e1ce17e69db50ef2839b2840a9553541e09c7509b77c463a1036f84251844ec71bd5888ef78555
HEAD_REF master
PATCHES
fix-re2-identifiers.patch
@ -24,8 +24,11 @@ vcpkg_cmake_configure(
-DBUILD_TESTING=OFF)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -1,8 +1,8 @@
diff --git a/cpp/src/phonenumbers/regexp_adapter_re2.cc b/cpp/src/phonenumbers/regexp_adapter_re2.cc
index bb542234..a4ccb545 100644
index 398f369b..3dd5d854 100644
--- a/cpp/src/phonenumbers/regexp_adapter_re2.cc
+++ b/cpp/src/phonenumbers/regexp_adapter_re2.cc
@@ -39,7 +39,7 @@ class RE2RegExpInput : public RegExpInput {
@@ -41,7 +41,7 @@ class RE2RegExpInput : public RegExpInput {
utf8_input_(string_) {}
virtual string ToString() const {

View File

@ -0,0 +1,4 @@
libphonenumber provides CMake targets:
find_package(libphonenumber CONFIG REQUIRED)
target_link_libraries(main PRIVATE libphonenumber::phonenumber)

View File

@ -1,10 +1,8 @@
{
"name": "libphonenumber",
"version": "8.13.13",
"port-version": 1,
"version": "8.13.17",
"description": "Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.",
"license": "Apache-2.0",
"supports": "!linux & !osx",
"dependencies": [
"abseil",
"boost-date-time",

View File

@ -648,9 +648,6 @@ libosip2:arm64-android=fail
libosip2:x64-android=fail
libosip2:x64-windows-static-md=fail
libp7client:x64-android=fail
libphonenumber:arm-neon-android=fail
libphonenumber:arm64-android=fail
libphonenumber:x64-android=fail
libpng-apng:arm64-windows = skip
libpng-apng:arm-uwp = skip
libpng-apng:x64-linux = skip

View File

@ -4465,8 +4465,8 @@
"port-version": 2
},
"libphonenumber": {
"baseline": "8.13.13",
"port-version": 1
"baseline": "8.13.17",
"port-version": 0
},
"libplist": {
"baseline": "1.3.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8c0eab944c22034092f0200dcbdd5a422eddc7f9",
"version": "8.13.17",
"port-version": 0
},
{
"git-tree": "5942baf68c6c369476c955e28dea2dd4fda11d1b",
"version": "8.13.13",