git: 45f1b936769d - main - net-im/py-matrix-synapse: Update to 1.57.1

From: Ashish SHUKLA <ashish_at_FreeBSD.org>
Date: Mon, 25 Apr 2022 13:09:55 UTC
The branch main has been updated by ashish:

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

commit 45f1b936769d8038de890dda01ce7986a94bbbe6
Author:     Ashish SHUKLA <ashish@FreeBSD.org>
AuthorDate: 2022-04-20 00:25:26 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2022-04-25 13:05:56 +0000

    net-im/py-matrix-synapse: Update to 1.57.1
    
    - Move py-idna dependency to TEST_DEPENDS
    - Add a dependency for Python < 3.8
    
    PR:             263430
    Approved by:    Sascha Biberhofer <ports@skyforge.at> (maintainer)
---
 net-im/py-matrix-synapse/Makefile                         | 15 +++++++++++----
 net-im/py-matrix-synapse/distinfo                         |  6 +++---
 .../files/patch-synapse_python__dependencies.py           | 13 ++-----------
 3 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/net-im/py-matrix-synapse/Makefile b/net-im/py-matrix-synapse/Makefile
index e8df48627d0e..47fbe7aba7a2 100644
--- a/net-im/py-matrix-synapse/Makefile
+++ b/net-im/py-matrix-synapse/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	matrix-synapse
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.56.0
+DISTVERSION=	1.57.1
 CATEGORIES=	net-im python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -19,7 +19,6 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}jsonschema>=3.0.0:devel/py-jsonschema@${PY_F
 		${PYTHON_PKGNAMEPREFIX}canonicaljson>=1.4.0:devel/py-canonicaljson@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}signedjson>=1.1.0:security/py-signedjson@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pynacl>=1.2.1:security/py-pynacl@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}idna>=2.5:dns/py-idna@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}service_identity>=18.1.0:security/py-service_identity@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}twisted>=18.9.0:devel/py-twisted@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}treq>=15.1:www/py-treq@${PY_FLAVOR} \
@@ -50,7 +49,8 @@ TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}virtualenv>=15.0:devel/py-virtualenv@${PY_F
 		${PYTHON_PKGNAMEPREFIX}tox>=2.3.1:devel/py-tox@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}parameterized>=0.7.0:devel/py-parameterized@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}authlib>=0.14.0:security/py-authlib@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}authlib>=0.14.0:security/py-authlib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}idna>=2.5:dns/py-idna@${PY_FLAVOR}
 
 USES=		python:3.7+
 USE_GITHUB=	yes
@@ -89,6 +89,13 @@ REDIS_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hiredis>=0:databases/py-hiredis@${PY_F
 SQLITE_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
 URLPREVIEW_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}lxml>=4.2.0:devel/py-lxml@${PY_FLAVOR}
 
+.include <bsd.port.pre.mk>
+
+# Dependency required by Python < 3.8
+.if (${PYTHON_REL} < 30800)
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.4:devel/py-importlib-metadata@${PY_FLAVOR}
+.endif
+
 post-install:
 	${MKDIR} ${STAGEDIR}${ETCDIR}
 	${INSTALL_DATA} ${WRKDIR}/log.config ${STAGEDIR}${ETCDIR}/log.config.sample
@@ -100,4 +107,4 @@ post-install-DOCS-on:
 do-test:
 	cd ${WRKSRC} && PYTHONPATH="." trial-${PYTHON_VER} tests
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-im/py-matrix-synapse/distinfo b/net-im/py-matrix-synapse/distinfo
index 8bc7e3151a6f..d0ba9224cbf1 100644
--- a/net-im/py-matrix-synapse/distinfo
+++ b/net-im/py-matrix-synapse/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1649590803
-SHA256 (matrix-org-synapse-v1.56.0_GH0.tar.gz) = 7afda1fefa2af42966fdffa1f3ab6643674a738ad722e76bf94b873b8845c373
-SIZE (matrix-org-synapse-v1.56.0_GH0.tar.gz) = 7750479
+TIMESTAMP = 1650652816
+SHA256 (matrix-org-synapse-v1.57.1_GH0.tar.gz) = 07926e1601bd2973ea16baabd41268939ceeb90f6a8c98b31a3610de61dc5ad1
+SIZE (matrix-org-synapse-v1.57.1_GH0.tar.gz) = 7834623
diff --git a/net-im/py-matrix-synapse/files/patch-synapse_python__dependencies.py b/net-im/py-matrix-synapse/files/patch-synapse_python__dependencies.py
index 7feafa7bbf66..2cace56065f0 100644
--- a/net-im/py-matrix-synapse/files/patch-synapse_python__dependencies.py
+++ b/net-im/py-matrix-synapse/files/patch-synapse_python__dependencies.py
@@ -1,15 +1,6 @@
---- synapse/python_dependencies.py.orig	2022-04-12 08:11:46 UTC
+--- synapse/python_dependencies.py.orig	2022-04-20 00:17:17 UTC
 +++ synapse/python_dependencies.py
-@@ -48,7 +48,7 @@ REQUIREMENTS = [
-     "unpaddedbase64>=1.1.0",
-     "canonicaljson>=1.4.0",
-     # we use the type definitions added in signedjson 1.1.
--    "signedjson>=1.1.0,<=1.1.1",
-+    "signedjson>=1.1.0",
-     "pynacl>=1.2.1",
-     "idna>=2.5",
-     # validating SSL certs for IP addresses requires service_identity 18.1.
-@@ -83,7 +83,7 @@ REQUIREMENTS = [
+@@ -82,7 +82,7 @@ REQUIREMENTS = [
      "typing-extensions>=3.10.0",
      # We enforce that we have a `cryptography` version that bundles an `openssl`
      # with the latest security patches.