public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libphonenumber/, dev-libs/libphonenumber/files/
@ 2021-11-15 18:59 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2021-11-15 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     cbe057935ddf919ac17693a46234d7c8673dc7e4
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 15 18:00:26 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Nov 15 18:58:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbe05793

dev-libs/libphonenumber: New package at version 8.12.37

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-libs/libphonenumber/Manifest                   |  1 +
 .../files/libphonenumber-8.12.37-cmake.patch       | 54 ++++++++++++++++++
 .../files/libphonenumber-8.12.37-testing.patch     | 66 ++++++++++++++++++++++
 .../libphonenumber/libphonenumber-8.12.37.ebuild   | 48 ++++++++++++++++
 dev-libs/libphonenumber/metadata.xml               | 12 ++++
 5 files changed, 181 insertions(+)

diff --git a/dev-libs/libphonenumber/Manifest b/dev-libs/libphonenumber/Manifest
new file mode 100644
index 000000000000..151f74f75bdc
--- /dev/null
+++ b/dev-libs/libphonenumber/Manifest
@@ -0,0 +1 @@
+DIST libphonenumber-8.12.37.tar.gz 11005274 BLAKE2B 2bcffe898ca7aa667a35e9a7340a54f880cdb9f290e807e9ff7f6ee778df83dd80023703595781a97355a43a8096bdc957a7f79336b5bf9d892ada26e35ae025 SHA512 420ea841679c1ff420289b3fea0bb6d86d4d1e99525fce00cc90025c8ade99e56e2dcbb7fca64190437ff0a889cdc7373f182e7699db20a072c32e984b8dff33

diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch
new file mode 100644
index 000000000000..8e797a867032
--- /dev/null
+++ b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch
@@ -0,0 +1,54 @@
+Upstream: no, I probably should, although this patch isn't nice, but
+          neither is their cmake code
+
+From a0c72f32b3c318f66975400af81b9b44d8a8d9c7 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Wed, 27 Mar 2019 21:07:22 +0100
+Subject: [PATCH] Fix build with BUILD_STATIC_LIB=ON
+
+---
+ CMakeLists.txt | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 38ce1f50..dd9399be 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -441,7 +441,9 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
+   list (APPEND GEOCODER_DEPS ${COMMON_DEPS})
+   # Note that the subset of base/ on which the geocoder relies is implemented
+   # on top of Boost header-only libraries (e.g. scoped_ptr.hpp).
+-  target_link_libraries (geocoding ${LIBRARY_DEPS})
++  if (${BUILD_STATIC_LIB} STREQUAL "ON")
++    target_link_libraries (geocoding ${LIBRARY_DEPS})
++  endif()
+   target_link_libraries (geocoding-shared ${LIBRARY_DEPS})
+ endif ()
+ 
+@@ -599,7 +601,9 @@ if (BUILD_SHARED_LIB)
+ endif ()
+ 
+ if (${BUILD_GEOCODER} STREQUAL "ON")
+-  install (TARGETS geocoding LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
++  if (${BUILD_STATIC_LIB} STREQUAL "ON")
++    install (TARGETS geocoding LIBRARY DESTINATION ${LIBDIR} ARCHIVE DESTINATION ${LIBDIR})
++  endif()
+   install (TARGETS geocoding-shared LIBRARY DESTINATION ${LIBDIR} ARCHIVE
+            DESTINATION ${LIBDIR})
+ endif ()
+@@ -611,7 +615,11 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
+     geocoding_test_program
+     "test/phonenumbers/geocoding/geocoding_test_program.cc"
+   )
+-  target_link_libraries (geocoding_test_program geocoding phonenumber)
++  if (${BUILD_STATIC_LIB} STREQUAL "ON")
++    target_link_libraries (geocoding_test_program geocoding phonenumber)
++  else ()
++    target_link_libraries (geocoding_test_program geocoding-shared phonenumber-shared)
++  endif ()
+ endif ()
+ 
+ # Build an RPM
+-- 
+2.21.0
+

diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch
new file mode 100644
index 000000000000..8c15a5b0e8cc
--- /dev/null
+++ b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch
@@ -0,0 +1,66 @@
+From b3b0e96e0f62148ee80075fb9d35fe15f4e32612 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Mon, 15 Nov 2021 19:13:37 +0100
+Subject: [PATCH] Add BUILD_TESTING option
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ cpp/CMakeLists.txt | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 44db6834..a97da698 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -90,6 +90,7 @@ option ("USE_STD_MAP" "Force the use of std::map" "OFF")
+ option ("BUILD_STATIC_LIB" "Build static libraries" "ON")
+ option ("USE_STDMUTEX" "Use C++ 2011 std::mutex for multi-threading" "OFF")
+ option ("USE_POSIX_THREAD" "Use Posix api for multi-threading" "OFF")
++option ("BUILD_TESTING" "Build unit tests (gtest sources are needed)" "ON")
+ 
+ if (${USE_ALTERNATE_FORMATS} STREQUAL "ON")
+   add_definitions ("-DI18N_PHONENUMBERS_USE_ALTERNATE_FORMATS")
+@@ -121,7 +122,9 @@ if (${USE_BOOST} STREQUAL "OFF" AND ${USE_STDMUTEX} STREQUAL "OFF")
+   find_package (Threads)
+ endif()
+ 
+-find_or_build_gtest ()
++if (BUILD_TESTING)
++  find_or_build_gtest ()
++endif()
+ 
+ if (${USE_RE2} STREQUAL "ON")
+   find_required_library (RE2 re2/re2.h re2 "Google RE2")
+@@ -492,11 +495,13 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
+ endif ()
+ 
+ # Build a specific library for testing purposes.
++if (BUILD_TESTING)
+ add_library (phonenumber_testing STATIC ${TESTING_LIBRARY_SOURCES})
+ if (${BUILD_GEOCODER} STREQUAL "ON")
+   add_dependencies (phonenumber_testing generate_geocoding_data)
+ endif ()
+ target_link_libraries (phonenumber_testing ${LIBRARY_DEPS})
++endif()
+ 
+ if (${BUILD_GEOCODER} STREQUAL "ON")
+   # Test geocoding data cpp files generation.
+@@ -551,6 +556,7 @@ if (${USE_ICU_REGEXP} STREQUAL "ON")
+ endif ()
+ 
+ # Build the testing binary.
++if (BUILD_TESTING)
+ include_directories ("test")
+ add_executable (libphonenumber_test ${TEST_SOURCES})
+ set (TEST_LIBS phonenumber_testing ${GTEST_LIB})
+@@ -575,6 +581,7 @@ else ()
+     DEPENDS libphonenumber_test
+   )
+ endif ()
++endif ()
+ 
+ # Install rules.
+ install (FILES
+-- 
+2.33.1
+

diff --git a/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild b/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild
new file mode 100644
index 000000000000..0147d24ac25b
--- /dev/null
+++ b/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2021 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"
+S="${WORKDIR}/${P}/cpp"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+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}"/${P}-cmake.patch
+	# see also https://github.com/google/libphonenumber/pull/2459
+	# using a stripped-down patch w/ BUILD_TESTING
+	"${FILESDIR}"/${P}-testing.patch
+)
+
+src_configure() {
+	local mycmakeargs=(
+		-DBUILD_STATIC_LIB=OFF
+		-DBUILD_TESTING=OFF
+		-DREGENERATE_METADATA=OFF # avoid JRE dependency
+	)
+	cmake_src_configure
+}

