From 914922cf3b2f708d2add1760d33f354e7638c64a Mon Sep 17 00:00:00 2001 From: Vogtinator <> Date: Fri, 23 Feb 2024 15:41:32 +0000 Subject: [PATCH] Update libphonenumber to version 8.13.30 / rev 7 via SR 1149426 https://build.opensuse.org/request/show/1149426 by user Vogtinator + anag+factory - Update to version 8.13.30: * Update alternate formatting data, phone metadata, geocoding data, carrier data * Updated / refreshed time zone meta data. * New geocoding data - Add patch submitted to upstream at gh#google/libphonenumber#3394 to fix building with protobuf 3.25.1: * 0001-Add-support-to-protobuf-3.25.1.patch - Add patch submitted in gh#sergiomb2/libphonenumber#1 by Fabian Vogt: * 0002-Avoid-intermediate-proto-object-library.patch - Update to version 8.13.23: (forwarded request 1149395 from alarrosa) --- packages/libp/libphonenumber/.files | Bin 470 -> 570 bytes packages/libp/libphonenumber/.rev | 20 ++ .../0001-Add-support-to-protobuf-3.25.1.patch | 189 ++++++++++++++++++ ...id-intermediate-proto-object-library.patch | 66 ++++++ packages/libp/libphonenumber/_service | 2 +- .../libphonenumber-8.13.23.obscpio | 1 - .../libphonenumber-8.13.23.tar.xz | 1 - .../libphonenumber-8.13.30.obscpio | 1 + .../libphonenumber/libphonenumber.changes | 17 +- .../libphonenumber/libphonenumber.obsinfo | 6 +- .../libp/libphonenumber/libphonenumber.spec | 6 +- 11 files changed, 300 insertions(+), 9 deletions(-) create mode 100644 packages/libp/libphonenumber/0001-Add-support-to-protobuf-3.25.1.patch create mode 100644 packages/libp/libphonenumber/0002-Avoid-intermediate-proto-object-library.patch delete mode 120000 packages/libp/libphonenumber/libphonenumber-8.13.23.obscpio delete mode 120000 packages/libp/libphonenumber/libphonenumber-8.13.23.tar.xz create mode 120000 packages/libp/libphonenumber/libphonenumber-8.13.30.obscpio diff --git a/packages/libp/libphonenumber/.files b/packages/libp/libphonenumber/.files index 863e786f3d827c99c38e5f243657421f697ee102..4ca227d176d7ecab2c7075d1f193a1374c2faf5c 100644 GIT binary patch literal 570 zcmZvZv2NTj42BOV3ItvQbS!S|AcG<$Tbhb2eSp5eft08_7d_jsb%*5bqXfv1qC0>7 z-$$-{g|FS0!{PAI9aS-rcOfcjR*b#~mx!!Z6&SEh{R9AOe(PPgYJN@6roOC;nP$V= z`F7R0?xrq=b3R?Qa^}jXv(Bf=TfcHmm+lyG6t&DH19~ViSqR93y1_}*G_;cMeUPyU zaaFT!OCwz5kEUu`(Z<`$2O9>Y1e(;^P{{i1traHC2yl zCQG5XkOl|QmPYZGg^1xl+2%9NrTK6gLnz9YSOh@5XBxnBiUBRjo6qAvz5A-E9n-So z#+!f&Sk|K1i;F&iFht@O{PF&=r<~1xTi2z%t?9oXL2kuRkG{7b{*t9+=a8Gdk1)Cc UkUfZ!qYOfA-NR|u?LH-a1?_IB1poj5 literal 470 zcmZvY&1&R841@=ku#2yO+_LxuY}EhVr`+-Yd4WMvt7i-u+t{6uLsflM zTK5Wf-JiqZ@VDzlG#h7Q5-nMDa)q!YjiN*VK{wSC0I1)8ZK2Ax*{y~$pfto0#?1~5ggMgJXl+1@9Xu19GU4HT>x zUHqPSJ!*C z7E(h=V^a(X!RZ{(Il;oYw1|h>h>_1YpJea)jQP4xWfB*2`&LZZs6y6fw#NSEZ6BKE GvU~%nfr?iE diff --git a/packages/libp/libphonenumber/.rev b/packages/libp/libphonenumber/.rev index 092006ab76a..bbdd80fa18c 100644 --- a/packages/libp/libphonenumber/.rev +++ b/packages/libp/libphonenumber/.rev @@ -48,4 +48,24 @@ libphonenumber 8.13.28 (forwarded request 1119441 from AndreasStieger) 1119880 + + 1d160e228909587885ad6bdddbc15df9 + 8.13.30 + + anag+factory + - Update to version 8.13.30: + * Update alternate formatting data, phone metadata, geocoding + data, carrier data + * Updated / refreshed time zone meta data. + * New geocoding data +- Add patch submitted to upstream at gh#google/libphonenumber#3394 + to fix building with protobuf 3.25.1: + * 0001-Add-support-to-protobuf-3.25.1.patch +- Add patch submitted in gh#sergiomb2/libphonenumber#1 by + Fabian Vogt: + * 0002-Avoid-intermediate-proto-object-library.patch + +- Update to version 8.13.23: (forwarded request 1149395 from alarrosa) + 1149426 + diff --git a/packages/libp/libphonenumber/0001-Add-support-to-protobuf-3.25.1.patch b/packages/libp/libphonenumber/0001-Add-support-to-protobuf-3.25.1.patch new file mode 100644 index 00000000000..f86970c70be --- /dev/null +++ b/packages/libp/libphonenumber/0001-Add-support-to-protobuf-3.25.1.patch @@ -0,0 +1,189 @@ +From 9137f6d04e3b988dcea0cea7dd6da06509c11533 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= +Date: Sat, 20 Jan 2024 22:43:58 +0000 +Subject: [PATCH] Add support to protobuf 3.25.1 + +new-protobuf-cmake-logic.patch +--- + cpp/CMakeLists.txt | 90 ++++++++++++++++++++++++++------------- + cpp/cmake/config.cmake.in | 4 +- + 2 files changed, 63 insertions(+), 31 deletions(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 96def5c8f9..e076796365 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -100,7 +100,8 @@ if (USE_ALTERNATE_FORMATS) + endif () + + # Find all the required libraries and programs. +-find_package(absl) ++# Use "CONFIG" as there is no built-in cmake module for absl. ++find_package(absl CONFIG REQUIRED) + + if(NOT absl_FOUND) + # Overide abseil install rules for subprojects +@@ -169,14 +170,24 @@ if (USE_RE2) + find_required_library (RE2 re2/re2.h re2 "Google RE2") + endif () + +-if (USE_PROTOBUF_LITE) +- find_required_library (PROTOBUF google/protobuf/message_lite.h protobuf-lite +- "Google Protocol Buffers") +- check_library_version (PC_PROTOBUF protobuf-lite>=2.4) ++find_package(Protobuf CONFIG) ++if(NOT Protobuf_FOUND) ++ find_package(Protobuf REQUIRED) ++endif() ++ ++if (${Protobuf_VERSION} VERSION_LESS "3.21.0.0") ++ if (USE_PROTOBUF_LITE) ++ set (PROTOBUF_LIB ${Protobuf_LITE_LIBRARIES}) ++ else () ++ set (PROTOBUF_LIB ${Protobuf_LIBRARIES}) ++ endif () ++# find_required_program (PROTOC protoc "Google Protocol Buffers compiler (protoc)") + else () +- find_required_library (PROTOBUF google/protobuf/message_lite.h protobuf +- "Google Protocol Buffers") +- check_library_version (PC_PROTOBUF protobuf>=2.4) ++ if (USE_PROTOBUF_LITE) ++ set (PROTOBUF_LIB protobuf::libprotobuf-lite) ++ else () ++ set (PROTOBUF_LIB protobuf::libprotobuf) ++ endif () + endif () + + find_required_library (ICU_UC unicode/uchar.h icuuc "ICU") +@@ -192,9 +203,6 @@ if (USE_ICU_REGEXP OR BUILD_GEOCODER) + list (APPEND ICU_LIB ${ICU_I18N_LIB}) + endif () + +-find_required_program (PROTOC protoc +- "Google Protocol Buffers compiler (protoc)") +- + if (REGENERATE_METADATA) + find_required_program (JAVA java + "Java Runtime Environment") +@@ -220,24 +228,39 @@ endif () + set (RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../resources") + + set ( +- PROTOBUF_SOURCES "${RESOURCES_DIR}/phonemetadata.proto" +- "${RESOURCES_DIR}/phonenumber.proto" ++ PROTO_FILES "${RESOURCES_DIR}/phonemetadata.proto" ++ "${RESOURCES_DIR}/phonenumber.proto" + ) + +-set ( +- PROTOBUF_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonemetadata.pb.cc" +- "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonemetadata.pb.h" +- "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonenumber.pb.cc" +- "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonenumber.pb.h" +-) ++if (${Protobuf_VERSION} VERSION_LESS "3.21.0.0") ++ set ( ++ PROTOBUF_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonemetadata.pb.cc" ++ "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonemetadata.pb.h" ++ "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonenumber.pb.cc" ++ "${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/phonenumber.pb.h" ++ ) + +-add_custom_command ( +- COMMAND ${PROTOC_BIN} --cpp_out=${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/ +- --proto_path=${RESOURCES_DIR} ${PROTOBUF_SOURCES} ++# COMMAND ${PROTOC_BIN} ++ add_custom_command ( ++ COMMAND ${Protobuf_PROTOC_EXECUTABLE} ++ ARGS --cpp_out=${CMAKE_CURRENT_SOURCE_DIR}/src/phonenumbers/ --proto_path=${RESOURCES_DIR} ${PROTO_FILES} ++ VERBATIM + +- OUTPUT ${PROTOBUF_OUTPUT} +- DEPENDS ${PROTOBUF_SOURCES} +-) ++ OUTPUT ${PROTOBUF_OUTPUT} ++ DEPENDS ${PROTO_FILES} ++ ) ++else () ++ set (PROTOBUF_OUTPUT "") ++ add_library (proto-objects OBJECT ${PROTO_FILES}) ++ target_link_libraries (proto-objects PUBLIC protobuf::libprotobuf) ++ set (PROTO_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") ++ target_include_directories (proto-objects PUBLIC "$") ++ protobuf_generate ( ++ TARGET proto-objects ++ IMPORT_DIRS "${RESOURCES_DIR}" ++ PROTOC_OUT_DIR "${PROTO_BINARY_DIR}/phonenumbers" ++ ) ++endif () + + if (BUILD_GEOCODER) + # Geocoding data cpp file generation +@@ -267,9 +290,7 @@ set ( + "src/phonenumbers/base/strings/string_piece.cc" + "src/phonenumbers/default_logger.cc" + "src/phonenumbers/logger.cc" +- "src/phonenumbers/phonemetadata.pb.cc" # Generated by Protocol Buffers. + "src/phonenumbers/phonenumber.cc" +- "src/phonenumbers/phonenumber.pb.cc" # Generated by Protocol Buffers. + "src/phonenumbers/phonenumberutil.cc" + "src/phonenumbers/regex_based_matcher.cc" + "src/phonenumbers/regexp_cache.cc" +@@ -282,6 +303,10 @@ set ( + "src/phonenumbers/utf/unilib.cc" + ) + ++if (${Protobuf_VERSION} VERSION_LESS "3.21.0.0") ++ list (APPEND SOURCES ${PROTOBUF_OUTPUT}) ++endif () ++ + if (BUILD_GEOCODER) + set ( + GEOCODING_SOURCES +@@ -290,7 +315,6 @@ if (BUILD_GEOCODER) + "src/phonenumbers/geocoding/geocoding_data.cc" + "src/phonenumbers/geocoding/mapping_file_provider.cc" + "src/phonenumbers/geocoding/phonenumber_offline_geocoder.cc" +- "src/phonenumbers/phonenumber.pb.h" # Forces proto buffer generation. + ) + endif () + +@@ -450,6 +474,10 @@ if (APPLE) + list (APPEND LIBRARY_DEPS ${COREFOUNDATION_LIB} ${FOUNDATION_LIB}) + endif () + ++if (${Protobuf_VERSION} VERSION_GREATER_EQUAL "3.21.0.0") ++ list (APPEND LIBRARY_DEPS proto-objects) ++endif () ++ + #---------------------------------------------------------------- + # Build libraries + #---------------------------------------------------------------- +@@ -601,7 +629,11 @@ endif() + # Install built libraries + #---------------------------------------------------------------- + +-set (BUILT_LIBS) ++if (${Protobuf_VERSION} VERSION_GREATER_EQUAL "3.21.0.0") ++ set (BUILT_LIBS proto-objects) ++else () ++ set (BUILT_LIBS) ++endif () + set(targets_export_name "${PROJECT_NAME}-targets") + + if (BUILD_STATIC_LIB) +diff --git a/cpp/cmake/config.cmake.in b/cpp/cmake/config.cmake.in +index 05f915659e..b91ce98369 100644 +--- a/cpp/cmake/config.cmake.in ++++ b/cpp/cmake/config.cmake.in +@@ -2,8 +2,8 @@ + + include(CMakeFindDependencyMacro) + +-find_dependency(absl) +-find_dependency(Protobuf) ++find_dependency(absl CONFIG) ++find_dependency(Protobuf CONFIG) + + include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") + check_required_components("@PROJECT_NAME@") diff --git a/packages/libp/libphonenumber/0002-Avoid-intermediate-proto-object-library.patch b/packages/libp/libphonenumber/0002-Avoid-intermediate-proto-object-library.patch new file mode 100644 index 00000000000..3d5a56a0382 --- /dev/null +++ b/packages/libp/libphonenumber/0002-Avoid-intermediate-proto-object-library.patch @@ -0,0 +1,66 @@ +From 2f5789eeff639f0a533a898b729221076fe32334 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 22 Feb 2024 13:51:45 +0100 +Subject: [PATCH] Avoid intermediate proto-object library + +The use of proto-object breaks building shared libs and it doesn't make +sense to install it. Instead of TARGET, use generate_protobuf with OUT_VAR. +--- + cpp/CMakeLists.txt | 21 ++++----------------- + 1 file changed, 4 insertions(+), 17 deletions(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index e07679636..f37b29242 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -250,13 +250,10 @@ if (${Protobuf_VERSION} VERSION_LESS "3.21.0.0") + DEPENDS ${PROTO_FILES} + ) + else () +- set (PROTOBUF_OUTPUT "") +- add_library (proto-objects OBJECT ${PROTO_FILES}) +- target_link_libraries (proto-objects PUBLIC protobuf::libprotobuf) + set (PROTO_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") +- target_include_directories (proto-objects PUBLIC "$") + protobuf_generate ( +- TARGET proto-objects ++ PROTOS ${PROTO_FILES} ++ OUT_VAR PROTOBUF_OUTPUT + IMPORT_DIRS "${RESOURCES_DIR}" + PROTOC_OUT_DIR "${PROTO_BINARY_DIR}/phonenumbers" + ) +@@ -303,9 +300,7 @@ set ( + "src/phonenumbers/utf/unilib.cc" + ) + +-if (${Protobuf_VERSION} VERSION_LESS "3.21.0.0") +- list (APPEND SOURCES ${PROTOBUF_OUTPUT}) +-endif () ++list (APPEND SOURCES ${PROTOBUF_OUTPUT}) + + if (BUILD_GEOCODER) + set ( +@@ -474,10 +469,6 @@ if (APPLE) + list (APPEND LIBRARY_DEPS ${COREFOUNDATION_LIB} ${FOUNDATION_LIB}) + endif () + +-if (${Protobuf_VERSION} VERSION_GREATER_EQUAL "3.21.0.0") +- list (APPEND LIBRARY_DEPS proto-objects) +-endif () +- + #---------------------------------------------------------------- + # Build libraries + #---------------------------------------------------------------- +@@ -629,11 +620,7 @@ endif() + # Install built libraries + #---------------------------------------------------------------- + +-if (${Protobuf_VERSION} VERSION_GREATER_EQUAL "3.21.0.0") +- set (BUILT_LIBS proto-objects) +-else () +- set (BUILT_LIBS) +-endif () ++set (BUILT_LIBS) + set(targets_export_name "${PROJECT_NAME}-targets") + + if (BUILD_STATIC_LIB) diff --git a/packages/libp/libphonenumber/_service b/packages/libp/libphonenumber/_service index 17602c927fa..0390a45b400 100644 --- a/packages/libp/libphonenumber/_service +++ b/packages/libp/libphonenumber/_service @@ -2,7 +2,7 @@ https://github.com/google/libphonenumber.git git - v8.13.23 + v8.13.30 @PARENT_TAG@ v(.*) diff --git a/packages/libp/libphonenumber/libphonenumber-8.13.23.obscpio b/packages/libp/libphonenumber/libphonenumber-8.13.23.obscpio deleted file mode 120000 index 52c76dd94d5..00000000000 --- a/packages/libp/libphonenumber/libphonenumber-8.13.23.obscpio +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeibmdkggnlcahgttyn7vdo3ffd3r5hclgwtqwsgjppsqklgrevc3ou \ No newline at end of file diff --git a/packages/libp/libphonenumber/libphonenumber-8.13.23.tar.xz b/packages/libp/libphonenumber/libphonenumber-8.13.23.tar.xz deleted file mode 120000 index 9191cd1d354..00000000000 --- a/packages/libp/libphonenumber/libphonenumber-8.13.23.tar.xz +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeieid2jvtyasxwtcigio2djlahl4v2umv5sd2ixjfg6e2hbmvnlfua \ No newline at end of file diff --git a/packages/libp/libphonenumber/libphonenumber-8.13.30.obscpio b/packages/libp/libphonenumber/libphonenumber-8.13.30.obscpio new file mode 120000 index 00000000000..fb7b2f078bc --- /dev/null +++ b/packages/libp/libphonenumber/libphonenumber-8.13.30.obscpio @@ -0,0 +1 @@ +/ipfs/bafybeifa6u6pvapxrxviwbyzq2a5gptxed4kibvbqg4pdsvvkvgl2vxcwa \ No newline at end of file diff --git a/packages/libp/libphonenumber/libphonenumber.changes b/packages/libp/libphonenumber/libphonenumber.changes index d00b2c07f90..01f39c02c72 100644 --- a/packages/libp/libphonenumber/libphonenumber.changes +++ b/packages/libp/libphonenumber/libphonenumber.changes @@ -1,7 +1,22 @@ +------------------------------------------------------------------- +Thu Feb 22 11:07:23 UTC 2024 - Antonio Larrosa + +- Update to version 8.13.30: + * Update alternate formatting data, phone metadata, geocoding + data, carrier data + * Updated / refreshed time zone meta data. + * New geocoding data +- Add patch submitted to upstream at gh#google/libphonenumber#3394 + to fix building with protobuf 3.25.1: + * 0001-Add-support-to-protobuf-3.25.1.patch +- Add patch submitted in gh#sergiomb2/libphonenumber#1 by + Fabian Vogt: + * 0002-Avoid-intermediate-proto-object-library.patch + ------------------------------------------------------------------- Sun Oct 22 13:41:15 UTC 2023 - Andreas Stieger -- Update to version 8.13.28: +- Update to version 8.13.23: * Updated phone metadata, carrier data, geocoding data, short number metadata for a number of region and calling codes - drop 0001-Build-with-C-17.patch now upstream diff --git a/packages/libp/libphonenumber/libphonenumber.obsinfo b/packages/libp/libphonenumber/libphonenumber.obsinfo index 95b92947355..346379e53c4 100644 --- a/packages/libp/libphonenumber/libphonenumber.obsinfo +++ b/packages/libp/libphonenumber/libphonenumber.obsinfo @@ -1,4 +1,4 @@ name: libphonenumber -version: 8.13.23 -mtime: 1697005952 -commit: 052011a699cb9492bfc03f4f52620f4ea1b17acf +version: 8.13.30 +mtime: 1707368019 +commit: 9f8d93638ca36763ea7629d256e3f130d67c2577 diff --git a/packages/libp/libphonenumber/libphonenumber.spec b/packages/libp/libphonenumber/libphonenumber.spec index b77569d2bbe..11236de75e2 100644 --- a/packages/libp/libphonenumber/libphonenumber.spec +++ b/packages/libp/libphonenumber/libphonenumber.spec @@ -1,7 +1,7 @@ # # spec file for package libphonenumber # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define lib_ver 8 %define lib_ver2 8.13 Name: libphonenumber -Version: 8.13.23 +Version: 8.13.30 Release: 0 Summary: Library for parsing, formatting, and validating international phone numbers License: Apache-2.0 @@ -28,6 +28,8 @@ URL: https://github.com/google/libphonenumber Source: %{name}-%{version}.tar.xz # PATCH-FIX-DOWNSTREAM (see https://github.com/google/libphonenumber/pull/2874) Patch2: 0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch +Patch3: 0001-Add-support-to-protobuf-3.25.1.patch +Patch4: 0002-Avoid-intermediate-proto-object-library.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libboost_date_time-devel >= 1.40.0