diff --git a/textproc/py-pdf2docx/Makefile b/textproc/py-pdf2docx/Makefile index a4c178b84e4e..617c374d288e 100644 --- a/textproc/py-pdf2docx/Makefile +++ b/textproc/py-pdf2docx/Makefile @@ -1,30 +1,32 @@ PORTNAME= pdf2docx -DISTVERSION= 0.5.8 -PORTREVISION= 4 +DISTVERSION= 0.5.13 CATEGORIES= textproc python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Library and applicaton to convert pdf to docx WWW= https://github.com/dothinking/pdf2docx LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fire>=0.3.0:devel/py-fire@${PY_FLAVOR} \ +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fire>=0.3.0:devel/py-fire@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pymupdf>=1.19.0:print/py-PyMuPDF@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}fonttools>=4.24.0:print/py-fonttools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}python-docx>=0.8.10:textproc/py-python-docx@${PY_FLAVOR} \ opencv>0:graphics/opencv -BUILD_DEPENDS= ${PY_DEPENDS} \ - ${PYTHON_PKGNAMEPREFIX}pip>0:devel/py-pip@${PY_FLAVOR} -RUN_DEPENDS= ${PY_DEPENDS} USES= python -USE_PYTHON= distutils concurrent autoplist pytest # 2 tests fail, see https://github.com/ArtifexSoftware/pdf2docx/issues/276 +USE_PYTHON= pep517 concurrent autoplist pytest # ruff tests skipped, see https://github.com/ArtifexSoftware/pdf2docx/issues/276 NO_ARCH= yes +MAKE_ENV+= PDF2DOCX_VERSION=${DISTVERSION} + +# tests as of 0.5.13: 2 passed, 2 warnings in 24.16s + .include diff --git a/textproc/py-pdf2docx/distinfo b/textproc/py-pdf2docx/distinfo index f04c46904bc3..f110472f5897 100644 --- a/textproc/py-pdf2docx/distinfo +++ b/textproc/py-pdf2docx/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1710371234 -SHA256 (pdf2docx-0.5.8.tar.gz) = e723f639728193468602b69eade2fe62df5f5d339d2630228e325f4cc61c1918 -SIZE (pdf2docx-0.5.8.tar.gz) = 3566987 +TIMESTAMP = 1788718669 +SHA256 (pdf2docx-0.5.13.tar.gz) = 75eff485d4fdcd28237783a65c1bc5e9eaf9fbc747fcacee6c5c16c8ffa7a6a9 +SIZE (pdf2docx-0.5.13.tar.gz) = 18315032 diff --git a/textproc/py-pdf2docx/files/patch-setup.py b/textproc/py-pdf2docx/files/patch-setup.py new file mode 100644 index 000000000000..2a648f83cad2 --- /dev/null +++ b/textproc/py-pdf2docx/files/patch-setup.py @@ -0,0 +1,14 @@ +-- The sdist does not ship version.txt; setup.py then falls back to a stale +-- 0.5.6a1 version. Use an environment variable supplied by the port so the +-- produced wheel matches DISTVERSION. + +--- setup.py.orig 2026-05-01 03:54:00 UTC ++++ setup.py +@@ -37,7 +37,7 @@ + setup( + name="pdf2docx", +- version=get_version("version.txt"), ++ version=os.environ.get("PDF2DOCX_VERSION", get_version("version.txt")), + keywords=["pdf-to-word", "pdf-to-docx"], + description=DESCRIPTION, + long_description=load_long_description("README.md"),