git: d3ad36d1d185 - main - devel/py-grpcio-tools: update to 1.58.0.

From: Vanilla I. Shu <vanilla_at_FreeBSD.org>
Date: Fri, 08 Sep 2023 14:56:17 UTC
The branch main has been updated by vanilla:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3ad36d1d18566184fc1830f506d821da83e739d

commit d3ad36d1d18566184fc1830f506d821da83e739d
Author:     Vanilla I. Shu <vanilla@FreeBSD.org>
AuthorDate: 2023-09-08 14:55:49 +0000
Commit:     Vanilla I. Shu <vanilla@FreeBSD.org>
CommitDate: 2023-09-08 14:56:08 +0000

    devel/py-grpcio-tools: update to 1.58.0.
---
 devel/py-grpcio-tools/Makefile                     |  2 +-
 devel/py-grpcio-tools/distinfo                     |  6 ++--
 ..._party_abseil-cpp_absl_base_internal_sysinfo.cc | 33 ++++++++++++++++++++++
 ...sl_time_internal_cctz_src_time__zone__format.cc | 11 ++++++++
 4 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/devel/py-grpcio-tools/Makefile b/devel/py-grpcio-tools/Makefile
index a3dea494dd9e..167294c7a3cf 100644
--- a/devel/py-grpcio-tools/Makefile
+++ b/devel/py-grpcio-tools/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	grpcio-tools
-PORTVERSION=	1.57.0
+PORTVERSION=	1.58.0
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/devel/py-grpcio-tools/distinfo b/devel/py-grpcio-tools/distinfo
index 5528daa91d35..b0b135442294 100644
--- a/devel/py-grpcio-tools/distinfo
+++ b/devel/py-grpcio-tools/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1691904958
-SHA256 (grpcio-tools-1.57.0.tar.gz) = 2f16130d869ce27ecd623194547b649dd657333ec7e8644cc571c645781a9b85
-SIZE (grpcio-tools-1.57.0.tar.gz) = 4488020
+TIMESTAMP = 1694183393
+SHA256 (grpcio-tools-1.58.0.tar.gz) = 6f4d80ceb591e31ca4dceec747dbe56132e1392a0a9bb1c8fe001d1b5cac898a
+SIZE (grpcio-tools-1.58.0.tar.gz) = 4525422
diff --git a/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
new file mode 100644
index 000000000000..1eb995321143
--- /dev/null
+++ b/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
@@ -0,0 +1,33 @@
+--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig	2023-09-08 14:23:50 UTC
++++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc
+@@ -34,6 +34,10 @@
+ #include <sys/sysctl.h>
+ #endif
+ 
++#ifdef __FreeBSD__
++#include <pthread_np.h>
++#endif
++
+ #if defined(__myriad2__)
+ #include <rtems.h>
+ #endif
+@@ -421,14 +425,18 @@ pid_t GetTID() {
+   return tid;
+ }
+ 
+-#elif defined(__APPLE__)
++#elif defined(__APPLE__) || defined(__FreeBSD__)
+ 
+ pid_t GetTID() {
+   uint64_t tid;
+   // `nullptr` here implies this thread.  This only fails if the specified
+   // thread is invalid or the pointer-to-tid is null, so we needn't worry about
+   // it.
++#if __FreeBSD__
++  tid = pthread_getthreadid_np();
++#else
+   pthread_threadid_np(nullptr, &tid);
++#endif
+   return static_cast<pid_t>(tid);
+ }
+ 
diff --git a/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc b/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
new file mode 100644
index 000000000000..e104a9b365cd
--- /dev/null
+++ b/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc
@@ -0,0 +1,11 @@
+--- third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc.orig	2023-09-08 14:26:05 UTC
++++ third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #if defined(HAS_STRPTIME) && HAS_STRPTIME
+-#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__)
++#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ #define _XOPEN_SOURCE 500  // Exposes definitions for SUSv2 (UNIX 98).
+ #endif
+ #endif