aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2021-12-12 06:53:38 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2021-12-12 06:53:38 +0000
commit066bf46c62fce1e04b09d38e309423775538e212 (patch)
tree0f78bfd1545c9f1c5c3469670717f31ad3085f1b
parent59d7786f217d032c4754c586c4fc1b0e4d99255c (diff)
downloadports-066bf46c62fce1e04b09d38e309423775538e212.tar.gz
ports-066bf46c62fce1e04b09d38e309423775538e212.zip
devel/py-grpcio: fix build with newer python.
PR: 260316 Reported by: amdmi3@
-rw-r--r--devel/py-grpcio/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/py-grpcio/Makefile b/devel/py-grpcio/Makefile
index d520cc2faba8..09ef72b7124b 100644
--- a/devel/py-grpcio/Makefile
+++ b/devel/py-grpcio/Makefile
@@ -16,12 +16,15 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}protobuf>=3:devel/py-protobuf@${PY_FLAVOR} \
LIB_DEPENDS= libcares.so:dns/c-ares
USES= compiler:c++11-lib localbase:ldflags python:3.6+ ssl
-USE_PYTHON= autoplist distutils
+USE_PYTHON= autoplist cython distutils
MAKE_ENV+= GRPC_PYTHON_BUILD_SYSTEM_CARES=true \
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true \
GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true
LDFLAGS+= -lcares
+post-patch:
+ @${RM} ${WRKSRC}/src/python/grpcio/grpc/_cython/cygrpc.cpp
+
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/grpc/_cython/cygrpc*.so
${REINPLACE_CMD} -e 's|${PYTHONPREFIX_SITELIBDIR}/\(.*\)/grpcio/grpc/_cython/cygrpc${PYTHON_EXT_SUFFIX}.so|${PYTHONPREFIX_SITELIBDIR}/grpc/_cython/cygrpc${PYTHON_EXT_SUFFIX}.so|g' ${_PYTHONPKGLIST}