[packages/libphonenumber] - updated to 8.13.8
qboosh
qboosh at pld-linux.org
Thu Apr 6 18:01:57 CEST 2023
commit 570e0eb5f27abaad2b527ffe94ffd40624fd7123
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Apr 6 18:04:28 2023 +0200
- updated to 8.13.8
libphonenumber-link.patch | 20 +++++++--------
libphonenumber-no-fetch.patch | 58 ++++++++-----------------------------------
libphonenumber.spec | 5 ++--
no-static.patch | 46 ++++++++++------------------------
4 files changed, 37 insertions(+), 92 deletions(-)
---
diff --git a/libphonenumber.spec b/libphonenumber.spec
index 5f834cc..619456d 100644
--- a/libphonenumber.spec
+++ b/libphonenumber.spec
@@ -7,13 +7,13 @@
Summary: Library to handle international phone numbers
Summary(pl.UTF-8): Biblioteka do obsługi międzynarodowych numerów telefonów
Name: libphonenumber
-Version: 8.12.57
+Version: 8.13.8
Release: 1
License: Apache v2.0 with BSD parts
Group: Libraries
#Source0Download: https://github.com/google/libphonenumber/releases/
Source0: https://github.com/google/libphonenumber/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: f3c5edeb499057960cef5667728fe764
+# Source0-md5: 51d98312d1ea9287b9a008223314157d
Patch0: %{name}-link.patch
Patch1: %{name}-no-fetch.patch
Patch2: no-static.patch
@@ -108,6 +108,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libgeocoding.so
%attr(755,root,root) %{_libdir}/libphonenumber.so
%{_includedir}/phonenumbers
+%{_libdir}/cmake/libphonenumber
%if %{with static_libs}
%files static
diff --git a/libphonenumber-link.patch b/libphonenumber-link.patch
index 241ee8f..88f9de1 100644
--- a/libphonenumber-link.patch
+++ b/libphonenumber-link.patch
@@ -1,11 +1,11 @@
---- libphonenumber-8.12.2/cpp/CMakeLists.txt.orig 2020-04-22 12:05:08.000000000 +0200
-+++ libphonenumber-8.12.2/cpp/CMakeLists.txt 2020-04-29 06:39:39.838900132 +0200
-@@ -442,7 +442,7 @@
- # Note that the subset of base/ on which the geocoder relies is implemented
- # on top of Boost header-only libraries (e.g. scoped_ptr.hpp).
- target_link_libraries (geocoding ${LIBRARY_DEPS})
-- target_link_libraries (geocoding-shared ${LIBRARY_DEPS})
-+ target_link_libraries (geocoding-shared phonenumber-shared ${LIBRARY_DEPS})
- endif ()
+--- libphonenumber-8.13.8/cpp/CMakeLists.txt.orig 2020-04-22 12:05:08.000000000 +0200
++++ libphonenumber-8.13.8/cpp/CMakeLists.txt 2020-04-29 06:39:39.838900132 +0200
+@@ -499,7 +499,7 @@ if (BUILD_SHARED_LIBS)
- # Build a specific library for testing purposes.
+ if (BUILD_GEOCODER)
+ add_library (geocoding-shared SHARED ${GEOCODING_SOURCES})
+- target_link_libraries (geocoding-shared ${LIBRARY_DEPS})
++ target_link_libraries (geocoding-shared phonenumber-shared ${LIBRARY_DEPS})
+ target_include_directories(geocoding-shared PUBLIC $<INSTALL_INTERFACE:include>)
+ add_dependencies (geocoding-shared generate_geocoding_data)
+ add_dependencies (phonenumber-shared generate_geocoding_data)
diff --git a/libphonenumber-no-fetch.patch b/libphonenumber-no-fetch.patch
index 6e7a2c9..7e4d36b 100644
--- a/libphonenumber-no-fetch.patch
+++ b/libphonenumber-no-fetch.patch
@@ -1,25 +1,23 @@
---- libphonenumber-8.12.57/cpp/CMakeLists.txt.orig 2023-02-26 10:49:15.997683242 +0100
-+++ libphonenumber-8.12.57/cpp/CMakeLists.txt 2023-02-26 17:16:58.674991835 +0100
-@@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 3.11)
+--- libphonenumber-8.13.8/cpp/CMakeLists.txt.orig 2023-02-26 10:49:15.997683242 +0100
++++ libphonenumber-8.13.8/cpp/CMakeLists.txt 2023-02-26 17:16:58.674991835 +0100
+@@ -20,7 +20,7 @@ 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")
+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)
- project (libphonenumber)
-@@ -202,9 +202,8 @@ add_custom_command (
- DEPENDS ${PROTOBUF_SOURCES}
- )
+@@ -106,7 +106,7 @@ if (USE_ALTERNATE_FORMATS)
+ endif ()
+ # Find all the required libraries and programs.
+-find_package(absl)
+find_package(absl REQUIRED COMPONENTS node_hash_set strings synchronization)
- if (${BUILD_GEOCODER} STREQUAL "ON")
-- find_package(absl)
--
- # Geocoding data cpp file generation
- set (TOOLS_DIR "${CMAKE_CURRENT_BINARY_DIR}/tools")
- add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../tools/cpp" "${TOOLS_DIR}")
+
+ if(NOT absl_FOUND)
+ # Overide abseil install rules for subprojects
--- libphonenumber-8.12.57/tools/cpp/CMakeLists.txt.orig 2023-02-26 10:49:16.001016558 +0100
+++ libphonenumber-8.12.57/tools/cpp/CMakeLists.txt 2023-02-26 17:39:18.954397584 +0100
@@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 3.11)
@@ -31,37 +29,3 @@
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project (generate_geocoding_data)
-@@ -26,32 +26,8 @@ project (generate_geocoding_data)
- # Helper functions dealing with finding libraries and programs this library
- # depends on.
- include (gtest.cmake)
--include (FetchContent)
-
--if(NOT absl_FOUND)
-- # Downloading the abseil sources at particular version to not catch up
-- # with its new build requirements like min C++14 is mandated in that lib.
-- FetchContent_Declare(
-- abseil-cpp
-- GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
-- GIT_TAG 273292d
-- )
--
-- # Building the abseil binaries
-- FetchContent_GetProperties(abseil-cpp)
-- if (NOT abseil-cpp_POPULATED)
-- FetchContent_Populate(abseil-cpp)
-- endif ()
--
-- if (NOT abseil-cpp_POPULATED)
-- message (FATAL_ERROR "Could not build abseil-cpp binaries.")
-- endif ()
--
-- # Safeguarding against any potential link errors as mentioned in
-- # https://github.com/abseil/abseil-cpp/issues/225
-- set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
-- add_subdirectory(${abseil-cpp_SOURCE_DIR} ${abseil-cpp_BINARY_DIR})
--endif()
-+find_package(absl REQUIRED COMPONENTS strings btree node_hash_set)
-
- find_or_build_gtest ()
- set (
diff --git a/no-static.patch b/no-static.patch
index 078a1c0..6c995db 100644
--- a/no-static.patch
+++ b/no-static.patch
@@ -1,34 +1,14 @@
---- libphonenumber-8.12.51/cpp/CMakeLists.txt.orig 2023-01-06 01:42:02.871437832 +0100
-+++ libphonenumber-8.12.51/cpp/CMakeLists.txt 2023-01-06 01:49:02.681479463 +0100
-@@ -498,7 +498,9 @@
- list (APPEND GEOCODER_DEPS ${COMMON_DEPS})
- # Note that the subset of base/ on which the geocoder relies is implemented
- # on top of Boost header-only libraries (e.g. scoped_ptr.hpp).
-+ if (${BUILD_STATIC_LIB} STREQUAL "ON")
- target_link_libraries (geocoding ${LIBRARY_DEPS})
-+ endif()
- target_link_libraries (geocoding-shared phonenumber-shared ${LIBRARY_DEPS})
- endif ()
+--- libphonenumber-8.13.8/cpp/CMakeLists.txt.orig 2023-01-06 01:42:02.871437832 +0100
++++ libphonenumber-8.13.8/cpp/CMakeLists.txt 2023-01-06 01:49:02.681479463 +0100
+@@ -599,7 +599,11 @@ if(BUILD_TESTING)
+ # libraries are built properly.
+ if (BUILD_GEOCODER)
+ add_executable (geocoding_test_program "test/phonenumbers/geocoding/geocoding_test_program.cc")
++ if (${BUILD_STATIC_LIB} STREQUAL "ON")
+ target_link_libraries (geocoding_test_program geocoding phonenumber)
++ else ()
++ target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared)
++ endif ()
+ endif ()
+ endif()
-@@ -665,7 +667,9 @@
- endif ()
-
- if (${BUILD_GEOCODER} STREQUAL "ON")
-+ if (${BUILD_STATIC_LIB} STREQUAL "ON")
- install (TARGETS geocoding LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
-+ endif()
- install (TARGETS geocoding-shared LIBRARY DESTINATION ${LIBDIR} ARCHIVE
- DESTINATION ${LIBDIR})
- endif ()
-@@ -677,7 +681,11 @@
- geocoding_test_program
- "test/phonenumbers/geocoding/geocoding_test_program.cc"
- )
-+ if (${BUILD_STATIC_LIB} STREQUAL "ON")
- target_link_libraries (geocoding_test_program geocoding phonenumber)
-+ else ()
-+ target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared)
-+ endif ()
- endif ()
-
- # Build an RPM
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libphonenumber.git/commitdiff/570e0eb5f27abaad2b527ffe94ffd40624fd7123
More information about the pld-cvs-commit
mailing list