git: 44d2eabe98eb - main - devel/py-grpcio: update to 1.58.0.

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

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

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

    devel/py-grpcio: update to 1.58.0.
---
 devel/py-grpcio/Makefile                           |  2 +-
 devel/py-grpcio/distinfo                           |  6 ++--
 ..._party_abseil-cpp_absl_base_internal_sysinfo.cc | 33 ++++++++++++++++++++++
 ...sl_time_internal_cctz_src_time__zone__format.cc | 11 ++++++++
 ...boringssl-with-bazel_src_include_openssl_base.h |  4 +--
 5 files changed, 50 insertions(+), 6 deletions(-)

diff --git a/devel/py-grpcio/Makefile b/devel/py-grpcio/Makefile
index 15a6fb43573c..b3917063242b 100644
--- a/devel/py-grpcio/Makefile
+++ b/devel/py-grpcio/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	grpcio
-PORTVERSION=	1.57.0
+PORTVERSION=	1.58.0
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/devel/py-grpcio/distinfo b/devel/py-grpcio/distinfo
index bc0509ce86f1..5cc057cd744b 100644
--- a/devel/py-grpcio/distinfo
+++ b/devel/py-grpcio/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1691904681
-SHA256 (grpcio-1.57.0.tar.gz) = 4b089f7ad1eb00a104078bab8015b0ed0ebcb3b589e527ab009c53893fd4e613
-SIZE (grpcio-1.57.0.tar.gz) = 24737546
+TIMESTAMP = 1694182572
+SHA256 (grpcio-1.58.0.tar.gz) = 532410c51ccd851b706d1fbc00a87be0f5312bd6f8e5dbf89d4e99c7f79d7499
+SIZE (grpcio-1.58.0.tar.gz) = 24784339
diff --git a/devel/py-grpcio/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/devel/py-grpcio/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc
new file mode 100644
index 000000000000..1eb995321143
--- /dev/null
+++ b/devel/py-grpcio/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/files/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc b/devel/py-grpcio/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/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
diff --git a/devel/py-grpcio/files/patch-third__party_boringssl-with-bazel_src_include_openssl_base.h b/devel/py-grpcio/files/patch-third__party_boringssl-with-bazel_src_include_openssl_base.h
index c500bed72df1..94e724e94c7e 100644
--- a/devel/py-grpcio/files/patch-third__party_boringssl-with-bazel_src_include_openssl_base.h
+++ b/devel/py-grpcio/files/patch-third__party_boringssl-with-bazel_src_include_openssl_base.h
@@ -1,6 +1,6 @@
---- third_party/boringssl-with-bazel/src/include/openssl/base.h.orig	2022-05-03 21:27:37 UTC
+--- third_party/boringssl-with-bazel/src/include/openssl/base.h.orig	2023-09-06 01:32:08 UTC
 +++ third_party/boringssl-with-bazel/src/include/openssl/base.h
-@@ -483,9 +483,6 @@ typedef void *OPENSSL_BLOCK;
+@@ -413,9 +413,6 @@ typedef void *OPENSSL_BLOCK;
  // MSVC doesn't set __cplusplus to 201103 to indicate C++11 support (see
  // https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l)
  // so MSVC is just assumed to support C++11.