summaryrefslogtreecommitdiff
path: root/dev-libs/libphonenumber
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-06 04:27:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-06 04:27:04 +0100
commitd6106fb0c1ab8f79024ab6a9ac2062ddc85d4e07 (patch)
treef3a4ad4dcf443e9351fa5dec88afeeec86c9b642 /dev-libs/libphonenumber
parentf3f72d0d5f1ae9ee74acaa63ccb7a247468e73bf (diff)
gentoo auto-resync : 06:10:2024 - 04:27:04
Diffstat (limited to 'dev-libs/libphonenumber')
-rw-r--r--dev-libs/libphonenumber/Manifest5
-rw-r--r--dev-libs/libphonenumber/files/libphonenumber-8.13.47-cmake.patch31
-rw-r--r--dev-libs/libphonenumber/files/libphonenumber-8.13.47-protobuf-link-abseil.patch24
-rw-r--r--dev-libs/libphonenumber/files/libphonenumber-8.13.47-werror.patch23
-rw-r--r--dev-libs/libphonenumber/libphonenumber-8.13.47.ebuild60
5 files changed, 143 insertions, 0 deletions
diff --git a/dev-libs/libphonenumber/Manifest b/dev-libs/libphonenumber/Manifest
index 011760c686a1..17d961258ed5 100644
--- a/dev-libs/libphonenumber/Manifest
+++ b/dev-libs/libphonenumber/Manifest
@@ -1,5 +1,10 @@
AUX libphonenumber-8.12.37-cmake.patch 1963 BLAKE2B 4ca131a59bb4a5558b01eb1428cf9be4e8c006c85235800f09689960c7c489a4da52d044eb0b11b40172bc37382545f46872f35571b0f349a9749ce21237da64 SHA512 feb365105ad3aa6437b495e0ea86d8050bed06444adb6ce79628186f3d8a5cc67f496b1a73ee8bee049d12e6e108921d76cdfd2d0d1a9095b4d5bc0acf5d2deb
AUX libphonenumber-8.12.37-testing.patch 3349 BLAKE2B 1c96a9efd1919c04ed86ad63713e89ea8a6a21139faaa0b4cff406f0d168c57b981b0af1aedf54e54ed753cfa1c8ea815e78fde86c578c9151bdb5d98e6b4ad2 SHA512 00ed243396507f1d7448faed83f82009de7be1418b499f560b0961ea9796bfe7285d9c04c43dc5f3cd8baa90314a487e377f4fba571c5b492e065a97056ce375
+AUX libphonenumber-8.13.47-cmake.patch 1158 BLAKE2B 86ac6e27437caf1d3ba9b961e242076348d1edfe2225d444b95075cf14e426ee2dac5db5b28b4542612378b0757c48c1d02382a8ea8d2f9ce237d3e103e0d1e2 SHA512 3c5b5f47db8a9686a455d446594094eb06cbf717a9687ca7b4542727980cf31a4a8a55ddea23522bb45389e790e68807811f09158746e89becccd25deb44bb09
+AUX libphonenumber-8.13.47-protobuf-link-abseil.patch 1090 BLAKE2B 5630942b049fc777f1f9456dffb0d3f14d8938aeac8558dfed58e711dc81956c91890e1757076305f240345d18b5b749b466344b7e818060eac9dca4c789c8e0 SHA512 fd1ec97a487c369cb63b8b644dc23a6e98b71f3f11085286552764f5692393f6a88d700a6bc76c7bca065071b0bb2c1c73eb52a333a37e831983804382734b50
+AUX libphonenumber-8.13.47-werror.patch 470 BLAKE2B e122574deb63110d0b8f06d030a0853c1d39f96d67cd1104181ec8b1dfec76cc1aa41cae4fdab698c622da3fce93454d8fcc168403b1b319a37a89cd582124a9 SHA512 44bce9b9c48271b33fbc8669a65954436632bd528b7433c333f22d331418f39fe5b688710feeac11fce5e5bddbdf9191ca490ac12f11623f06b919b2e3189e18
DIST libphonenumber-8.12.39.tar.gz 11007180 BLAKE2B 27a47b35497772740da04cb9b79e1a6b4fd6f9b0d4a89768e1ba9212672f1a0fd06c5837aa8858a4680b5c47ef16721c6ef145d8d2cd77dccbe27bb4b0897dcf SHA512 82570c60b132022a713c0664de2c29997cff0ab8c3ab97dbec0f8d1cd1782090ba92ca7d2f044760f523c986660f13b70aacf8a9c247a3b80eb19d35227bc2a8
+DIST libphonenumber-8.13.47.tar.gz 12929410 BLAKE2B 97af74d0c4c3f01baaeca370f0ad8d71abbff58edbb7209d5809e43f0171b0c3a997aa0a190131e935326ac72702706221429bf166e0726a44126bda36bb0169 SHA512 0ad3e59e4972bdb7f3e9abce4f1e2bd2924c21d437e734d6bc752cc86660a8a48b3b15ecd662c406e0279ef1112d9bd53b8ab9a9c4e593d3c8b87f9d6d23a5f7
EBUILD libphonenumber-8.12.39.ebuild 1172 BLAKE2B 577342f44537a288b296ca90b50545e039fe115824e91784f290a6afb088c7a42b28b265a447341598d576b7d118a361445e95c5fe6212309a363476de0b3524 SHA512 81d721a186dc2d5ae7bbf12635d86d60475777c8ecd0e58e909fe05c9363bc08441c12a296d1d427ce569ffd9313307bd7dbc67ef4e9cb3883f7715ff8e193e0
+EBUILD libphonenumber-8.13.47.ebuild 1387 BLAKE2B 9c757ad0f1193268af6faa1e084d51ea495a1e5552d91d53d80c2180eac10e11bf233d171ec8a5fe05dfec04a6e88a6d0698491659ff168241ab66fe538e2e09 SHA512 b4c243dfece3dd79cf2a28bd02f313a8ad22a86523472096b75db1d834faef2d8f057ded95cd7b3b7d9d67ab200efcba6a7e0cb8ee65626c96de547aa4296b69
MISC metadata.xml 417 BLAKE2B 95de59ae08b1ea02b4e31e2db29ed6e17040d243c0254ae64eaa0c1a4195244063714ebe9f29e0979a9f6be728eecdf47f8bfac77f674128fc37f52eaf8c8896 SHA512 6fc39161d18efec9984fac508c586a579d93ae12a3cd3d4671630af04d8c86db1b86a5f43ac421fa7c0a4b38f7e333676fc36c8066fe08ebe2a92e56f1acb882
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 000000000000..7212a5b48428
--- /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 <berniyh@exherbo.org>
+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 000000000000..1efe13a0394f
--- /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 000000000000..e1c220167a73
--- /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-8.13.47.ebuild b/dev-libs/libphonenumber/libphonenumber-8.13.47.ebuild
new file mode 100644
index 000000000000..2f57fc019ea3
--- /dev/null
+++ b/dev-libs/libphonenumber/libphonenumber-8.13.47.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+#CMAKE_MAKEFILE_GENERATOR="emake" # broken w/ ninja
+inherit cmake
+
+DESCRIPTION="Library for parsing, formatting, and validating international phone numbers"
+HOMEPAGE="https://github.com/google/libphonenumber"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+CMAKE_USE_DIR="${WORKDIR}"/${P}/cpp
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/icu:=
+ dev-libs/protobuf:=
+ dev-libs/boost:=
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ 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
+)
+
+src_prepare() {
+ # https://github.com/google/libphonenumber/pull/2860#issuecomment-1402766427
+ touch "${CMAKE_USE_DIR}"/src/phonenumbers/test_metadata.h || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_STATIC_LIB=OFF
+ -DBUILD_TESTING=$(usex test)
+ -DREGENERATE_METADATA=OFF # avoid JRE dependency
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ "${BUILD_DIR}"/libphonenumber_test || die
+}