diff --git a/devel/py-grpcio-tools/Makefile b/devel/py-grpcio-tools/Makefile index fc7498dfefe8..eba564cbe266 100644 --- a/devel/py-grpcio-tools/Makefile +++ b/devel/py-grpcio-tools/Makefile @@ -1,24 +1,24 @@ PORTNAME= grpcio-tools -PORTVERSION= 1.49.0 +PORTVERSION= 1.49.1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP 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:3.5+ 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 82ca0c0a8b98..9dcfdfa0e887 100644 --- a/devel/py-grpcio-tools/distinfo +++ b/devel/py-grpcio-tools/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1663507524 -SHA256 (grpcio-tools-1.49.0.tar.gz) = 16ac93ac515194f63febcf6f8a96a7f17390268972acc15e765d257f5008f2af -SIZE (grpcio-tools-1.49.0.tar.gz) = 2238106 +TIMESTAMP = 1664077947 +SHA256 (grpcio-tools-1.49.1.tar.gz) = 84cc64e5b46bad43d5d7bd2fd772b656eba0366961187a847e908e2cb735db91 +SIZE (grpcio-tools-1.49.1.tar.gz) = 2252679 diff --git a/devel/py-grpcio-tools/files/patch-setup.py b/devel/py-grpcio-tools/files/patch-setup.py new file mode 100644 index 000000000000..05e7375feb7d --- /dev/null +++ b/devel/py-grpcio-tools/files/patch-setup.py @@ -0,0 +1,29 @@ +--- setup.py.orig 2022-10-01 13:52:51 UTC ++++ setup.py +@@ -149,7 +149,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: + EXTRA_ENV_COMPILE_ARGS += ' -fno-wrapv -frtti' + if EXTRA_ENV_LINK_ARGS is None: + EXTRA_ENV_LINK_ARGS = '' +@@ -175,7 +175,7 @@ if EXTRA_ENV_LINK_ARGS is None: + if "darwin" in sys.platform: + 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' +@@ -206,7 +206,7 @@ if "win32" in sys.platform: + DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1),) + 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 diff --git a/devel/py-grpcio-tools/files/patch-third__party_protobuf_src_google_protobuf_arena__impl.h b/devel/py-grpcio-tools/files/patch-third__party_protobuf_src_google_protobuf_arena__impl.h new file mode 100644 index 000000000000..f96fda395196 --- /dev/null +++ b/devel/py-grpcio-tools/files/patch-third__party_protobuf_src_google_protobuf_arena__impl.h @@ -0,0 +1,11 @@ +--- third_party/protobuf/src/google/protobuf/arena_impl.h.orig 2022-09-25 04:12:11 UTC ++++ third_party/protobuf/src/google/protobuf/arena_impl.h +@@ -640,7 +640,7 @@ class PROTOBUF_EXPORT ThreadSafeArena { + #ifdef _MSC_VER + #pragma warning(disable : 4324) + #endif +- struct alignas(kCacheAlignment) CacheAlignedLifecycleIdGenerator { ++ struct alignas(alignof(std::atomic)) CacheAlignedLifecycleIdGenerator { + std::atomic id; + }; + static CacheAlignedLifecycleIdGenerator lifecycle_id_generator_;