1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

devel/py-grpcio: fix build with newer python.

PR:		260316
Reported by:	amdmi3@
This commit is contained in:
Vanilla I. Shu 2021-12-12 14:53:38 +08:00
parent 59d7786f21
commit 066bf46c62

View File

@ -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}