New package: python3-ocrmypdf-16.10.1

This commit is contained in:
Mateusz Sylwestrzak 2025-03-16 14:41:18 +01:00 committed by classabbyamp
parent f634330008
commit 1d2ca75588
3 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,29 @@
--- a/src/ocrmypdf/_exec/tesseract.py 2025-02-27 00:16:18.000000000 +0100
+++ b/src/ocrmypdf/_exec/tesseract.py 2025-03-17 11:56:25.146770854 +0100
@@ -95,7 +95,7 @@
def version() -> Version:
- return TesseractVersion(get_version('tesseract', regex=r'tesseract\s(.+)'))
+ return TesseractVersion(get_version('tesseract-ocr', regex=r'tesseract\s(.+)'))
def has_thresholding() -> bool:
@@ -113,7 +113,7 @@
msg += output
return msg
- args_tess = ['tesseract', '--list-langs']
+ args_tess = ['tesseract-ocr', '--list-langs']
try:
proc = run(
args_tess,
@@ -135,7 +135,7 @@
def tess_base_args(langs: list[str], engine_mode: int | None) -> list[str]:
- args = ['tesseract']
+ args = ['tesseract-ocr']
if langs:
args.extend(['-l', '+'.join(langs)])
if engine_mode is not None:

View file

@ -0,0 +1,22 @@
--- a/pyproject.toml 2025-02-27 00:16:18.000000000 +0100
+++ b/pyproject.toml 2025-03-17 15:20:09.011808694 +0100
@@ -16,7 +16,7 @@
"img2pdf>=0.5",
"packaging>=20",
"pdfminer.six>=20220319",
- "pi-heif", # Heif image format - maintainers: if this is removed, it will NOT break
+ "pillow-heif", # Heif image format - maintainers: if this is removed, it will NOT break
"pikepdf>=8.10.1",
"Pillow>=10.0.1",
"pluggy>=1",
--- a/src/ocrmypdf/_pipeline.py 2025-02-27 00:16:18.000000000 +0100
+++ b/src/ocrmypdf/_pipeline.py 2025-03-17 15:21:10.155848376 +0100
@@ -42,7 +42,7 @@
from ocrmypdf.pluginspec import OrientationConfidence
try:
- from pi_heif import register_heif_opener
+ from pillow_heif import register_heif_opener
except ImportError:
def register_heif_opener():

View file

@ -0,0 +1,15 @@
# Template file for 'python3-ocrmypdf'
pkgname=python3-ocrmypdf
version=16.10.1
revision=1
build_style=python3-pep517
hostmakedepends="hatchling hatch-vcs"
depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
python3-pillow_heif tesseract-ocr ghostscript unpaper pngquant jbig2enc qpdf"
short_desc="Add OCR text layer to scanned PDF files"
maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
license="MPL-2.0"
homepage="https://github.com/ocrmypdf/OCRmyPDF"
distfiles="${PYPI_SITE}/o/ocrmypdf/ocrmypdf-${version}.tar.gz"
checksum=9f32059fc97e25931aaa0a8a4027b8c9faca7d9e1183089f32e0cba5631449f1