git: e0e9da7f91f9 - main - devel/libphonenumber: Restore header patches
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Mar 2025 01:56:56 UTC
The branch main has been updated by jhale:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e0e9da7f91f91dfe9b8a617dc4c6fe27c06399da
commit e0e9da7f91f91dfe9b8a617dc4c6fe27c06399da
Author: Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-03-06 01:50:30 +0000
Commit: Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-03-06 01:56:50 +0000
devel/libphonenumber: Restore header patches
Fixes issue with net/kitinerary
/usr/local/include/phonenumbers/base/thread_checker.h:29:2:
error: Building without Boost, please provide -DI18N_PHONENUMBERS_NO_THREAD_SAFETY
PR: 285187
Reported by: Chad Jacob Milios <milios@ccsys.com>
Fixes: a7845f82f019 devel/libphonenumber: Update to 9.0.0
---
devel/libphonenumber/Makefile | 4 ++--
.../patch-src_phonenumbers_base_memory_singleton.h | 11 +++++++++++
...atch-src_phonenumbers_base_synchronization_lock.h | 11 +++++++++++
.../patch-src_phonenumbers_base_thread__checker.h | 20 ++++++++++++++++++++
4 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/devel/libphonenumber/Makefile b/devel/libphonenumber/Makefile
index 80e6a308b2d4..5e6cdafd4816 100644
--- a/devel/libphonenumber/Makefile
+++ b/devel/libphonenumber/Makefile
@@ -1,6 +1,7 @@
PORTNAME= libphonenumber
DISTVERSIONPREFIX= v
DISTVERSION= 9.0.0
+PORTREVISION= 1
CATEGORIES= devel
MAINTAINER= kde@FreeBSD.org
@@ -20,8 +21,7 @@ USES= cmake:testing compiler:c++17-lang pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= google
-CMAKE_ON= USE_POSIX_THREAD \
- USE_STD_MAP
+CMAKE_ON= USE_STD_MAP
CMAKE_OFF= REGENERATE_METADATA \
BUILD_TESTING
CMAKE_TESTING_TARGET= tests
diff --git a/devel/libphonenumber/files/patch-src_phonenumbers_base_memory_singleton.h b/devel/libphonenumber/files/patch-src_phonenumbers_base_memory_singleton.h
new file mode 100644
index 000000000000..027519d02fb3
--- /dev/null
+++ b/devel/libphonenumber/files/patch-src_phonenumbers_base_memory_singleton.h
@@ -0,0 +1,11 @@
+--- 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(__FreeBSD__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
+ #include "phonenumbers/base/memory/singleton_posix.h"
+ #elif defined(WIN32)
+ #include "phonenumbers/base/memory/singleton_win32.h"
diff --git a/devel/libphonenumber/files/patch-src_phonenumbers_base_synchronization_lock.h b/devel/libphonenumber/files/patch-src_phonenumbers_base_synchronization_lock.h
new file mode 100644
index 000000000000..6eece4219c57
--- /dev/null
+++ b/devel/libphonenumber/files/patch-src_phonenumbers_base_synchronization_lock.h
@@ -0,0 +1,11 @@
+--- 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(__FreeBSD__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD)
+ #include "phonenumbers/base/synchronization/lock_posix.h"
+ #elif defined(WIN32)
+ #include "phonenumbers/base/synchronization/lock_win32.h"
diff --git a/devel/libphonenumber/files/patch-src_phonenumbers_base_thread__checker.h b/devel/libphonenumber/files/patch-src_phonenumbers_base_thread__checker.h
new file mode 100644
index 000000000000..e1f2d7dd9691
--- /dev/null
+++ b/devel/libphonenumber/files/patch-src_phonenumbers_base_thread__checker.h
@@ -0,0 +1,20 @@
+--- src/phonenumbers/base/thread_checker.h.orig 2025-02-27 13:36:44 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(__FreeBSD__) && !defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD) && \
+ !defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY) && \
+ !((__cplusplus >= 201103L) && defined(I18N_PHONENUMBERS_USE_STDMUTEX)) && \
+ !defined(WIN32)
+@@ -33,7 +33,7 @@
+ #endif
+
+ #if !defined(NDEBUG) && !defined(I18N_PHONENUMBERS_USE_BOOST) && \
+- (defined(__linux__) || defined(__APPLE__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD))
++ (defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(I18N_PHONENUMBERS_HAVE_POSIX_THREAD))
+
+ #include <pthread.h>
+