You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
86 lines
3.2 KiB
Tcl
86 lines
3.2 KiB
Tcl
# -*- 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 doesn’t 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"
|