git: caa31a468e84 - main - x11/libei: limit py-strenum to python < 3.11

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 17 May 2023 21:35:03 UTC
The branch main has been updated by jbeich:

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

commit caa31a468e840718ea52b2832a3e7911b397f639
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-05-17 21:32:32 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-05-17 21:34:46 +0000

    x11/libei: limit py-strenum to python < 3.11
---
 x11/libei/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/x11/libei/Makefile b/x11/libei/Makefile
index 4b6ae3cac97a..d64101a5d81d 100644
--- a/x11/libei/Makefile
+++ b/x11/libei/Makefile
@@ -24,7 +24,6 @@ LIB_DEPENDS=	libepoll-shim.so:devel/libepoll-shim \
 		libevdev.so:devel/libevdev
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}StrEnum>0:devel/py-strenum@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}structlog>0:devel/py-structlog@${PY_FLAVOR}
 
 USES=		compiler:c11 localbase meson pkgconfig python:build
@@ -54,4 +53,10 @@ pre-test:
 		${TOUCH} ${WRKDIR}/.meson_build_tests; \
 	fi
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 31100
+TEST_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}StrEnum>0:devel/py-strenum@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>