devel/libphonenumber: Update to 9.0.0

Despite the major version bump, the C++ library (this) just contains
metadata updates in this release and is API/ABI compatible with the
previous 8.13.x releases, thus the shlib version remains the same.

Still, do some deeper digging on this occasion:

Switch to ninja build system and deem jobs safe. These standards haven't
been reevaluated in quite a few years, but it seems to build fine in both
cases.

Add support for regression tests. All currently pass.

Remove all of our local patches. The same result can be achieved by
simply setting CMAKE_ON=USE_POSIX_THREAD.

Make portclippy(1) happy.

https://github.com/google/libphonenumber/releases/tag/v9.0.0
This commit is contained in:
Jason E. Hale 2025-03-05 03:04:56 -05:00
parent 493e48d247
commit a7845f82f0
6 changed files with 11 additions and 54 deletions

View file

@ -1,7 +1,6 @@
PORTNAME= libphonenumber
DISTVERSIONPREFIX= v
DISTVERSION= 8.13.55
PORTREVISION= 1
DISTVERSION= 9.0.0
CATEGORIES= devel
MAINTAINER= kde@FreeBSD.org
@ -15,19 +14,21 @@ LIB_DEPENDS= libabsl_strings.so:devel/abseil \
libboost_atomic.so:devel/boost-libs \
libicui18n.so:devel/icu \
libprotobuf.so:devel/protobuf
TEST_DEPENDS= googletest>=0:devel/googletest
USES= cmake:noninja compiler:c++17-lang pkgconfig
USES= cmake:testing compiler:c++17-lang pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= google
CMAKE_ON= USE_STD_MAP
CMAKE_ON= USE_POSIX_THREAD \
USE_STD_MAP
CMAKE_OFF= REGENERATE_METADATA \
BUILD_TESTING
CMAKE_TESTING_TARGET= tests
WRKSRC_SUBDIR= cpp
MAKE_JOBS_UNSAFE= yes
PLIST_SUB= SHLIB_FULL=${PORTVERSION:R} SHLIB_SHORT=${PORTVERSION:R:R}
PLIST_SUB= SHLIB_FULL="8.13" \
SHLIB_SHORT="8"
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1739603163
SHA256 (google-libphonenumber-v8.13.55_GH0.tar.gz) = 0a4af8d319bde54565ebefd6ec9c2708fd9e145f6ee0469345b3bf07d2e4c8b6
SIZE (google-libphonenumber-v8.13.55_GH0.tar.gz) = 13005278
TIMESTAMP = 1741160576
SHA256 (google-libphonenumber-v9.0.0_GH0.tar.gz) = d6a4cdaa26aa68676344a9b34f61753e340cc96e644c45c3546f36f367a3772a
SIZE (google-libphonenumber-v9.0.0_GH0.tar.gz) = 13006041

View file

@ -1,11 +0,0 @@
--- CMakeLists.txt.orig 2023-09-19 04:20:31 UTC
+++ CMakeLists.txt
@@ -100,7 +100,7 @@ endif ()
endif ()
# Find all the required libraries and programs.
-find_package(absl)
+find_package(absl REQUIRED)
if(NOT absl_FOUND)
# Overide abseil install rules for subprojects

View file

@ -1,11 +0,0 @@
--- src/phonenumbers/base/memory/singleton.h.orig 2020-06-18 13:06:40 UTC
+++ src/phonenumbers/base/memory/singleton.h
@@ -22,7 +22,7 @@
#elif (__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)
// C++11 Lock implementation based on std::mutex.
#include "phonenumbers/base/memory/singleton_stdmutex.h"
-#elif defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
+#elif defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) || defined(__FreeBSD__)
#include "phonenumbers/base/memory/singleton_posix.h"
#elif defined(WIN32)
#include "phonenumbers/base/memory/singleton_win32.h"

View file

@ -1,11 +0,0 @@
--- src/phonenumbers/base/synchronization/lock.h.orig 2020-06-18 13:06:40 UTC
+++ src/phonenumbers/base/synchronization/lock.h
@@ -22,7 +22,7 @@
#elif (__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)
// C++11 Lock implementation based on std::mutex.
#include "phonenumbers/base/synchronization/lock_stdmutex.h"
-#elif defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
+#elif defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) || defined(__FreeBSD__)
#include "phonenumbers/base/synchronization/lock_posix.h"
#elif defined(WIN32)
#include "phonenumbers/base/synchronization/lock_win32.h"

View file

@ -1,11 +0,0 @@
--- src/phonenumbers/base/thread_checker.h.orig 2020-06-18 13:06:40 UTC
+++ src/phonenumbers/base/thread_checker.h
@@ -22,7 +22,7 @@
// Note that I18N_PHONENUMBERS_NO_THREAD_SAFETY must be defined only to let the
// user of the library know that it can't be used in a thread-safe manner when
// it is not depending on Boost.
-#if !defined(__linux__) && !defined(__APPLE__) && !defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) && \
+#if !defined(__linux__) && !defined(__APPLE__) && !defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) && !defined(__FreeBSD__) \
!defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY) && \
!((__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)) && \
!defined(WIN32)