patched to build using system libabseil-cpp [release 8.12.47-2mamba;Thu May 05 2022]

This commit is contained in:
Silvan Calarco 2024-01-06 05:22:30 +01:00
parent 7c5e2fe543
commit 7eb85ea3ea
2 changed files with 87 additions and 4 deletions

View File

@ -0,0 +1,56 @@
diff --git i/cpp/CMakeLists.txt w/cpp/CMakeLists.txt
index 3899006a..8e7458d9 100644
--- i/cpp/CMakeLists.txt
+++ w/cpp/CMakeLists.txt
@@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 3.11)
# Pick the C++ standard to compile with.
# Abseil currently supports C++11, C++14, and C++17.
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project (libphonenumber)
@@ -126,6 +126,8 @@ if (${USE_BOOST} STREQUAL "OFF" AND ${USE_STDMUTEX} STREQUAL "OFF")
find_package (Threads)
endif()
+find_package (absl REQUIRED)
+
find_or_build_gtest ()
if (${USE_RE2} STREQUAL "ON")
diff --git i/tools/cpp/CMakeLists.txt w/tools/cpp/CMakeLists.txt
index b0941656..58a9b3ba 100644
--- i/tools/cpp/CMakeLists.txt
+++ w/tools/cpp/CMakeLists.txt
@@ -26,29 +26,6 @@ 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_or_build_gtest ()
set (

View File

@ -1,5 +1,5 @@
Name: libphonenumber Name: libphonenumber
Version: 8.12.39 Version: 8.12.47
Release: 2mamba Release: 2mamba
Summary: Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers Summary: Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers
Group: System/Libraries Group: System/Libraries
@ -8,16 +8,18 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/google/libphonenumber URL: https://github.com/google/libphonenumber
Source: https://github.com/google/libphonenumber.git/v%{version}/libphonenumber-%{version}.tar.bz2 Source: https://github.com/google/libphonenumber.git/v%{version}/libphonenumber-%{version}.tar.bz2
Patch0: libphonenumber-8.12.47-system-abseil-cpp.patch
License: Apache License 2.0 License: Apache License 2.0
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libabseil-cpp-devel
BuildRequires: libboost-devel BuildRequires: libboost-devel
BuildRequires: libgcc BuildRequires: libgcc
BuildRequires: libicu-devel BuildRequires: libicu-devel
BuildRequires: libprotobuf-devel BuildRequires: libprotobuf-devel
BuildRequires: libstdc++6-devel BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libprotobuf-devel >= 3.19.4 BuildRequires: libprotobuf-devel >= 3.17.0
%description %description
Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers. Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
@ -34,6 +36,7 @@ This package contains libraries and header files for developing applications tha
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .system-abseil-cpp
%build %build
%cmake -d build \ %cmake -d build \
@ -69,8 +72,32 @@ This package contains libraries and header files for developing applications tha
%doc README.md %doc README.md
%changelog %changelog
* Sun Feb 06 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 8.12.39-2mamba * Thu May 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 8.12.47-2mamba
- rbuilt with libprotobuf 3.19.4 - patched to build using system libabseil-cpp
* Sun Apr 24 2022 Automatic Build System <autodist@mambasoft.it> 8.12.47-1mamba
- automatic version update by autodist
* Sat Apr 02 2022 Automatic Build System <autodist@mambasoft.it> 8.12.46-1mamba
- automatic version update by autodist
* Thu Mar 24 2022 Automatic Build System <autodist@mambasoft.it> 8.12.45-1mamba
- automatic version update by autodist
* Sat Feb 26 2022 Automatic Build System <autodist@mambasoft.it> 8.12.44-1mamba
- automatic version update by autodist
* Thu Feb 17 2022 Automatic Build System <autodist@mambasoft.it> 8.12.43-1mamba
- automatic version update by autodist
* Mon Jan 31 2022 Automatic Build System <autodist@mambasoft.it> 8.12.42-1mamba
- automatic version update by autodist
* Thu Jan 13 2022 Automatic Build System <autodist@mambasoft.it> 8.12.41-1mamba
- automatic version update by autodist
* Tue Dec 28 2021 Automatic Build System <autodist@mambasoft.it> 8.12.40-1mamba
- automatic version update by autodist
* Wed Dec 08 2021 Automatic Build System <autodist@mambasoft.it> 8.12.39-1mamba * Wed Dec 08 2021 Automatic Build System <autodist@mambasoft.it> 8.12.39-1mamba
- automatic version update by autodist - automatic version update by autodist