git: e3f34f8a65e6 - main - devel/py-twisted: Unbreak OpenSSL support

From: Ashish SHUKLA <ashish_at_FreeBSD.org>
Date: Mon, 12 Dec 2022 15:00:21 UTC
The branch main has been updated by ashish:

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

commit e3f34f8a65e6aae0f177b5098b704ca1d0a62c4a
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2022-12-12 14:58:20 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2022-12-12 14:58:20 +0000

    devel/py-twisted: Unbreak OpenSSL support
    
    Thanks to dinoex@ for suggessting the workaround.
    
    PR:             268043
    Reported by:    dinoex
    Approved by:    wen
---
 devel/py-twisted/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/devel/py-twisted/Makefile b/devel/py-twisted/Makefile
index d92b000390ff..06203bea19fc 100644
--- a/devel/py-twisted/Makefile
+++ b/devel/py-twisted/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	twisted
 PORTVERSION=	22.10.0
+PORTREVISION=	1
 CATEGORIES=	devel net python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -50,6 +51,10 @@ TLS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}idna>=2.4:dns/py-idna@${PY_FLAVOR} \
 # twisted.conch tests depend on finding certain scripts in PATH
 TEST_ENV=	PYTHONPATH=${WRKSRC}/src PATH=${STAGEDIR}/${PREFIX}/bin:$$PATH
 
+post-patch:
+	${GREP} -F -Rl TLS_METHOD ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
+		-e 's,TLS_METHOD,TLSv1_2_METHOD,'
+
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/ -name '*.so' -exec ${STRIP_CMD} {} +