git: 601fec4a7ce0 - main - www/py-httpcore: Add TRIO option

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 25 Dec 2023 09:09:46 UTC
The branch main has been updated by sunpoet:

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

commit 601fec4a7ce06fbddb0f39113a72667b58fe3e19
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-12-25 09:01:10 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-12-25 09:01:10 +0000

    www/py-httpcore: Add TRIO option
---
 www/py-httpcore/Makefile                   |  4 +++-
 www/py-httpcore/files/patch-pyproject.toml | 11 +++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/www/py-httpcore/Makefile b/www/py-httpcore/Makefile
index 574885b3f9a0..9e4e97546c20 100644
--- a/www/py-httpcore/Makefile
+++ b/www/py-httpcore/Makefile
@@ -22,13 +22,15 @@ USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
-OPTIONS_DEFINE=	ASYNCIO HTTP2 SOCKS
+OPTIONS_DEFINE=	ASYNCIO HTTP2 SOCKS TRIO
 OPTIONS_DEFAULT=ASYNCIO HTTP2
 ASYNCIO_DESC=	Asynchronous support via anyio
 HTTP2_DESC=	HTTP/2 support
+TRIO_DESC=	Asynchronous support via trio
 
 ASYNCIO_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}anyio>=4.0<5.0:devel/py-anyio@${PY_FLAVOR}
 HTTP2_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}h2>=3<5:www/py-h2@${PY_FLAVOR}
 SOCKS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}socksio>=1<2:net/py-socksio@${PY_FLAVOR}
+TRIO_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}trio>=0.22.0:net/py-trio@${PY_FLAVOR}
 
 .include <bsd.port.mk>
diff --git a/www/py-httpcore/files/patch-pyproject.toml b/www/py-httpcore/files/patch-pyproject.toml
new file mode 100644
index 000000000000..bc44320a3d72
--- /dev/null
+++ b/www/py-httpcore/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig	2020-02-02 00:00:00 UTC
++++ pyproject.toml
+@@ -41,7 +41,7 @@ socks = [
+     "socksio==1.*",
+ ]
+ trio = [
+-    "trio>=0.22.0,<0.23.0",
++    "trio>=0.22.0",
+ ]
+ asyncio = [
+     "anyio>=4.0,<5.0",