Files
2026-07-03 18:49:04 -04:00

86 lines
3.2 KiB
Tcl
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup python 1.0
name ocrmypdf
version 17.8.0
revision 0
categories textproc
homepage https://github.com/ocrmypdf/OCRmyPDF
maintainers {@akierig fastmail.de:akierig} openmaintainer
checksums rmd160 a11abdcb9fc1e36e0f5d6004ae22d61ce065a7a1 \
sha256 c36d9e53c93ef3c3fd41f283cffce20626ee39a7cc0ff4c2bf484a03634a114c \
size 7447248
description ${name} adds an OCR text layer to scanned PDF files, \
allowing them to be searched
long_description {*}${description}. ${name} also supports plugins \
that enable customization of its processing steps, \
and it is highly tolerant of PDFs containing scanned \
images and born digital content that doesnt require text recognition.
supported_archs noarch
platforms {darwin any}
license MPL-2
set pyvers {310 311 312 313 314}
foreach pyver $pyvers {
set pyconflicts [lmap v [ldelete $pyvers $pyver] {string cat python${v}}]
variant python${pyver} conflicts {*}$pyconflicts description "Use Python 3.[string range $pyver 1 end]" {}
if {[variant_isset python${pyver}]} {
python.default_version ${pyver}
set any_py_variant_set 1
}
}
if {![info exists any_py_variant_set]} {
default_variants +python314
python.default_version 314
}
python.pep517_backend hatch
depends_build-append \
port:py${python.version}-hatch-vcs
depends_lib-append port:img2pdf \
port:libpng \
port:qpdf \
port:py${python.version}-deprecation \
port:py${python.version}-fpdf2 \
port:py${python.version}-freetype \
port:py${python.version}-img2pdf \
port:py${python.version}-packaging \
port:py${python.version}-pluggy \
port:py${python.version}-pikepdf \
port:py${python.version}-pybind11 \
port:py${python.version}-pdfminer \
port:py${python.version}-Pillow \
port:py${python.version}-pydantic \
port:py${python.version}-pyheif \
port:py${python.version}-rich \
port:py${python.version}-uharfbuzz
depends_run-append port:ghostscript \
port:jbig2enc \
port:pngquant \
port:tesseract \
port:tesseract-eng \
port:unpaper
# Avoid rust on 10.7 and lower
if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx" && ${os.major} < 12} {
depends_run-delete \
port:pngquant
}
notes "
English support is enabled by default.
To enable support for other languages you will need to install corresponding tesseract language ports.
e.g., to add German support:
port install tesseract-deu"