diff --git a/dev-libs/libphonenumber/metadata.xml b/dev-libs/libphonenumber/metadata.xml
new file mode 100644
index 000000000000..d9319561d8a1
--- /dev/null
+++ b/dev-libs/libphonenumber/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>kde@gentoo.org</email>
+		<name>Gentoo KDE Project</name>
+	</maintainer>
+	<upstream>
+		<bugs-to>https://issuetracker.google.com/issues?q=componentid:192347</bugs-to>
+		<remote-id type="github">google/libphonenumber</remote-id>
+	</upstream>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libphonenumber/, dev-libs/libphonenumber/files/
@ 2021-11-16 11:03 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2021-11-16 11:03 UTC (permalink / raw
  To: gentoo-commits

commit:     9e66040a0ed9da569a73663026e362c50a492c3a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 16 10:54:59 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 16 11:03:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e66040a

dev-libs/libphonenumber: Fix testing.patch, restrict tests

Set CMAKE_USE_DIR instead of S to make git patches apply.

Closes: https://bugs.gentoo.org/823902
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/libphonenumber-8.12.37-cmake.patch       |  8 +--
 .../files/libphonenumber-8.12.37-testing.patch     | 68 ++++++++++++++++++----
 .../libphonenumber/libphonenumber-8.12.37.ebuild   |  6 +-
 3 files changed, 63 insertions(+), 19 deletions(-)

diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch
index 8e797a867032..bfc7e8701a5d 100644
--- a/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch
+++ b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-cmake.patch
@@ -7,13 +7,13 @@ Date: Wed, 27 Mar 2019 21:07:22 +0100
 Subject: [PATCH] Fix build with BUILD_STATIC_LIB=ON
 
 ---
- CMakeLists.txt | 14 +++++++++++---
+ cpp/CMakeLists.txt | 14 +++++++++++---
  1 file changed, 11 insertions(+), 3 deletions(-)
 
-diff --git a/CMakeLists.txt b/CMakeLists.txt
+diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
 index 38ce1f50..dd9399be 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
+--- a/cpp/CMakeLists.txt
++++ b/cpp/CMakeLists.txt
 @@ -441,7 +441,9 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
    list (APPEND GEOCODER_DEPS ${COMMON_DEPS})
    # Note that the subset of base/ on which the geocoder relies is implemented

diff --git a/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch
index 8c15a5b0e8cc..0ea039aea2bd 100644
--- a/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch
+++ b/dev-libs/libphonenumber/files/libphonenumber-8.12.37-testing.patch
@@ -1,18 +1,30 @@
-From b3b0e96e0f62148ee80075fb9d35fe15f4e32612 Mon Sep 17 00:00:00 2001
+From 387f1daf0f9cd25ffa2654cc536e5678dd96a571 Mon Sep 17 00:00:00 2001
 From: Andreas Sturmlechner <asturm@gentoo.org>
 Date: Mon, 15 Nov 2021 19:13:37 +0100
 Subject: [PATCH] Add BUILD_TESTING option
 
 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
 ---
- cpp/CMakeLists.txt | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
+ cpp/CMakeLists.txt       | 13 +++++++++++--
+ tools/cpp/CMakeLists.txt | 17 +++++++++--------
+ 2 files changed, 20 insertions(+), 10 deletions(-)
 
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 44db6834..a97da698 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -90,6 +90,7 @@ option ("USE_STD_MAP" "Force the use of std::map" "OFF")
+diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
+index 44db6834..f8e40978 100644
+--- a/cpp/CMakeLists.txt
++++ b/cpp/CMakeLists.txt
+@@ -32,7 +32,9 @@ endif ()
+ # depends on.
+ 
+ include (GNUInstallDirs)
+-include (../tools/cpp/gtest.cmake)
++if (BUILD_TESTING)
++  include (../tools/cpp/gtest.cmake)
++endif()
+ 
+ function (print_error DESCRIPTION FILE)
+   message (FATAL_ERROR
+@@ -90,6 +92,7 @@ option ("USE_STD_MAP" "Force the use of std::map" "OFF")
  option ("BUILD_STATIC_LIB" "Build static libraries" "ON")
  option ("USE_STDMUTEX" "Use C++ 2011 std::mutex for multi-threading" "OFF")
  option ("USE_POSIX_THREAD" "Use Posix api for multi-threading" "OFF")
@@ -20,7 +32,7 @@ index 44db6834..a97da698 100644
  
  if (${USE_ALTERNATE_FORMATS} STREQUAL "ON")
    add_definitions ("-DI18N_PHONENUMBERS_USE_ALTERNATE_FORMATS")
-@@ -121,7 +122,9 @@ if (${USE_BOOST} STREQUAL "OFF" AND ${USE_STDMUTEX} STREQUAL "OFF")
+@@ -121,7 +124,9 @@ if (${USE_BOOST} STREQUAL "OFF" AND ${USE_STDMUTEX} STREQUAL "OFF")
    find_package (Threads)
  endif()
  
@@ -31,7 +43,7 @@ index 44db6834..a97da698 100644
  
  if (${USE_RE2} STREQUAL "ON")
    find_required_library (RE2 re2/re2.h re2 "Google RE2")
-@@ -492,11 +495,13 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
+@@ -492,11 +497,13 @@ if (${BUILD_GEOCODER} STREQUAL "ON")
  endif ()
  
  # Build a specific library for testing purposes.
@@ -45,7 +57,7 @@ index 44db6834..a97da698 100644
  
  if (${BUILD_GEOCODER} STREQUAL "ON")
    # Test geocoding data cpp files generation.
-@@ -551,6 +556,7 @@ if (${USE_ICU_REGEXP} STREQUAL "ON")
+@@ -551,6 +558,7 @@ if (${USE_ICU_REGEXP} STREQUAL "ON")
  endif ()
  
  # Build the testing binary.
@@ -53,7 +65,7 @@ index 44db6834..a97da698 100644
  include_directories ("test")
  add_executable (libphonenumber_test ${TEST_SOURCES})
  set (TEST_LIBS phonenumber_testing ${GTEST_LIB})
-@@ -575,6 +581,7 @@ else ()
+@@ -575,6 +583,7 @@ else ()
      DEPENDS libphonenumber_test
    )
  endif ()
@@ -61,6 +73,38 @@ index 44db6834..a97da698 100644
  
  # Install rules.
  install (FILES
+diff --git a/tools/cpp/CMakeLists.txt b/tools/cpp/CMakeLists.txt
+index fafa8469..0c3a84e0 100644
+--- a/tools/cpp/CMakeLists.txt
++++ b/tools/cpp/CMakeLists.txt
+@@ -20,11 +20,10 @@ project (generate_geocoding_data)
+ 
+ # Helper functions dealing with finding libraries and programs this library
+ # depends on.
+-
+-include (gtest.cmake)
+-
+-find_or_build_gtest ()
+-
++if (BUILD_TESTING)
++  include (gtest.cmake)
++  find_or_build_gtest ()
++endif ()
+ set (
+   SOURCES
+   "src/cpp-build/generate_geocoding_data.cc"
+@@ -52,6 +51,8 @@ if (NOT WIN32)
+ endif ()
+ 
+ # Build the testing binary.
+-include_directories ("test")
+-add_executable (generate_geocoding_data_test ${TEST_SOURCES})
+-target_link_libraries (generate_geocoding_data_test ${TEST_LIBS})
++if (BUILD_TESTING)
++  include_directories ("test")
++  add_executable (generate_geocoding_data_test ${TEST_SOURCES})
++  target_link_libraries (generate_geocoding_data_test ${TEST_LIBS})
++endif ()
 -- 
 2.33.1
 

diff --git a/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild b/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild
index 0147d24ac25b..14b1b298ff0b 100644
--- a/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild
+++ b/dev-libs/libphonenumber/libphonenumber-8.12.37.ebuild
@@ -9,14 +9,14 @@ 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"
-S="${WORKDIR}/${P}/cpp"
+CMAKE_USE_DIR="${WORKDIR}"/${P}/cpp
 
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64"
 IUSE="test"
 
-RESTRICT="!test? ( test )"
+RESTRICT="test !test? ( test )"
 
 DEPEND="
 	dev-libs/icu:=
@@ -41,7 +41,7 @@ PATCHES=(
 src_configure() {
 	local mycmakeargs=(
 		-DBUILD_STATIC_LIB=OFF
-		-DBUILD_TESTING=OFF
+		-DBUILD_TESTING=$(usex test)
 		-DREGENERATE_METADATA=OFF # avoid JRE dependency
 	)
 	cmake_src_configure


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libphonenumber/, dev-libs/libphonenumber/files/
@ 2024-10-05 11:12 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-10-05 11:12 UTC (permalink / raw
  To: gentoo-commits

commit:     8562873238086a94ba2a9b9ecad1059fd1cd689c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  5 11:06:26 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct  5 11:10:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85628732

dev-libs/libphonenumber: add 8.13.47

* Replace CMake patch with newer version from Exherbo (original came
  from there too)
* Import another patch from Exherbo for newer abseil-cpp (fixes linking
  w/ lld, mold)
* Drop -Werror
* Wire up tests again (sorry, not rebasing the CMake patch, this is
  good enough ;))

Closes: https://bugs.gentoo.org/889910
Closes: https://bugs.gentoo.org/923946
Closes: https://bugs.gentoo.org/939873
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libphonenumber/Manifest                   |  1 +
 .../files/libphonenumber-8.13.47-cmake.patch       | 31 +++++++++++
 ...bphonenumber-8.13.47-protobuf-link-abseil.patch | 24 +++++++++
 .../files/libphonenumber-8.13.47-werror.patch      | 23 +++++++++
 .../libphonenumber/libphonenumber-8.13.47.ebuild   | 60 ++++++++++++++++++++++
 5 files changed, 139 insertions(+)

diff --git a/dev-libs/libphonenumber/Manifest b/dev-libs/libphonenumber/Manifest
index 9295664efd96..3145c825dbcd 100644
--- a/dev-libs/libphonenumber/Manifest
+++ b/dev-libs/libphonenumber/Manifest
@@ -1 +1,2 @@
 DIST libphonenumber-8.12.39.tar.gz 11007180 BLAKE2B 27a47b35497772740da04cb9b79e1a6b4fd6f9b0d4a89768e1ba9212672f1a0fd06c5837aa8858a4680b5c47ef16721c6ef145d8d2cd77dccbe27bb4b0897dcf SHA512 82570c60b132022a713c0664de2c29997cff0ab8c3ab97dbec0f8d1cd1782090ba92ca7d2f044760f523c986660f13b70aacf8a9c247a3b80eb19d35227bc2a8
+DIST libphonenumber-8.13.47.tar.gz 12929410 BLAKE2B 97af74d0c4c3f01baaeca370f0ad8d71abbff58edbb7209d5809e43f0171b0c3a997aa0a190131e935326ac72702706221429bf166e0726a44126bda36bb0169 SHA512 0ad3e59e4972bdb7f3e9abce4f1e2bd2924c21d437e734d6bc752cc86660a8a48b3b15ecd662c406e0279ef1112d9bd53b8ab9a9c4e593d3c8b87f9d6d23a5f7

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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-05 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-15 18:59 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libphonenumber/, dev-libs/libphonenumber/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-11-16 11:03 Andreas Sturmlechner
2024-10-05 11:12 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox