git: bc3159fcccc2 - main - devel/py-pip-audit: Allow build with py-cyclonedx-python-lib 6.0.0+

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

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

commit bc3159fcccc2a679ad4e0ea338c0163dd0f87cdf
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-12-25 16:03:18 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-12-25 16:10:53 +0000

    devel/py-pip-audit: Allow build with py-cyclonedx-python-lib 6.0.0+
    
    - Bump PORTREVISION for package change
---
 devel/py-pip-audit/Makefile                        |  3 ++-
 .../py-pip-audit/files/patch-cyclonedx-python-lib  | 24 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/devel/py-pip-audit/Makefile b/devel/py-pip-audit/Makefile
index 19733efe4ffc..6c7404e8264c 100644
--- a/devel/py-pip-audit/Makefile
+++ b/devel/py-pip-audit/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pip-audit
 PORTVERSION=	2.6.2
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI \
 		https://github.com/pypa/pip-audit/releases/download/v${PORTVERSION}/
@@ -15,7 +16,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.2<4:devel/py-flit-core@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cachecontrol>=0.13.0:www/py-cachecontrol@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}cyclonedx-python-lib>=4<6:textproc/py-cyclonedx-python-lib@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}cyclonedx-python-lib>=5<7:textproc/py-cyclonedx-python-lib@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}html5lib>=1.1:www/py-html5lib@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}packaging>=23.0.0:devel/py-packaging@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pip-api>=0.0.28:devel/py-pip-api@${PY_FLAVOR} \
diff --git a/devel/py-pip-audit/files/patch-cyclonedx-python-lib b/devel/py-pip-audit/files/patch-cyclonedx-python-lib
new file mode 100644
index 000000000000..eb0180333b4c
--- /dev/null
+++ b/devel/py-pip-audit/files/patch-cyclonedx-python-lib
@@ -0,0 +1,24 @@
+Reference:	https://github.com/pypa/pip-audit/pull/715
+
+--- pip_audit/_format/cyclonedx.py.orig	2023-12-19 03:49:32 UTC
++++ pip_audit/_format/cyclonedx.py
+@@ -90,7 +90,7 @@ class CycloneDxFormat(VulnerabilityFormat):
+             logger.warning("--fix output is unsupported by CycloneDX formats")
+ 
+         bom = _pip_audit_result_to_bom(result)
+-        formatter = output.get_instance(
++        formatter = output.make_outputter(
+             bom=bom,
+             output_format=self._inner_format.value,
+             schema_version=output.SchemaVersion.V1_4,
+--- pyproject.toml.orig	2023-12-19 03:49:32 UTC
++++ pyproject.toml
+@@ -28,7 +28,7 @@ classifiers = [
+ ]
+ dependencies = [
+     "CacheControl[filecache] >= 0.13.0",
+-    "cyclonedx-python-lib >= 4,< 6",
++    "cyclonedx-python-lib >= 5,< 7",
+     "html5lib>=1.1",
+     "packaging>=23.0.0",                 # https://github.com/pypa/pip-audit/issues/464
+     "pip-api>=0.0.28",