From e274217d7f014a5265467c24b05dfbd25c2c7188 Mon Sep 17 00:00:00 2001 From: Gerben Jan Dijkman Date: Wed, 4 Nov 2026 23:15:04 +0100 Subject: [PATCH] Added patches back --- .../libphonenumber-8.13.47-boost-1.89.patch | 21 +++++++++++++ .../files/libphonenumber-8.13.47-cmake.patch | 31 +++++++++++++++++++ ...enumber-8.13.47-protobuf-link-abseil.patch | 24 ++++++++++++++ .../files/libphonenumber-8.13.47-werror.patch | 23 ++++++++++++++ .../libphonenumber-9.0.43.ebuild | 12 +++++++ 5 files changed, 111 insertions(+) create mode 100644 dev-libs/libphonenumber/files/libphonenumber-8.13.47-boost-1.89.patch create mode 100644 dev-libs/libphonenumber/files/libphonenumber-8.13.47-cmake.patch create mode 100644 dev-libs/libphonenumber/files/libphonenumber-8.13.47-protobuf-link-abseil.patch create mode 100644 dev-libs/libphonenumber/files/libphonenumber-8.13.47-werror.patch diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.13.47-boost-1.89.patch b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-boost-1.89.patch new file mode 100644 index 0000000..df3b4df --- /dev/null +++ b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-boost-1.89.patch @@ -0,0 +1,21 @@ +See also: https://github.com/google/libphonenumber/pull/3903 + +Not making it optional though, just raising the minimum instead. + +--- + cpp/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 27e4680ccc..39f05d2c9a 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -145,7 +145,7 @@ if (USE_BOOST) + if (WIN32) + set (Boost_USE_STATIC_LIBS ON) + endif () +- find_package (Boost 1.40.0 COMPONENTS date_time system thread) ++ find_package (Boost 1.69.0 COMPONENTS date_time thread) + if (NOT Boost_FOUND) + print_error ("Boost Date_Time/System/Thread" "Boost") + endif () diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.13.47-cmake.patch b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-cmake.patch new file mode 100644 index 0000000..7212a5b --- /dev/null +++ b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-cmake.patch @@ -0,0 +1,31 @@ +https://gitlab.exherbo.org/exherbo/kde/-/blob/master/packages/dev-libs/libphonenumber/files/Link-the-test-program-to-the-shared-lib-to-allow-bui.patch?ref_type=heads +https://github.com/google/libphonenumber/pull/2556 (previous version) + +Upstream: no +Reason: fails to link with -DBUILD_STATIC_LIB=OFF + +From 0b50dcf8299e3c18cdc158f40aa97cdb0318b08e Mon Sep 17 00:00:00 2001 +From: Bernd Steinhauser +Date: Tue, 10 Jan 2023 09:14:44 +0100 +Subject: [PATCH] Link the test program to the shared lib to allow building + without static libs + +--- + cpp/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index d2d111d5..932b5e63 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -599,7 +599,7 @@ if(BUILD_TESTING) + # libraries are built properly. + if (BUILD_GEOCODER) + add_executable (geocoding_test_program "test/phonenumbers/geocoding/geocoding_test_program.cc") +- target_link_libraries (geocoding_test_program geocoding phonenumber) ++ target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared) + endif () + endif() + +-- +2.39.0 diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.13.47-protobuf-link-abseil.patch b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-protobuf-link-abseil.patch new file mode 100644 index 0000000..1efe13a --- /dev/null +++ b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-protobuf-link-abseil.patch @@ -0,0 +1,24 @@ +https://gitlab.exherbo.org/exherbo/kde/-/raw/master/packages/dev-libs/libphonenumber/files/libphonenumber-Update-CMakeLists.txt.patch + +Upstream: under review (approved), https://github.com/google/libphonenumber/pull/3215 +Reason: Fix build with recent protobuf + +From d420534a727c43fa251a1e09b77ed4cd6b615395 Mon Sep 17 00:00:00 2001 +From: katbohm <96047875+katbohm@users.noreply.github.com> +Date: Mon, 18 Sep 2023 12:25:11 +0200 +Subject: [PATCH] Update CMakeLists.txt + +Temporary fix for b/283987730 (failing build due to new protobuf having absl dependencies). +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -433,7 +433,7 @@ include_directories ("src") + # Collate dependencies + #---------------------------------------------------------------- + +-set (LIBRARY_DEPS ${ICU_LIB} ${PROTOBUF_LIB} absl::node_hash_set absl::strings absl::synchronization) ++set (LIBRARY_DEPS ${ICU_LIB} ${PROTOBUF_LIB} absl::node_hash_set absl::strings absl::synchronization absl::log_internal_message absl::log_internal_check_op) + + if (USE_BOOST) + list (APPEND LIBRARY_DEPS ${Boost_LIBRARIES}) +-- +2.42.0 diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.13.47-werror.patch b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-werror.patch new file mode 100644 index 0000000..e1c2201 --- /dev/null +++ b/dev-libs/libphonenumber/files/libphonenumber-8.13.47-werror.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/889910 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -418,7 +418,7 @@ if (USE_ICU_REGEXP) + endif () + + if (NOT WIN32) +- add_definitions ("-Wall -Werror") ++ add_definitions ("-Wall") + endif () + + include_directories ("src") +--- a/tools/cpp/CMakeLists.txt ++++ b/tools/cpp/CMakeLists.txt +@@ -25,7 +25,7 @@ set ( + ) + + if (NOT WIN32) +- add_definitions ("-Wall -Werror") ++ add_definitions ("-Wall") + endif () + + include_directories ("src") diff --git a/dev-libs/libphonenumber/libphonenumber-9.0.43.ebuild b/dev-libs/libphonenumber/libphonenumber-9.0.43.ebuild index 4157125..c295689 100644 --- a/dev-libs/libphonenumber/libphonenumber-9.0.43.ebuild +++ b/dev-libs/libphonenumber/libphonenumber-9.0.43.ebuild @@ -29,6 +29,18 @@ BDEPEND=" test? ( dev-cpp/gtest ) " +PATCHES=( + # it is either this, or disable BUILD_GEOCODER + # https://github.com/google/libphonenumber/pull/2556 + "${FILESDIR}"/${PN}-8.13.47-cmake.patch + # bug #923946 + "${FILESDIR}"/${PN}-8.13.47-protobuf-link-abseil.patch + # bug #889910 + "${FILESDIR}"/${PN}-8.13.47-werror.patch + # bug 963681 + "${FILESDIR}"/${PN}-8.13.47-boost-1.89.patch +) + src_prepare() { # https://github.com/google/libphonenumber/pull/2860#issuecomment-1402766427 # touch "${CMAKE_USE_DIR}"/src/phonenumbers/test_metadata.h || die