[arch-commits] Commit in libphonenumber/trunk (PKGBUILD absl.diff)

Jan Steffens heftig at gemini.archlinux.org
Fri Apr 1 18:58:26 UTC 2022


    Date: Friday, April 1, 2022 @ 18:58:26
  Author: heftig
Revision: 441184

8.12.46-1

Added:
  libphonenumber/trunk/absl.diff
Modified:
  libphonenumber/trunk/PKGBUILD

-----------+
 PKGBUILD  |   14 ++++++----
 absl.diff |   83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-04-01 18:57:58 UTC (rev 441183)
+++ PKGBUILD	2022-04-01 18:58:26 UTC (rev 441184)
@@ -1,7 +1,7 @@
 # Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
 
 pkgname=libphonenumber
-pkgver=8.12.39
+pkgver=8.12.46
 pkgrel=1
 epoch=1
 pkgdesc="Google's common library for parsing, formatting, and validating international phone numbers"
@@ -8,12 +8,13 @@
 url="https://github.com/googlei18n/libphonenumber"
 arch=(x86_64)
 license=(Apache)
-depends=(icu protobuf boost-libs)
+depends=(icu protobuf boost-libs abseil-cpp)
 makedepends=(boost cmake gtest git)
 options=(debug)
-_commit=b4e9b73792be6c9c5aeb6bc560dd95ab64623d4f  # tags/v8.12.39^0
-source=("git+$url#commit=$_commit")
-sha256sums=('SKIP')
+_commit=3b8e317bc7e7b332f515b10f16b5b096b9771fad  # tags/v8.12.46^0
+source=("git+$url#commit=$_commit" absl.diff)
+sha256sums=('SKIP'
+            'ab519dfe99dba11526a105199a9b090ae3be958d3f179f82eb5a288e358c553c')
 
 pkgver() {
   cd $pkgname
@@ -22,6 +23,9 @@
 
 prepare() {
   cd $pkgname
+
+  # Use our abseil-cpp
+  git apply -3 ../absl.diff
 }
 
 build() {

Added: absl.diff
===================================================================
--- absl.diff	                        (rev 0)
+++ absl.diff	2022-04-01 18:58:26 UTC (rev 441184)
@@ -0,0 +1,83 @@
+diff --git i/cpp/CMakeLists.txt w/cpp/CMakeLists.txt
+index 588b97177..e3231825f 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")
+@@ -477,7 +479,7 @@ endif ()
+ # Safeguarding against any potential link errors as mentioned in
+ # https://github.com/abseil/abseil-cpp/issues/225
+ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+-list (APPEND LIBRARY_DEPS absl::strings)
++list (APPEND LIBRARY_DEPS absl::strings absl::node_hash_set)
+ list (APPEND COMMON_DEPS absl::synchronization)
+ 
+ if (APPLE)
+@@ -570,7 +572,7 @@ if (NOT WIN32)
+   list (APPEND TEST_LIBS pthread)
+ endif ()
+ 
+-target_link_libraries (libphonenumber_test ${TEST_LIBS} absl::node_hash_set)
++target_link_libraries (libphonenumber_test ${TEST_LIBS})
+ 
+ # Unfortunately add_custom_target() can't accept a single command provided as a
+ # list of commands.
+@@ -677,7 +679,7 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
+     geocoding_test_program
+     "test/phonenumbers/geocoding/geocoding_test_program.cc"
+   )
+-  target_link_libraries (geocoding_test_program geocoding phonenumber absl::node_hash_set)
++  target_link_libraries (geocoding_test_program geocoding phonenumber)
+ endif ()
+ 
+ # Build an RPM
+diff --git i/tools/cpp/CMakeLists.txt w/tools/cpp/CMakeLists.txt
+index b09416569..58a9b3ba0 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 (



More information about the arch-commits mailing list