py-ocrmypdfAdds an OCR text layer to scanned PDF files
16.11.1textprocΣ=1 16.11.1Version of this port present on the latest quarterly branch.upstream: 16.13.0A newer version was found upstream by portscout, first on 2025-12-25.
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be
searched or copy-pasted.
Main features:
* Generates a searchable PDF/A file from a regular PDF
* Places OCR text accurately below the image to ease copy / paste
* Keeps the exact resolution of the original embedded images
* When possible, inserts OCR information as a "lossless" operation without
disrupting any other content
* Optimizes PDF images, often producing files smaller than the input file
* If requested deskews and/or cleans the image before performing OCR
* Validates input and output files
* Distributes work across all available CPU cores
* Uses Tesseract OCR engine to recognize more than 100 languages
* Scales properly to handle files with thousands of pages
* Battle-tested on millions of PDFs
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py311-ocrmypdf listed in the above command, you can pick from the names under the Packages section.
===> The following configuration options are available for py311-ocrmypdf-16.11.1:
PNGQUANT=on: Optimizes the encoding of PNG-style images in PDFs
UNPAPER=on: Deskew and clean up pages before OCR processing
===> Use 'make config' to modify these settings
textproc/py-ocrmypdf: Update to 16.11.1
Backport a workaround for JPEG encoding issues with Ghostscript 10.6.0.
There's already release 16.12.0, but it requires py-pikepdf 10.0.1 as a
minimum which isn't present in the ports tree, yet.
Changelog:
https://github.com/ocrmypdf/OCRmyPDF/blob/v16.11.1/docs/release_notes.md
MFH: 2025Q4
*: Revise USES=python:... version range constraints
and strip all lower bounds of 3.9 or 3.10 because they are implied now.
python:3.9-X -> python:-X
python:3.9+ -> python
python:3.10-X -> python:-X
python:3.10+ -> python
(options such as ,build preserved)
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)
devel/py-setuptools-scm: update to 8.0.4
Directory and PORTNAME changed to match normalised name in release
tarball; consumers updated to match.
Although setuptools itself is specified as a run dependency in the
Python package metadata, it is currently left out here to prevent
environment pollution until at least PR 270510 is committed.
Additionally, this version of setuptools-scm requires setuptools>=61,
which means this version is only meant for USE_PYTHON=pep517 ports
as all USE_PYTHON=distutils ports will switch to devel/py-setuptools58
also after PR 270510. science/py-emmet-core is switched to
devel/py-setuptools_scm7 accordingly, as it specifies setuptools-scm<8.
devel/py-{flit-scm,hatch-vcs} have ${PY_SETUPTOOLS} added to
RUN_DEPENDS to compensate.
Further details: https://wiki.freebsd.org/Python/setuptools
Reported by: yuri
Co-authored by: matthew
Exp-run by: antoine (earlier iteration)
Approved by: yuri (science/py-emmet-core, previous iteration)
PR: 272134
Differential Revision: https://reviews.freebsd.org/D39288
textproc/py-ocrmypdf: Update to 15.4.4
* Note: The 16.x series has already been released recently, but here
Python 3.10 is required as a minimum.
Thus, use the last release of the 15.x series until the default Python
version in the FreeBSD ports tree has been changed to 3.10 or later.
Changelog since 15.4.0:
https://github.com/ocrmypdf/OCRmyPDF/blob/v15.4.4/docs/release_notes.rst
devel/py-setuptools: convert individual consumers to ${PY_SETUPTOOLS}
Currently a no-op, but in the future outputs the correct setuptools
port depending on whether USES_PYTHON=distutils is specified.
With hat: python
PR: 270510, 270358
all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.
Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.
finance/quickfix: mark BROKEN with PYTHON
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++
-DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable
-Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi
-Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings
-Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x
-MT _quickfix_la-QuickfixPython.lo -MD -MP -MF
.deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o
.libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
^~~~~~~~~~
1 warning and 1 error generated.
Reviewed by: portmgr, vishwin, yuri
Differential Revision: <https://reviews.freebsd.org/D40568>
textproc/py-ocrmypdf: Update to 13.7.0
There is already a new major release (= 14.x) out, but the build system
has been changed here, which therefore takes a little more time to
implement. So use the last release of the 13.x series for a while.
Changelog since 13.6.0:
https://github.com/ocrmypdf/OCRmyPDF/blob/v13.7.0/docs/release_notes.rst
MFH: 2022Q4
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
textproc/py-ocrmypdf: Update to 9.0.5
* Remove the workaround that coped with the files that were generated in the
CFFI out-of-line ABI mode (through devel/py-cffi) as they are now captured
correctly during the installation process.
Changelog since 9.0.3:
https://github.com/jbarlow83/OCRmyPDF/blob/v9.0.5/docs/release_notes.rst
MFH: 2019Q4
textproc/py-ocrmypdf: Update to 9.0.1
* Make the dependency for graphics/pngquant optional as pngquant is not
strictly required but should be provided where possible.
* Set the new option as non-default for a while because there's a bug that
leads to incorrect inverted PNG images in conjunction with pngquant.
* Install shell auto-completions to improve user experience.
* Remove the "slow" tests from the "do-test" target. There's very little
point to run those at downstream.
Changelog since 8.3.2:
https://github.com/jbarlow83/OCRmyPDF/blob/v9.0.1/docs/release_notes.rst
textproc/py-ocrmypdf: Use defined locale in whole build process
* Set the locale globally for {CONFIGURE,MAKE}_ENV so that the locale
doesn't need to be set explicitly for the do-test target.
* Use ECHO_CMD instead of ECHO as the latter one is already defined in
/usr/share/mk/sys.mk, which can either be "echo" or "true" if the make
flag -s is given.
Suggested by: sunpoet
textproc/py-ocrmypdf: Apply workaround for missing files a bit earlier
* The post-stage target runs very late in the install process and should be
only used if the post-install target ran too early.
Thus place the workaround that copes with the missing files to the
post-install target where it fits better.
Suggested by: mat
New port: textproc/py-ocrmypdf
OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be
searched or copy-pasted.
Main features:
* Generates a searchable PDF/A file from a regular PDF
* Places OCR text accurately below the image to ease copy / paste
* Keeps the exact resolution of the original embedded images
* When possible, inserts OCR information as a "lossless" operation without
disrupting any other content
* Optimizes PDF images, often producing files smaller than the input file
* If requested deskews and/or cleans the image before performing OCR
* Validates input and output files
* Distributes work across all available CPU cores
* Uses Tesseract OCR engine to recognize more than 100 languages
* Scales properly to handle files with thousands of pages
* Battle-tested on millions of PDFs
WWW: https://github.com/jbarlow83/OCRmyPDF
Reviewed by: 0mp, koobs
Differential Revision: https://reviews.freebsd.org/D20927