From nobody Sat Jun 15 09:24:48 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W1W283Tprz5NRkF; Sat, 15 Jun 2024 09:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W1W282k8Yz4pcj; Sat, 15 Jun 2024 09:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718443488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l+k9/FRj2nBia8GhSHfmpKlVReR/uutscY1F2UfYVCQ=; b=k2+t9Hyjj1Uepp4/NF6N3NCRIOjiXWqN8cXFAEsB1JVqG2gHjEknqQ+Ho4/bxqDa93LR/Z QuQjrpe5Mem7GxJHrUyrKHGYOt/y8xzGsReO8R5Y7FZhVMFsTMCZP5MINzMpvAw+VjqJ1y aXv+ma81wkQo2yK+qgyCLtYP8olF6IdyYs4EKx9MXvNv3QHEad2pNZFcbYO3z7FAhVfhHm zKZLb8ON+/R+a9bloT0r9992WcglGaABXoW4e2WPITq+4blNv/qXqiK8epWpfQ8pOh2mhJ 4AdBEnniaKl7RInZB+U9R4muy6UU2Gz3AZX4d0ir8IM6F8qBgqioiFEWw8tfUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718443488; a=rsa-sha256; cv=none; b=fFNP+LopfyN7791yJ76oi5/71j+uKfpe84BxxQA0i7I3w7hzL0kNhDjjkzCud3+vpswYk8 nCNkXN7wQqxTVUfiB9XZS4POQkP7vKBRHT0e05l9BmaUMhn+noxT8DovRUoJujtu6Ay3hF 6x9qQUFnf8JaiwIeP/OnvgvpBnaqEZZmBgINIM5cJ2fSSN4a/PscIBDzgfuJL/AIYb+zTp YmGqOd3F2nXcSjv40NOqoc0+H2P8XUgppZAFY8kPZ1YG8n+Py0OFnceqCFRFNJQyES+Zkk mjNNajXTmywE4oukQhvgAf/ngkPlS97lYuLjM6FNOBXDxuV0e8xvMyGgfv0Wxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718443488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l+k9/FRj2nBia8GhSHfmpKlVReR/uutscY1F2UfYVCQ=; b=dRjuq380AMJ6HMNME2QzKCQV17oCfAp4ctdCOz0g4ZvIG56lqVs4XOJlugWZOEI/7qBMLj tpf4INZqKPi9zOp09g3LfbxNgposPQ4Nzel1U4NS6dEZQf5iQ8v10llK1oiKUg0T4syXQ8 T9ukRqFncEE1gXaAhvROzsTqZoUxuztemwxE12/IVWfxW+t/nv9OhNm9tVkLN1LljvGbao 1lYF+mKWrFe72REmEOBDQS8qqZNkW2OxZbKxsbMgySimnRz1tr33qc67z64U0XogU/wiyW 7cy1lQFlBz4SxJbLJ5Ih5yMr4SHJ2Ef1tD6Dd1YfBGMHP8b38kS+f3ROmYsimg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W1W282K6hzyKT; Sat, 15 Jun 2024 09:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45F9Omsc010199; Sat, 15 Jun 2024 09:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45F9OmHZ010196; Sat, 15 Jun 2024 09:24:48 GMT (envelope-from git) Date: Sat, 15 Jun 2024 09:24:48 GMT Message-Id: <202406150924.45F9OmHZ010196@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kai Knoblich Subject: git: 2e06ecfc9b70 - main - textproc/py-ocrmypdf: Update to 16.3.1 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kai X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e06ecfc9b702b69b996924e209f270cb5432a23 Auto-Submitted: auto-generated The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=2e06ecfc9b702b69b996924e209f270cb5432a23 commit 2e06ecfc9b702b69b996924e209f270cb5432a23 Author: Kai Knoblich AuthorDate: 2024-06-15 09:21:21 +0000 Commit: Kai Knoblich CommitDate: 2024-06-15 09:23:34 +0000 textproc/py-ocrmypdf: Update to 16.3.1 * Add a workaround to fallback to graphics/py-pillow-heif if the pi_heif module isn't available to enable support for converting HEIF/HEIC images. * Remove no longer needed requirements/workarounds while I'm here, as OCRmyPDF requires at least Python 3.10 or newer since version 16.x. Changelog since 15.4.4: https://github.com/ocrmypdf/OCRmyPDF/blob/v16.3.1/docs/release_notes.rst PR: 276310 Reported by: wen Co-Authored by: wen (initial patch for 16.0.4) MFH: No (2024Q4 has Python 3.9 as default) --- textproc/py-ocrmypdf/Makefile | 26 +++++++++------------- textproc/py-ocrmypdf/distinfo | 6 ++--- textproc/py-ocrmypdf/files/patch-pyproject.toml | 13 ----------- .../files/patch-src_ocrmypdf___pipeline.py | 19 ++++++++++++++++ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/textproc/py-ocrmypdf/Makefile b/textproc/py-ocrmypdf/Makefile index 8d565357c464..42484c49e6bc 100644 --- a/textproc/py-ocrmypdf/Makefile +++ b/textproc/py-ocrmypdf/Makefile @@ -1,5 +1,5 @@ PORTNAME= ocrmypdf -DISTVERSION= 15.4.4 +DISTVERSION= 16.3.1 CATEGORIES= textproc python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,23 +12,24 @@ LICENSE= MPL20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PY_SETUPTOOLS} \ - ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=7.0.5:devel/py-setuptools-scm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}deprecation>=2.1.0:devel/py-deprecation@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}img2pdf>=0.4.4:graphics/py-img2pdf@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}img2pdf>=0.5:graphics/py-img2pdf@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=20:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pillow>=10.0.1:graphics/py-pillow@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}reportlab>=3.6.8:print/py-reportlab@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow-heif>0:graphics/py-pillow-heif@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}rich>=13:textproc/py-rich@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pdfminer.six>=20220319:textproc/py-pdfminer.six@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pikepdf>=8.7.1:textproc/py-pikepdf@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pluggy>=0.13.0:devel/py-pluggy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pikepdf>=8.10.1:textproc/py-pikepdf@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pluggy>=1:devel/py-pluggy@${PY_FLAVOR} \ tesseract:graphics/tesseract TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>=6.36.0:devel/py-hypothesis@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=2.5.0:devel/py-pytest-xdist@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}python-xmp-toolkit>=2.0.1:textproc/py-python-xmp-toolkit@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}python-xmp-toolkit>=2.0.1:textproc/py-python-xmp-toolkit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}reportlab>=3.6.8:print/py-reportlab@${PY_FLAVOR} \ -USES= ghostscript:run python:3.9+ shebangfix +USES= ghostscript:run python:3.10+ shebangfix USE_PYTHON= autoplist concurrent pep517 pytest # Skip some checks as they yield wrong results if run with the root account PYTEST_IGNORED_TESTS= test_chmod \ @@ -36,7 +37,6 @@ PYTEST_IGNORED_TESTS= test_chmod \ test_malformed_docinfo # leads to an internal pytest error SHEBANG_FILES= src/ocrmypdf/__main__.py \ - src/ocrmypdf/hocrtransform.py \ src/ocrmypdf/pdfinfo/__init__.py TEST_ARGS= -n ${MAKE_JOBS_NUMBER} @@ -55,16 +55,10 @@ UNPAPER_DESC= Deskew and clean up pages before OCR processing PNGQUANT_RUN_DEPENDS= pngquant:graphics/pngquant UNPAPER_RUN_DEPENDS= unpaper:graphics/unpaper -.include - -.if ${PYTHON_REL} < 31000 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4:devel/py-typing-extensions@${PY_FLAVOR} -.endif - post-install: # Install shell completion files @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/ ${INSTALL_DATA} ${WRKSRC}/misc/completion/ocrmypdf.bash ${STAGEDIR}${PREFIX}/etc/bash_completion.d/ ${INSTALL_DATA} ${WRKSRC}/misc/completion/ocrmypdf.fish ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/ -.include +.include diff --git a/textproc/py-ocrmypdf/distinfo b/textproc/py-ocrmypdf/distinfo index 32f10c6ebfa3..7d40ae109684 100644 --- a/textproc/py-ocrmypdf/distinfo +++ b/textproc/py-ocrmypdf/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1703856711 -SHA256 (ocrmypdf-15.4.4.tar.gz) = 4696c81cc5b5d64f31ccfe685d10baeb69b42bb0974acddf292d8cf9d97605c3 -SIZE (ocrmypdf-15.4.4.tar.gz) = 6682828 +TIMESTAMP = 1718275162 +SHA256 (ocrmypdf-16.3.1.tar.gz) = 6f872acada73757588f1d1d94f76474166addedc7d72b07faa9101be074bf590 +SIZE (ocrmypdf-16.3.1.tar.gz) = 6722272 diff --git a/textproc/py-ocrmypdf/files/patch-pyproject.toml b/textproc/py-ocrmypdf/files/patch-pyproject.toml deleted file mode 100644 index 2bec0c44995f..000000000000 --- a/textproc/py-ocrmypdf/files/patch-pyproject.toml +++ /dev/null @@ -1,13 +0,0 @@ -Allow build with older versions of devel/py-setuptools_scm . - ---- pyproject.toml.orig 2023-10-04 08:20:36 UTC -+++ pyproject.toml -@@ -1,7 +1,7 @@ - # SPDX-FileCopyrightText: 2022 James R. Barlow - # SPDX-License-Identifier: MPL-2.0 - [build-system] --requires = ["setuptools >= 61", "setuptools_scm[toml] >= 7.0.5", "wheel"] -+requires = ["setuptools >= 61", "setuptools_scm[toml]", "wheel"] - build-backend = "setuptools.build_meta" - - [project] diff --git a/textproc/py-ocrmypdf/files/patch-src_ocrmypdf___pipeline.py b/textproc/py-ocrmypdf/files/patch-src_ocrmypdf___pipeline.py new file mode 100644 index 000000000000..4e6d39914ddb --- /dev/null +++ b/textproc/py-ocrmypdf/files/patch-src_ocrmypdf___pipeline.py @@ -0,0 +1,19 @@ +Fallback to pillow_heif if pi_heif is not present. + +--- src/ocrmypdf/_pipeline.py.orig 2024-06-15 08:09:59 UTC ++++ src/ocrmypdf/_pipeline.py +@@ -45,8 +45,12 @@ except ImportError: + from pi_heif import register_heif_opener + except ImportError: + +- def register_heif_opener(): +- pass ++ try: ++ from pillow_heif import register_heif_opener ++ except ImportError: ++ ++ def register_heif_opener(): ++ pass + + + T = TypeVar("T")