[packages/libphonenumber] - added no-fetch patch to use system abseil-cpp; release 2
qboosh
qboosh at pld-linux.org
Tue Feb 8 21:29:27 CET 2022
commit 4ded0a6922902c48ab0c5700880c8dea97e2ac20
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 8 21:30:59 2022 +0100
- added no-fetch patch to use system abseil-cpp; release 2
libphonenumber-no-fetch.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
libphonenumber.spec | 5 ++++-
2 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/libphonenumber.spec b/libphonenumber.spec
index 50d602d..f63350b 100644
--- a/libphonenumber.spec
+++ b/libphonenumber.spec
@@ -8,14 +8,16 @@ 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.42
-Release: 1
+Release: 2
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: 8b071ea1d220018aa731d79794a00249
Patch0: %{name}-link.patch
+Patch1: %{name}-no-fetch.patch
URL: https://github.com/google/libphonenumber/
+BuildRequires: abseil-cpp-devel
BuildRequires: boost-devel >= 1.40.0
BuildRequires: cmake >= 2.8.5
BuildRequires: gtest-devel
@@ -67,6 +69,7 @@ Statyczne biblioteki libphonenumber.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
install -d build/cpp
diff --git a/libphonenumber-no-fetch.patch b/libphonenumber-no-fetch.patch
new file mode 100644
index 0000000..044ec45
--- /dev/null
+++ b/libphonenumber-no-fetch.patch
@@ -0,0 +1,43 @@
+--- libphonenumber-8.12.42/tools/cpp/CMakeLists.txt.orig 2022-01-27 15:51:40.000000000 +0100
++++ libphonenumber-8.12.42/tools/cpp/CMakeLists.txt 2022-02-08 20:53:10.523844007 +0100
+@@ -26,29 +26,11 @@ project (generate_geocoding_data)
+ # Helper functions dealing with finding libraries and programs this library
+ # depends on.
+ include (gtest.cmake)
+-include (FetchContent)
+-
+-# Downloading the abseil sources.
+-FetchContent_Declare(
+- abseil-cpp
+- GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
+- GIT_TAG origin/master
+-)
+-
+-# 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})
++find_package(absl REQUIRED COMPONENTS btree strings)
+
+ find_or_build_gtest ()
+ set (
+--- libphonenumber-8.12.42/cpp/CMakeLists.txt.orig 2022-02-08 21:04:15.984964451 +0100
++++ libphonenumber-8.12.42/cpp/CMakeLists.txt 2022-02-08 21:08:15.033998716 +0100
+@@ -474,6 +474,7 @@ if (${USE_POSIX_THREAD} STREQUAL "ON" OR
+ endif()
+ endif ()
+
++find_package(absl REQUIRED COMPONENTS strings synchronization)
+ # Safeguarding against any potential link errors as mentioned in
+ # https://github.com/abseil/abseil-cpp/issues/225
+ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libphonenumber.git/commitdiff/4ded0a6922902c48ab0c5700880c8dea97e2ac20
More information about the pld-cvs-commit
mailing list