git: ecdeebe2a412 - 2025Q1 - archivers/py-comicapi: Fix RAR and 7z Support

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Tue, 18 Feb 2025 14:30:37 UTC
The branch 2025Q1 has been updated by fuz:

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

commit ecdeebe2a41290b80fc8024f5f421dc8d963cc47
Author:     Matthew Wener <matthew@wener.org>
AuthorDate: 2025-02-16 17:40:37 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-02-18 14:29:39 +0000

    archivers/py-comicapi: Fix RAR and 7z Support
    
     1) The wrong dependencies were used for RAR. Fix unrar (incorrect) -> rar (correct)
     2) Apply patch to fix 7z file reader
    
    PR:             284549
    MFH:            2025Q1
    (cherry picked from commit 0378893424231ecb3411ffa615254345aeee17a9)
---
 archivers/py-comicapi/Makefile | 22 ++++++++++++++--------
 archivers/py-comicapi/distinfo |  4 +++-
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/archivers/py-comicapi/Makefile b/archivers/py-comicapi/Makefile
index 9a6e88ded594..9ec4950f590d 100644
--- a/archivers/py-comicapi/Makefile
+++ b/archivers/py-comicapi/Makefile
@@ -1,8 +1,12 @@
 PORTNAME=	comicapi
-PORTVERSION=	3.2.0
+DISTVERSION=	3.2.0
+PORTREVISION=	1
 CATEGORIES=	archivers python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_ACCOUNT}/commit/
+PATCHFILES=	956c383e5f133f3147f55f8f65b501db1c4a0284.patch:-p1
+
 MAINTAINER=	matthew@wener.org
 COMMENT=	Comic archive (cbr/cbz) and metadata utilities
 WWW=		https://github.com/comictagger/comicapi
@@ -10,6 +14,9 @@ WWW=		https://github.com/comictagger/comicapi
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}natsort>=0:devel/py-natsort@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \
@@ -17,14 +24,17 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-met
 		${PYTHON_PKGNAMEPREFIX}rapidfuzz>=0:devel/py-rapidfuzz@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}text2digits>=0:textproc/py-text2digits@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wordninja>=0:textproc/py-wordninja@${PY_FLAVOR}
+TEST_DEPENDS=	${7Z_RUN_DEPENDS} \
+		${CBR_RUN_DEPENDS}
 
 USES=		python
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	comictagger
 GH_TAGNAME=	2bf8332
-USE_PYTHON=	autoplist distutils pytest
+USE_PYTHON=	autoplist pep517 pytest
 
+MAKE_ENV=	SETUPTOOLS_SCM_PRETEND_VERSION=${DISTVERSION}
 TEST_ENV=	${MAKE_ENV} \
 		PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
@@ -37,13 +47,9 @@ OPTIONS_DEFAULT=	ICU
 CBR_DESC=	CBR
 ICU_DESC=	ICU
 
-7Z_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}py7zr>=0:archivers/py-py7zr@${PY_FLAVOR}
+7Z_RUN_DEPENDS=		${PYTHON_PKGNAMEPREFIX}py7zr>=0:archivers/py-py7zr@${PY_FLAVOR}
 CBR_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}rarfile>=0:archivers/py-rarfile@${PY_FLAVOR} \
-			unrar>=0:archivers/unrar
+			rar>=0:archivers/rar
 ICU_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyicu>=0:devel/py-pyicu@${PY_FLAVOR}
 
-# The two sorting tests may fail based on system locale
-do-test:
-	@cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v
-
 .include <bsd.port.mk>
diff --git a/archivers/py-comicapi/distinfo b/archivers/py-comicapi/distinfo
index 781ecf7d8b70..81ec55a2be51 100644
--- a/archivers/py-comicapi/distinfo
+++ b/archivers/py-comicapi/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1724809518
+TIMESTAMP = 1739727096
 SHA256 (comictagger-comicapi-3.2.0-2bf8332_GH0.tar.gz) = a96a0cdca8f5efc3337fe194f59b86e369e23d12e0fcec81e3c34b9e652c1f18
 SIZE (comictagger-comicapi-3.2.0-2bf8332_GH0.tar.gz) = 17401837
+SHA256 (956c383e5f133f3147f55f8f65b501db1c4a0284.patch) = 409d35e51f9bed2d391218f4f49d5b94c9eb3aa9c46b2f8c12ea30e7dd2013e0
+SIZE (956c383e5f133f3147f55f8f65b501db1c4a0284.patch) = 911