diff --git a/devel/py-grpcio-tools/Makefile b/devel/py-grpcio-tools/Makefile index 5c27f97e8fa4..b6a39f3f9eb2 100644 --- a/devel/py-grpcio-tools/Makefile +++ b/devel/py-grpcio-tools/Makefile @@ -1,24 +1,24 @@ PORTNAME= grpcio-tools -PORTVERSION= 1.60.1 +PORTVERSION= 1.62.0 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= vanilla@FreeBSD.org COMMENT= Protobuf code generator for gRPC WWW= https://pypi.org/project/grpcio-tools/ LICENSE= BSD3CLAUSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}grpcio>1:devel/py-grpcio@${PY_FLAVOR} LIB_DEPENDS= libcares.so:dns/c-ares USES= compiler:c++11-lang localbase:ldflags python USE_PYTHON= autoplist distutils CFLAGS+= -DHAVE_PTHREAD=1 LDFLAGS+= -lcares post-install: ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/grpc_tools/_protoc_compiler*.so .include diff --git a/devel/py-grpcio-tools/distinfo b/devel/py-grpcio-tools/distinfo index eb3e9b073163..40d95b2f8935 100644 --- a/devel/py-grpcio-tools/distinfo +++ b/devel/py-grpcio-tools/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1706855020 -SHA256 (grpcio-tools-1.60.1.tar.gz) = da08224ab8675c6d464b988bd8ca02cccd2bf0275bceefe8f6219bfd4a4f5e85 -SIZE (grpcio-tools-1.60.1.tar.gz) = 4611737 +TIMESTAMP = 1708583118 +SHA256 (grpcio-tools-1.62.0.tar.gz) = 7fca6ecfbbf0549058bb29dcc6e435d885b878d07701e77ac58e1e1f591736dc +SIZE (grpcio-tools-1.62.0.tar.gz) = 4613875 diff --git a/devel/py-grpcio-tools/files/patch-setup.py b/devel/py-grpcio-tools/files/patch-setup.py index 3f2434e25c60..cecda56e3f44 100644 --- a/devel/py-grpcio-tools/files/patch-setup.py +++ b/devel/py-grpcio-tools/files/patch-setup.py @@ -1,29 +1,29 @@ ---- setup.py.orig 2023-08-08 21:49:44 UTC +--- setup.py.orig 2024-02-20 20:46:14 UTC +++ setup.py -@@ -160,7 +160,7 @@ if EXTRA_ENV_COMPILE_ARGS is None: - # We need to statically link the C++ Runtime, only the C runtime is - # available dynamically - EXTRA_ENV_COMPILE_ARGS += " /MT" +@@ -145,7 +145,7 @@ if EXTRA_ENV_COMPILE_ARGS is None: + # We need to statically link the C++ Runtime, only the C runtime is + # available dynamically + EXTRA_ENV_COMPILE_ARGS += " /MT" - elif "linux" in sys.platform or "darwin" in sys.platform: + elif "linux" in sys.platform or "darwin" in sys.platform or "freebsd" in sys.platform: + # GCC & Clang by defaults uses C17 so only C++14 needs to be specified. + EXTRA_ENV_COMPILE_ARGS += " -std=c++14" EXTRA_ENV_COMPILE_ARGS += " -fno-wrapv -frtti" - if EXTRA_ENV_LINK_ARGS is None: - EXTRA_ENV_LINK_ARGS = "" -@@ -187,7 +187,7 @@ if EXTRA_ENV_LINK_ARGS is None: +@@ -174,7 +174,7 @@ if EXTRA_ENV_LINK_ARGS is None: EXTRA_ENV_LINK_ARGS += " -Wl,-exported_symbol,_{}".format( _EXT_INIT_SYMBOL ) - if "linux" in sys.platform or "darwin" in sys.platform: + if "linux" in sys.platform or "darwin" in sys.platform or "freebsd" in sys.platform: EXTRA_ENV_LINK_ARGS += " -lpthread" if check_linker_need_libatomic(): EXTRA_ENV_LINK_ARGS += " -latomic" -@@ -225,7 +225,7 @@ if "win32" in sys.platform: +@@ -211,7 +211,7 @@ if "win32" in sys.platform: ) if "64bit" in platform.architecture()[0]: DEFINE_MACROS += (("MS_WIN64", 1),) -elif "linux" in sys.platform or "darwin" in sys.platform: +elif "linux" in sys.platform or "darwin" in sys.platform or "freebsd" in sys.platform: DEFINE_MACROS += (("HAVE_PTHREAD", 1),) - # By default, Python3 distutils enforces compatibility of + # By default, Python3 setuptools(distutils) enforces compatibility of 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 index 1eb995321143..72edf4a1c004 100644 --- 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 @@ -1,33 +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.orig 2024-02-20 20:56:37 UTC +++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc -@@ -34,6 +34,10 @@ - #include +@@ -42,6 +42,10 @@ + #include #endif +#ifdef __FreeBSD__ +#include +#endif + #if defined(__myriad2__) #include #endif -@@ -421,14 +425,18 @@ pid_t GetTID() { +@@ -429,14 +433,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(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 deleted file mode 100644 index e104a9b365cd..000000000000 --- a/devel/py-grpcio-tools/files/patch-third__party_abseil-cpp_absl_time_internal_cctz_src_time__zone__format.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- 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