diff --git a/0001-Build-with-C-17.patch b/0001-Build-with-C-17.patch new file mode 100644 index 0000000..8db7984 --- /dev/null +++ b/0001-Build-with-C-17.patch @@ -0,0 +1,29 @@ +From 027de3b5d44f6291bd4785ec7530661ac98cbf53 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Wed, 14 Jun 2023 09:06:02 +0200 +Subject: [PATCH] Build with C++17 + +Recent abseil requires C++14 and TW builds it with C++17, so just use 17 +directly. +--- + cpp/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index cdd7a08..bc331aa 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -19,8 +19,8 @@ cmake_minimum_required (VERSION 3.11) + project (libphonenumber VERSION 8.13.0) + + # Pick the C++ standard to compile with. +-# Abseil currently supports C++11, C++14, and C++17. +-set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard used to compile this project") ++# Abseil currently supports C++14, and C++17. ++set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard used to compile this project") + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) + +-- +2.41.0 + diff --git a/0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch b/0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch new file mode 100644 index 0000000..d5476a9 --- /dev/null +++ b/0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch @@ -0,0 +1,27 @@ +From f5684c3a2c220fde377c277dbe7784afbc0013cb Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Wed, 14 Jun 2023 09:35:29 +0200 +Subject: [PATCH] Revert "Fix typo in arguments to add_metadata_gen_target() + (#2874)" + +This reverts commit 0ecc3d9af734d96d5b01cdf52f0ecdf848a33d68. +--- + cpp/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index bc331aa..5b7d2b2 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -394,7 +394,7 @@ add_metadata_gen_target ( + ${TEST_METADATA_TARGET} + "${RESOURCES_DIR}/PhoneNumberMetadataForTesting.xml" + "test_metadata" +- "test_metadata" ++ "metadata" + ) + list (APPEND TESTING_LIBRARY_SOURCES "src/phonenumbers/test_metadata.cc") + +-- +2.41.0 + diff --git a/_service b/_service index 6a37a7b..fd2cb20 100644 --- a/_service +++ b/_service @@ -2,7 +2,7 @@ https://github.com/google/libphonenumber.git git - v8.12.23 + v8.13.15 @PARENT_TAG@ v(.*) diff --git a/libphonenumber-8.12.23.obscpio b/libphonenumber-8.12.23.obscpio deleted file mode 100644 index bcd2f96..0000000 --- a/libphonenumber-8.12.23.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dee5e087536b1cf0a707e02f1014f908ce6d893f89ccfe8a4bab843831e9e7e4 -size 22786573 diff --git a/libphonenumber-8.13.15.obscpio b/libphonenumber-8.13.15.obscpio new file mode 100644 index 0000000..a3ca304 --- /dev/null +++ b/libphonenumber-8.13.15.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8b06009e54ff4d6cd9ae892f278c11817b6d426ea54fe69f7a23252a2b020ca +size 90171406 diff --git a/libphonenumber.changes b/libphonenumber.changes index 7d38213..dff5723 100644 --- a/libphonenumber.changes +++ b/libphonenumber.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Mon Jun 26 09:00:14 UTC 2023 - Fabian Vogt + +- absl is also needed for using the -devel package + +------------------------------------------------------------------- +Fri Jun 23 06:14:07 UTC 2023 - Fabian Vogt + +- Update to version 8.13.15: + * Updated phone metadata for region code(s): BE, BF, IL, MN, NE, OM, SO, SV + * Updated carrier data for country calling code(s): + 226 (en), 227 (en), 252 (en), 351 (en), 968 (en), 972 (en) + +------------------------------------------------------------------- +Wed Jun 14 06:51:08 UTC 2023 - Fabian Vogt + +- Update to version 8.13.14: + * Many data changes + * Removal of unused leading_zero_possible proto field in + phonemetadata.proto and all generated code + * https://github.com/google/libphonenumber/blob/v8.13.14/release_notes.txt +- Depends on abseil now +- Turn metadata regeneration off explicitly, wasn't done previously + either. This allows dropping the java dependency. +- Add patches to fix building: + * 0001-Build-with-C-17.patch + * 0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch +- protobuf got fixed, builds fine with 22 now + +------------------------------------------------------------------- +Tue Jun 13 16:03:57 UTC 2023 - Dirk Müller + +- prefer protobuf 21 as it is not compatible with v22 + ------------------------------------------------------------------- Thu May 20 16:16:04 UTC 2021 - Andreas Stieger diff --git a/libphonenumber.obsinfo b/libphonenumber.obsinfo index f09f583..2d60fc9 100644 --- a/libphonenumber.obsinfo +++ b/libphonenumber.obsinfo @@ -1,5 +1,4 @@ name: libphonenumber -version: 8.12.23 -mtime: 1620724866 -commit: 8767b3e904f2864c1874f3b8e39eeb8bca7d7238 - +version: 8.13.15 +mtime: 1687328489 +commit: d3e97dd640066087e534ea1a1a41137c797b040e diff --git a/libphonenumber.spec b/libphonenumber.spec index eb9cd4c..1e76114 100644 --- a/libphonenumber.spec +++ b/libphonenumber.spec @@ -1,7 +1,7 @@ # # spec file for package libphonenumber # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,21 +17,26 @@ Name: libphonenumber -Version: 8.12.23 +Version: 8.13.15 Release: 0 %define lib_ver 8 -%define lib_ver2 8.12 +%define lib_ver2 8.13 Summary: Library for parsing, formatting, and validating international phone numbers License: Apache-2.0 Group: Development/Libraries/C and C++ URL: https://github.com/google/libphonenumber Source: %{name}-%{version}.tar.xz +# PATCH-FIX-DOWNSTREAM (for using system abseil) +Patch1: 0001-Build-with-C-17.patch +# PATCH-FIX-DOWNSTREAM (see https://github.com/google/libphonenumber/pull/2874) +Patch2: 0001-Revert-Fix-typo-in-arguments-to-add_metadata_gen_tar.patch BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: java BuildRequires: libboost_date_time-devel BuildRequires: libboost_system-devel BuildRequires: libboost_thread-devel +# Actual version requirement unknown +BuildRequires: cmake(absl) BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(icu-i18n) >= 4.4 BuildRequires: pkgconfig(icu-uc) >= 4.4 @@ -55,6 +60,7 @@ for running on smartphones, and is used by the Android framework since 4.0 Summary: Library for parsing, formatting, and validating international phone numbers Group: Development/Libraries/C and C++ Requires: %{name}%{lib_ver} = %{version} +Requires: cmake(absl) Requires: pkgconfig(protobuf) >= 2.4 %description devel @@ -74,7 +80,7 @@ that use libphonenumber. cd cpp # Enabling the geocoder breaks quite a lot due to broken cmakelists # (https://github.com/google/libphonenumber/pull/2556) -%cmake -DBUILD_STATIC_LIB=OFF -DBUILD_SHARED_LIB=ON -DBUILD_TESTING=ON -DBUILD_GEOCODER=OFF +%cmake -DBUILD_STATIC_LIB=OFF -DBUILD_SHARED_LIB=ON -DBUILD_TESTING=ON -DBUILD_GEOCODER=OFF -DREGENERATE_METADATA=OFF %make_jobs %install @@ -96,5 +102,7 @@ cd cpp/build %files devel %{_libdir}/libphonenumber.so %{_includedir}/phonenumbers/ +%dir %{_libdir}/cmake/ +%{_libdir}/cmake/libphonenumber/ %changelog