diff --git a/rpm/0003-cmake-absl.patch b/rpm/0003-cmake-absl.patch new file mode 100644 index 0000000..2fd4d97 --- /dev/null +++ b/rpm/0003-cmake-absl.patch @@ -0,0 +1,14 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index b3ecc4f..7864618 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -203,7 +203,8 @@ add_custom_command ( + ) + + if (${BUILD_GEOCODER} STREQUAL "ON") +- find_package(absl) ++ # Use "CONFIG" as there is no built-in cmake module for absl. ++ find_package(absl CONFIG REQUIRED) + + # Geocoding data cpp file generation + set (TOOLS_DIR "${CMAKE_CURRENT_BINARY_DIR}/tools") diff --git a/rpm/0004-Update-absl-dependencies-in-CMakeLists.txt b/rpm/0004-Update-absl-dependencies-in-CMakeLists.txt new file mode 100644 index 0000000..3329f80 --- /dev/null +++ b/rpm/0004-Update-absl-dependencies-in-CMakeLists.txt @@ -0,0 +1,13 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index b3ecc4f..a35c680 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -479,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::node_hash_set absl::strings absl::synchronization) ++list (APPEND LIBRARY_DEPS absl::node_hash_set absl::strings absl::synchronization absl::log_internal_message absl::log_internal_check_op) + + if (APPLE) + list (APPEND COMMON_DEPS ${COREFOUNDATION_LIB} ${FOUNDATION_LIB}) diff --git a/rpm/libphonenumber.spec b/rpm/libphonenumber.spec index 2448c4e..283ad62 100644 --- a/rpm/libphonenumber.spec +++ b/rpm/libphonenumber.spec @@ -9,6 +9,10 @@ Source0: %{name}-%{version}.tar.gz # https://github.com/google/libphonenumber/pull/2556 Patch1: 0001-Fix-geocoding-build-when-static-libraries-are-off.patch Patch2: 0002-Ensure-build-reproducibility.patch +# "Backport" of https://github.com/google/libphonenumber/pull/3213 +Patch3: 0003-cmake-absl.patch +# "Backport" of https://github.com/google/libphonenumber/pull/3215 +Patch4: 0004-Update-absl-dependencies-in-CMakeLists.txt BuildRequires: gcc-c++ BuildRequires: cmake