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..01055ae 100644 --- a/_service +++ b/_service @@ -2,7 +2,7 @@ https://github.com/google/libphonenumber.git git - v8.12.23 + v8.13.14 @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.14.obscpio b/libphonenumber-8.13.14.obscpio new file mode 100644 index 0000000..2dbf1b2 --- /dev/null +++ b/libphonenumber-8.13.14.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d689259be77afea39d97951bb59199926f5b4a086079f7c68dab7d06adb87fd +size 90168846 diff --git a/libphonenumber.changes b/libphonenumber.changes index 48eeab1..edc001a 100644 --- a/libphonenumber.changes +++ b/libphonenumber.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +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 diff --git a/libphonenumber.obsinfo b/libphonenumber.obsinfo index f09f583..525ef33 100644 --- a/libphonenumber.obsinfo +++ b/libphonenumber.obsinfo @@ -1,5 +1,4 @@ name: libphonenumber -version: 8.12.23 -mtime: 1620724866 -commit: 8767b3e904f2864c1874f3b8e39eeb8bca7d7238 - +version: 8.13.14 +mtime: 1686216784 +commit: 17b157870a5382eb314f5b436383e89cc21558c4 diff --git a/libphonenumber.spec b/libphonenumber.spec index 9a4b94b..abe3c09 100644 --- a/libphonenumber.spec +++ b/libphonenumber.spec @@ -17,26 +17,30 @@ Name: libphonenumber -Version: 8.12.23 +Version: 8.13.14 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 -# not compatible with v22 due to https://protobuf.dev/news/2022-08-03/#cpp-changes -BuildRequires: (pkgconfig(protobuf) >= 2.4 with pkgconfig(protobuf) < 22) +BuildRequires: pkgconfig(protobuf) >= 2.4 %description Google's common Java, C++ and JavaScript library for parsing, formatting, @@ -56,7 +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: (pkgconfig(protobuf) >= 2.4 with pkgconfig(protobuf) < 22) +Requires: pkgconfig(protobuf) >= 2.4 %description devel Google's common Java, C++ and JavaScript library for parsing, formatting, @@ -75,7 +79,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 @@ -97,5 +101,7 @@ cd cpp/build %files devel %{_libdir}/libphonenumber.so %{_includedir}/phonenumbers/ +%dir %{_libdir}/cmake/ +%{_libdir}/cmake/libphonenumber/ %changelog