Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: python3-ocrmypdf-16.10.0
@ 2025-03-16 14:09 slymattz
  2025-03-16 14:25 ` [PR PATCH] [Updated] " slymattz
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 14:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]

There is a new pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**: it does what it's supposed to, i.e. OCR on PDFs.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 3863 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/2] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 1e7ea6a0215a46136736fe11c26b049fb456bb56 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/2] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..480c9aa689b9ad
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,29 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatchling hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-rich tesseract-ocr
+ ghostscript unpaper"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^[[:space:]]*"pi-heif"/d'
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
@ 2025-03-16 14:25 ` slymattz
  2025-03-16 16:49 ` slymattz
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**: it does what it's supposed to, i.e. OCR on PDFs.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 3919 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/2] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 52aa31dd055e6fc99b3f1d3a7938fb2b70b471f3 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/2] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..cbe06c845f3b4b
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,30 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-rich tesseract-ocr
+ ghostscript unpaper"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+nocross=yes # ERROR Backend 'hatchling.build' is not available.
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^[[:space:]]*"pi-heif"/d'
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
  2025-03-16 14:25 ` [PR PATCH] [Updated] " slymattz
@ 2025-03-16 16:49 ` slymattz
  2025-03-16 16:54 ` slymattz
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 16:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**: it does what it's supposed to, i.e. OCR on PDFs.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 4230 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/2] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 52c4780372f3f43762f722383fa3439f8a2de84d Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/2] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 39 +++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..6c75bc8d1e7587
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,39 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-rich tesseract-ocr
+ ghostscript unpaper"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^\s*"pi-heif"/d'
+
+	# ERROR Backend 'hatchling.build' is not available.
+	# let's then remove this automatic versioning tool and rely on a manual entry
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i pyproject.toml \
+			-e 's/^\s*requires\s*=\s*\[.*\]/requires = []/' \
+			-e '/^\s*build-backend\s*=\s*"hatchling\.build"/d' \
+			-e "s/dynamic = \[\"version\"\]/version = \"${version}\"/"
+	else
+		makedepends+=" hatch-vcs"
+	fi
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
  2025-03-16 14:25 ` [PR PATCH] [Updated] " slymattz
  2025-03-16 16:49 ` slymattz
@ 2025-03-16 16:54 ` slymattz
  2025-03-16 17:07 ` slymattz
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 16:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**: it does what it's supposed to, i.e. OCR on PDFs.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 4219 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/2] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From dca83261cb85b4f34112fd69d897d8984da5d76b Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/2] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..e39e73aa098dc9
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,38 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-rich tesseract-ocr
+ ghostscript unpaper"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^\s*"pi-heif"/d'
+
+	# ERROR Backend 'hatchling.build' is not available.
+	# let's then remove this automatic versioning tool and rely on a manual entry
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i pyproject.toml \
+			-e 's/^\s*requires\s*=\s*\[.*\]/requires = []/' \
+			-e '/^\s*build-backend\s*=\s*"hatchling\.build"/d' \
+			-e "s/dynamic = \[\"version\"\]/version = \"${version}\"/"
+	fi
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (2 preceding siblings ...)
  2025-03-16 16:54 ` slymattz
@ 2025-03-16 17:07 ` slymattz
  2025-03-16 20:01 ` slymattz
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 17:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**: it does what it's supposed to, i.e. OCR on PDFs.

EDIT: I somehow managed to get it compiled and packaged for cross-builds by not relying on dynamic versioning provided by _hatch-vcs_.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 4213 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/2] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 5336a1d374f706bf9a66504b06aa6d7bb752a17f Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/2] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..f51d5b9657b79d
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,38 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-rich tesseract-ocr
+ ghostscript unpaper"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^\s*"pi-heif"/d'
+
+	# ERROR Backend 'hatchling.build' is not available.
+	# let's then remove this automatic versioning tool and rely on a manual entry
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i pyproject.toml \
+			-e 's/\["hatchling",\s*"hatch-vcs"\]/[]/' \
+			-e '/^\s*build-backend\s*=\s*"hatchling\.build"/d' \
+			-e "s/dynamic = \[\"version\"\]/version = \"${version}\"/"
+	fi
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (3 preceding siblings ...)
  2025-03-16 17:07 ` slymattz
@ 2025-03-16 20:01 ` slymattz
  2025-03-16 20:42 ` slymattz
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 20:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

EDIT: I somehow managed to get it compiled and packaged for cross-builds by not relying on dynamic versioning provided by _hatch-vcs_.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 4240 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/2] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 2c309188f7045b76859915715ab5da21580babc3 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/2] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..4955c438dc7d15
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,38 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
+ tesseract-ocr ghostscript unpaper pngquant"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^\s*"pi-heif"/d'
+
+	# ERROR Backend 'hatchling.build' is not available.
+	# let's then remove this automatic versioning tool and rely on a manual entry
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i pyproject.toml \
+			-e 's/\["hatchling",\s*"hatch-vcs"\]/[]/' \
+			-e '/^\s*build-backend\s*=\s*"hatchling\.build"/d' \
+			-e "s/dynamic = \[\"version\"\]/version = \"${version}\"/"
+	fi
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (4 preceding siblings ...)
  2025-03-16 20:01 ` slymattz
@ 2025-03-16 20:42 ` slymattz
  2025-03-16 20:43 ` slymattz
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 20:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

EDIT: I somehow managed to get it compiled and packaged for cross-builds by not relying on dynamic versioning provided by _hatch-vcs_.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 5825 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 2c309188f7045b76859915715ab5da21580babc3 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..4955c438dc7d15
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,38 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
+ tesseract-ocr ghostscript unpaper pngquant"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^\s*"pi-heif"/d'
+
+	# ERROR Backend 'hatchling.build' is not available.
+	# let's then remove this automatic versioning tool and rely on a manual entry
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i pyproject.toml \
+			-e 's/\["hatchling",\s*"hatch-vcs"\]/[]/' \
+			-e '/^\s*build-backend\s*=\s*"hatchling\.build"/d' \
+			-e "s/dynamic = \[\"version\"\]/version = \"${version}\"/"
+	fi
+}

From d659a54cfa1f5dfe5200fe685ca800708270605f Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (5 preceding siblings ...)
  2025-03-16 20:42 ` slymattz
@ 2025-03-16 20:43 ` slymattz
  2025-03-17 10:34 ` [PR REVIEW] " ahesford
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-16 20:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

EDIT: I somehow managed to get it compiled and packaged for cross-builds by not relying on dynamic versioning provided by _hatch-vcs_.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 5834 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 97cd6b353538c6ed15dab414ca00431c4b9cd8d8 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 srcpkgs/python3-ocrmypdf/template | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..cca88744a4b2f7
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,38 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core"
+makedepends="hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
+ tesseract-ocr ghostscript unpaper pngquant jbig2enc"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e
+
+post_patch() {
+	# point to tesseract-ocr binary found in PATH
+	vsed -i src/ocrmypdf/_exec/tesseract.py \
+		-e "s|return TesseractVersion(get_version('tesseract'|return TesseractVersion(get_version('tesseract-ocr'|g" \
+		-e "s|\['tesseract'|\['tesseract-ocr'|g"
+}
+
+pre_configure() {
+	# this is an optional dep
+	vsed -i pyproject.toml \
+		-e '/^\s*"pi-heif"/d'
+
+	# ERROR Backend 'hatchling.build' is not available.
+	# let's then remove this automatic versioning tool and rely on a manual entry
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i pyproject.toml \
+			-e 's/\["hatchling",\s*"hatch-vcs"\]/[]/' \
+			-e '/^\s*build-backend\s*=\s*"hatchling\.build"/d' \
+			-e "s/dynamic = \[\"version\"\]/version = \"${version}\"/"
+	fi
+}

From c33088956c22dac6cd25119d4102a44e4873c633 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (8 preceding siblings ...)
  2025-03-17 10:34 ` ahesford
@ 2025-03-17 10:34 ` ahesford
  2025-03-17 11:09 ` [PR PATCH] [Updated] " slymattz
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: ahesford @ 2025-03-17 10:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998431662

Comment:
Don't use `vsed` for static patching. Use a proper patch file.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (7 preceding siblings ...)
  2025-03-17 10:34 ` [PR REVIEW] " ahesford
@ 2025-03-17 10:34 ` ahesford
  2025-03-17 10:34 ` ahesford
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: ahesford @ 2025-03-17 10:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998448005

Comment:
This is probably a consequence of putting the hatch build dependency in the wrong place. It belongs in `hostmakedepends`.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (6 preceding siblings ...)
  2025-03-16 20:43 ` slymattz
@ 2025-03-17 10:34 ` ahesford
  2025-03-17 10:34 ` ahesford
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: ahesford @ 2025-03-17 10:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998445819

Comment:
Get upstream to list optional dependencies as such. Python package builders and xbps-src enforce dependencies for a reason: the only reliable way to determine if a program has everything it needs is by honoring the metadata. 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (9 preceding siblings ...)
  2025-03-17 10:34 ` ahesford
@ 2025-03-17 11:09 ` slymattz
  2025-03-17 11:14 ` slymattz
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 11:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc

[ci skip]



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 6465 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From d687ffc9777a85cdcb95fb7cf75651dc215fa769 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..af1119353fa3ef
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core hatchling
+ hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
+ python3-pi-heif tesseract-ocr ghostscript unpaper pngquant jbig2enc"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From dd8c403c47385d736191e1fc934139228aa61f7d Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (10 preceding siblings ...)
  2025-03-17 11:09 ` [PR PATCH] [Updated] " slymattz
@ 2025-03-17 11:14 ` slymattz
  2025-03-17 11:51 ` slymattz
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 11:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc




A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 6469 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From baa9ce142f695c6c7bf94ba84023f75c93af8a18 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..2d08717553a68e
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core 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"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From 07ae71f9608d92e010ee76b073de6bb9ed901090 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (11 preceding siblings ...)
  2025-03-17 11:14 ` slymattz
@ 2025-03-17 11:51 ` slymattz
  2025-03-17 12:05 ` slymattz
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 11:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc

[ci skip]


A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 6465 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From c1b53b997d4e314ec774859d65683692f1550560 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..c877b12467f4e3
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core hatchling
+ hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
+ python3-pi_heif tesseract-ocr ghostscript unpaper pngquant jbig2enc"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From 47171b5ce41e54efc5ab8a2f16b9a6b17df2be78 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (12 preceding siblings ...)
  2025-03-17 11:51 ` slymattz
@ 2025-03-17 12:05 ` slymattz
  2025-03-17 13:48 ` [PR REVIEW] " classabbyamp
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 12:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc




A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 7744 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/4] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From c1b53b997d4e314ec774859d65683692f1550560 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/4] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..c877b12467f4e3
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core hatchling
+ hatch-vcs"
+depends="python3-deprecation img2pdf python3-packaging python3-pdfminer.six
+ python3-pikepdf python3-Pillow python3-pluggy python3-reportlab python3-rich
+ python3-pi_heif tesseract-ocr ghostscript unpaper pngquant jbig2enc"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From 47171b5ce41e54efc5ab8a2f16b9a6b17df2be78 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/4] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

From 7a92e90fc9de7037420cbb03cd568b74069ea2b4 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 17 Mar 2025 13:04:41 +0100
Subject: [PATCH 4/4] New package: python3-pi_heif-0.22.0

---
 srcpkgs/python3-pi_heif/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-pi_heif/template

diff --git a/srcpkgs/python3-pi_heif/template b/srcpkgs/python3-pi_heif/template
new file mode 100644
index 00000000000000..722af9b0c3454c
--- /dev/null
+++ b/srcpkgs/python3-pi_heif/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-pi_heif'
+pkgname=python3-pi_heif
+version=0.22.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+makedepends="libheif-devel python3-devel"
+depends="python3-Pillow"
+short_desc="Light version of Pillow-Heif that includes only HEIF decoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://github.com/bigcat88/pillow_heif"
+changelog="https://raw.githubusercontent.com/bigcat88/pillow_heif/master/CHANGELOG.md"
+distfiles="${PYPI_SITE}/p/pi_heif/pi_heif-${version}.tar.gz"
+checksum=489ddda3c9fed948715a9c8642c6ee24c3b438a7fbf85b3a8f097d632d7082a8
+
+post_install() {
+	vlicense LICENSE.txt
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (13 preceding siblings ...)
  2025-03-17 12:05 ` slymattz
@ 2025-03-17 13:48 ` classabbyamp
  2025-03-17 13:57 ` slymattz
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: classabbyamp @ 2025-03-17 13:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998771839

Comment:
is this really necessary when we already have the full pillow heif?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (14 preceding siblings ...)
  2025-03-17 13:48 ` [PR REVIEW] " classabbyamp
@ 2025-03-17 13:57 ` slymattz
  2025-03-17 14:03 ` slymattz
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 13:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998793901

Comment:
Thanks for your input. I had this dilemma and I was leaning towards not providing this as a new package, but decided not to mess with pyproject.toml and besides I didn't dig deep into how these two get imported/aliased in the code. I'll look into this and once I'm sure it works fine, I'll drop the pi_heif commit.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (15 preceding siblings ...)
  2025-03-17 13:57 ` slymattz
@ 2025-03-17 14:03 ` slymattz
  2025-03-17 14:15 ` slymattz
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 14:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998806923

Comment:
```
xbps-query -f python3-ocrmypdf | xargs grep -i "heif"
/usr/lib/python3.13/site-packages/ocrmypdf/_pipeline.py:    from pi_heif import register_heif_opener
/usr/lib/python3.13/site-packages/ocrmypdf/_pipeline.py:    def register_heif_opener():
/usr/lib/python3.13/site-packages/ocrmypdf/_pipeline.py:register_heif_opener()
/usr/lib/python3.13/site-packages/ocrmypdf-16.10.0.dist-info/METADATA:Requires-Dist: pi-heif
```
Do you think changing `from pi_heif` to `from pillow_heif` should do the trick?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (16 preceding siblings ...)
  2025-03-17 14:03 ` slymattz
@ 2025-03-17 14:15 ` slymattz
  2025-03-17 14:25 ` classabbyamp
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 14:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998833878

Comment:
Just tested it and it does the trick (w/out the full-fledged pillow_heif package, it errors out but once it is installed it works fine on a heif image.) @classabbyamp my question is: should I provide two static patches for 1) _pipeline.py and 2) pyproject.toml or should I use vsed?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (17 preceding siblings ...)
  2025-03-17 14:15 ` slymattz
@ 2025-03-17 14:25 ` classabbyamp
  2025-03-17 14:25 ` [PR PATCH] [Updated] " slymattz
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: classabbyamp @ 2025-03-17 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

New review comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998858992

Comment:
one patch

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (18 preceding siblings ...)
  2025-03-17 14:25 ` classabbyamp
@ 2025-03-17 14:25 ` slymattz
  2025-03-17 14:33 ` [PR REVIEW] " slymattz
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 7820 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 25e6384c88b1023e95d5c32c514c8f15f43278d2 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 .../use_pillow_heif_instead_of_pi_heif.patch  | 22 ++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
new file mode 100644
index 00000000000000..eb2a358f389e70
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
@@ -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():
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..2d08717553a68e
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core 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"
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From 13655d17f3b138dd83d922204d3df147e26d6b80 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (19 preceding siblings ...)
  2025-03-17 14:25 ` [PR PATCH] [Updated] " slymattz
@ 2025-03-17 14:33 ` slymattz
  2025-03-17 14:52 ` slymattz
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 14:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998875633

Comment:
Done. I was able to perform a test on an heif image and the new package that depends on pillow_heif works fine. 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (20 preceding siblings ...)
  2025-03-17 14:33 ` [PR REVIEW] " slymattz
@ 2025-03-17 14:52 ` slymattz
  2025-03-17 14:54 ` [PR PATCH] [Updated] " slymattz
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 14:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 642 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998934809

Comment:
There's one more dep I need to add (i.e. qpdf) and that should be it - the PR should be ready for review.
```
xbps-query -f python3-ocrmypdf | xargs grep -i "qpdf"
/usr/lib/python3.13/site-packages/ocrmypdf/exceptions.py:            qpdf --show-encryption infilename
/usr/lib/python3.13/site-packages/ocrmypdf/exceptions.py:            qpdf --decrypt [--password=[password]] infilename
/usr/lib/python3.13/site-packages/ocrmypdf/helpers.py:    turn, uses QPDF) to perform the checks.
```

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (21 preceding siblings ...)
  2025-03-17 14:52 ` slymattz
@ 2025-03-17 14:54 ` slymattz
  2025-03-17 15:05 ` [PR REVIEW] " slymattz
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 14:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 7825 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 501d4a2cebc8496bcca77a95050bc24a54f237ce Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 .../use_pillow_heif_instead_of_pi_heif.patch  | 22 ++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
new file mode 100644
index 00000000000000..eb2a358f389e70
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
@@ -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():
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..701d7cf3e72c8b
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core 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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From dac12eef46a8f8be8b92305ef9286f9016034dfc Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..7f2b6fac9932b2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="pkg-config automake autoconf libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (22 preceding siblings ...)
  2025-03-17 14:54 ` [PR PATCH] [Updated] " slymattz
@ 2025-03-17 15:05 ` slymattz
  2025-03-17 15:11 ` slymattz
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 15:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998934809

Comment:
There's one more dep I need to add (i.e. qpdf) and that should be it - the PR should be ready for review.
```
xbps-query -f python3-ocrmypdf | xargs grep -i "qpdf"
/usr/lib/python3.13/site-packages/ocrmypdf/exceptions.py:            qpdf --show-encryption infilename
/usr/lib/python3.13/site-packages/ocrmypdf/exceptions.py:            qpdf --decrypt [--password=[password]] infilename
/usr/lib/python3.13/site-packages/ocrmypdf/helpers.py:    turn, uses QPDF) to perform the checks.
```

To double check the dependencies, I compared runtime deps with those in Alpine and on AUR and the dependencies match except:
1) leptonica has been obsolete since [v. 13.0.0 ](https://ocrmypdf.readthedocs.io/en/latest/release_notes.html#v13-0-0) 
and
2) python-tqdm since [v. 15.0.0 ](https://aur.archlinux.org/packages/ocrmypdf?all_deps=1#pkgdeps) 

That's why they're not in the template.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (23 preceding siblings ...)
  2025-03-17 15:05 ` [PR REVIEW] " slymattz
@ 2025-03-17 15:11 ` slymattz
  2025-03-17 15:32 ` chrysos349
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 15:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1998934809

Comment:
There's one more dep I need to add (i.e. qpdf) and that should be it - the PR should be ready for review.
```
xbps-query -f python3-ocrmypdf | xargs grep -i "qpdf"
/usr/lib/python3.13/site-packages/ocrmypdf/exceptions.py:            qpdf --show-encryption infilename
/usr/lib/python3.13/site-packages/ocrmypdf/exceptions.py:            qpdf --decrypt [--password=[password]] infilename
/usr/lib/python3.13/site-packages/ocrmypdf/helpers.py:    turn, uses QPDF) to perform the checks.
```

To double check the dependencies, I compared runtime deps with those in Alpine and on AUR and the dependencies match except:
1) leptonica has been obsolete since [v. 13.0.0 ](https://ocrmypdf.readthedocs.io/en/latest/release_notes.html#v13-0-0) 
and
2) python-tqdm since [v. 15.0.0 ](https://ocrmypdf.readthedocs.io/en/latest/release_notes.html#v15-0-0) 

That's why they're not in the template.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (24 preceding siblings ...)
  2025-03-17 15:11 ` slymattz
@ 2025-03-17 15:32 ` chrysos349
  2025-03-17 15:34 ` chrysos349
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: chrysos349 @ 2025-03-17 15:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

New review comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1999037702

Comment:
```sh
jbig2enc-devel_package() {
	short_desc+=" - development files"
	depends="libjbig2enc>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
	}
}

libjbig2enc_package() {
	short_desc+=" - runtime library"
	pkg_install() {
		vmove "usr/lib/*.so.*"
	}
}
```

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (25 preceding siblings ...)
  2025-03-17 15:32 ` chrysos349
@ 2025-03-17 15:34 ` chrysos349
  2025-03-17 15:38 ` [PR PATCH] [Updated] " slymattz
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: chrysos349 @ 2025-03-17 15:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

New review comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r1999040921

Comment:
remove `pkg-config` (not used here), and `autoconf` (it's a dep of `automake`).

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (26 preceding siblings ...)
  2025-03-17 15:34 ` chrysos349
@ 2025-03-17 15:38 ` slymattz
  2025-04-20 15:24 ` slymattz
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-03-17 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 8203 bytes --]

From b564304ff9867a4558e5ad8549e34d1068748b7a Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 501d4a2cebc8496bcca77a95050bc24a54f237ce Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 .../use_pillow_heif_instead_of_pi_heif.patch  | 22 ++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 16 ++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
new file mode 100644
index 00000000000000..eb2a358f389e70
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
@@ -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():
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..701d7cf3e72c8b
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+revision=1
+build_style=python3-pep517
+hostmakedepends="python3-setuptools python3-wheel python3-poetry-core 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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From 3558269d40650e0b200cb1be20fd17618e34c7f2 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 34 ++++++++++++++++++++++++++++++++++
 srcpkgs/libjbig2enc       |  1 +
 3 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template
 create mode 120000 srcpkgs/libjbig2enc

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..0a998f9b4cc36f
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,34 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="libjbig2enc>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
+
+libjbig2enc_package() {
+	short_desc+=" - runtime library"
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
diff --git a/srcpkgs/libjbig2enc b/srcpkgs/libjbig2enc
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/libjbig2enc
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (27 preceding siblings ...)
  2025-03-17 15:38 ` [PR PATCH] [Updated] " slymattz
@ 2025-04-20 15:24 ` slymattz
  2025-04-23 14:43 ` [PR REVIEW] " ahesford
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-04-20 15:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 392 bytes --]

New comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#issuecomment-2817221164

Comment:
@ahesford Hi! May I ask you to review the changes made in this PR since it was first created? I've applied static patching as per your request, made use of pillow_heif which is already there in the repo and moved runtime library to where it belongs.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (28 preceding siblings ...)
  2025-04-20 15:24 ` slymattz
@ 2025-04-23 14:43 ` ahesford
  2025-04-23 14:55 ` [PR PATCH] [Updated] " slymattz
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: ahesford @ 2025-04-23 14:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r2056227401

Comment:
I see no mention of setuptools, wheel or poetry-core in this project's `pyproject.toml`. Why are they required here?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (29 preceding siblings ...)
  2025-04-23 14:43 ` [PR REVIEW] " ahesford
@ 2025-04-23 14:55 ` slymattz
  2025-04-23 15:01 ` [PR REVIEW] " slymattz
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-04-23 14:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 8148 bytes --]

From c1d4527ac592bb5960c6ab463272f920c79b57a5 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 2886f80d69c8ec073ba03f0052fee2ed89fad53d Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.0

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 .../use_pillow_heif_instead_of_pi_heif.patch  | 22 ++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 15 ++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
new file mode 100644
index 00000000000000..eb2a358f389e70
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
@@ -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():
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..1c8addfedfc4c2
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-ocrmypdf'
+pkgname=python3-ocrmypdf
+version=16.10.0
+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=d5b907a7b92951f1f3617f0f5ca002d866143d94fd168546a70e51756bf6412e

From 64e0245cb326c97c8ff4076d097b4f61285512cf Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 34 ++++++++++++++++++++++++++++++++++
 srcpkgs/libjbig2enc       |  1 +
 3 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template
 create mode 120000 srcpkgs/libjbig2enc

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..0a998f9b4cc36f
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,34 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="libjbig2enc>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
+
+libjbig2enc_package() {
+	short_desc+=" - runtime library"
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
diff --git a/srcpkgs/libjbig2enc b/srcpkgs/libjbig2enc
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/libjbig2enc
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR REVIEW] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (30 preceding siblings ...)
  2025-04-23 14:55 ` [PR PATCH] [Updated] " slymattz
@ 2025-04-23 15:01 ` slymattz
  2025-05-01 17:54 ` [PR PATCH] [Updated] " slymattz
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-04-23 15:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 217 bytes --]

New review comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/pull/54713#discussion_r2056264415

Comment:
Good point. I've corrected this. Let me know if that looks good now.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.0
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (31 preceding siblings ...)
  2025-04-23 15:01 ` [PR REVIEW] " slymattz
@ 2025-05-01 17:54 ` slymattz
  2025-05-10 11:24 ` [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.1 slymattz
  2025-05-13 16:45 ` [PR PATCH] [Merged]: " classabbyamp
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-05-01 17:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.0
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 8148 bytes --]

From 28a76468f0cb8ada4e0294dd48c36b7c7d5d31ac Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.0

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..627732dc391fa5 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.0
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=85a89b8abdeef9ef033508aed0d9f1e84fd6d0130e864e2c523f948ec45365e1
 make_check=no # need to patch out some bitdepth checks

From 78bc86241f30669efae12ad5da9adcba5e98a979 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.1

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 .../use_pillow_heif_instead_of_pi_heif.patch  | 22 ++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 15 ++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
new file mode 100644
index 00000000000000..eb2a358f389e70
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
@@ -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():
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..c3e4782aff7323
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -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

From 3856d9195e7a7e4bde919a57229e5b674575b0b1 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 34 ++++++++++++++++++++++++++++++++++
 srcpkgs/libjbig2enc       |  1 +
 3 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template
 create mode 120000 srcpkgs/libjbig2enc

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..0a998f9b4cc36f
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,34 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="libjbig2enc>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
+
+libjbig2enc_package() {
+	short_desc+=" - runtime library"
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
diff --git a/srcpkgs/libjbig2enc b/srcpkgs/libjbig2enc
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/libjbig2enc
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.1
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (32 preceding siblings ...)
  2025-05-01 17:54 ` [PR PATCH] [Updated] " slymattz
@ 2025-05-10 11:24 ` slymattz
  2025-05-13 16:45 ` [PR PATCH] [Merged]: " classabbyamp
  34 siblings, 0 replies; 36+ messages in thread
From: slymattz @ 2025-05-10 11:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]

There is an updated pull request by slymattz against master on the void-packages repository

https://github.com/slymattz/void-packages ocrmypdf
https://github.com/void-linux/void-packages/pull/54713

New package: python3-ocrmypdf-16.10.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

EDIT 5/1/25: update to 16.10.1 - tested
EDIT 5/10/25: updating img2pdf to 0.6.1

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/54713.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocrmypdf-54713.patch --]
[-- Type: text/x-diff, Size: 8148 bytes --]

From 168a09c8ea066afdc61f02c37eb3480f9e5deefe Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:39:46 +0100
Subject: [PATCH 1/3] img2pdf: update to 0.6.1

---
 .../patches/0_fix_color_profile_path.patch        | 15 ---------------
 srcpkgs/img2pdf/template                          |  6 +++---
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch

diff --git a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
deleted file mode 100644
index 009eee3c298160..00000000000000
--- a/srcpkgs/img2pdf/patches/0_fix_color_profile_path.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/src/img2pdf.py
-+++ b/src/img2pdf.py
-@@ -3439,10 +3439,10 @@ RGB.""",
-     outargs.add_argument(
-         "--pdfa",
-         nargs="?",
--        const="/usr/share/color/icc/sRGB.icc",
-+        const="/usr/share/color/icc/colord/sRGB.icc",
-         default=None,
-         help="Output a PDF/A-1b compliant document. By default, this will "
--        "embed /usr/share/color/icc/sRGB.icc as the color profile.",
-+        "embed /usr/share/color/icc/colord/sRGB.icc as the color profile.",
-     )
- 
-     sizeargs = parser.add_argument_group(
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
index 48b7eba811892a..53b2528c70352c 100644
--- a/srcpkgs/img2pdf/template
+++ b/srcpkgs/img2pdf/template
@@ -1,7 +1,7 @@
 # Template file for 'img2pdf'
 pkgname=img2pdf
-version=0.4.4
-revision=4
+version=0.6.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-pikepdf python3-setuptools"
 depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
@@ -10,5 +10,5 @@ maintainer="Philipp David <pd@3b.pm>"
 license="GPL-3.0-or-later"
 homepage="https://gitlab.mister-muffin.de/josch/img2pdf"
 distfiles="${PYPI_SITE}/i/img2pdf/img2pdf-${version}.tar.gz"
-checksum=8ec898a9646523fd3862b154f3f47cd52609c24cc3e2dc1fb5f0168f0cbe793c
+checksum=306e279eb832bc159d7d6294b697a9fbd11b4be1f799b14b3b2174fb506af289
 make_check=no # need to patch out some bitdepth checks

From 1485609466c257abd0ff01aebfed59fd27107d33 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 14:41:18 +0100
Subject: [PATCH 2/3] New package: python3-ocrmypdf-16.10.1

---
 .../patches/tesseract_binary_name_fixup.patch | 29 +++++++++++++++++++
 .../use_pillow_heif_instead_of_pi_heif.patch  | 22 ++++++++++++++
 srcpkgs/python3-ocrmypdf/template             | 15 ++++++++++
 3 files changed, 66 insertions(+)
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
 create mode 100644 srcpkgs/python3-ocrmypdf/template

diff --git a/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
new file mode 100644
index 00000000000000..daf6f9224c2c64
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/tesseract_binary_name_fixup.patch
@@ -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:
diff --git a/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
new file mode 100644
index 00000000000000..eb2a358f389e70
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/patches/use_pillow_heif_instead_of_pi_heif.patch
@@ -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():
diff --git a/srcpkgs/python3-ocrmypdf/template b/srcpkgs/python3-ocrmypdf/template
new file mode 100644
index 00000000000000..c3e4782aff7323
--- /dev/null
+++ b/srcpkgs/python3-ocrmypdf/template
@@ -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

From d1393f2a781446fc8a84b1410ed4e142753c27d4 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Sun, 16 Mar 2025 21:40:58 +0100
Subject: [PATCH 3/3] New package: jbig2enc-0.30

---
 srcpkgs/jbig2enc-devel    |  1 +
 srcpkgs/jbig2enc/template | 34 ++++++++++++++++++++++++++++++++++
 srcpkgs/libjbig2enc       |  1 +
 3 files changed, 36 insertions(+)
 create mode 120000 srcpkgs/jbig2enc-devel
 create mode 100644 srcpkgs/jbig2enc/template
 create mode 120000 srcpkgs/libjbig2enc

diff --git a/srcpkgs/jbig2enc-devel b/srcpkgs/jbig2enc-devel
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/jbig2enc-devel
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 00000000000000..0a998f9b4cc36f
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,34 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.30
+revision=1
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+makedepends="leptonica-devel zlib-devel"
+short_desc="JBIG2 Encoder"
+maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b
+
+pre_configure() {
+	./autogen.sh
+}
+
+jbig2enc-devel_package() {
+	short_desc+=" - development files"
+	depends="libjbig2enc>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.a"
+		vmove "usr/lib/*.so"
+	}
+}
+
+libjbig2enc_package() {
+	short_desc+=" - runtime library"
+	pkg_install() {
+		vmove "usr/lib/*.so.*"
+	}
+}
diff --git a/srcpkgs/libjbig2enc b/srcpkgs/libjbig2enc
new file mode 120000
index 00000000000000..916bf211cdcd73
--- /dev/null
+++ b/srcpkgs/libjbig2enc
@@ -0,0 +1 @@
+jbig2enc
\ No newline at end of file

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PR PATCH] [Merged]: New package: python3-ocrmypdf-16.10.1
  2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
                   ` (33 preceding siblings ...)
  2025-05-10 11:24 ` [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.1 slymattz
@ 2025-05-13 16:45 ` classabbyamp
  34 siblings, 0 replies; 36+ messages in thread
From: classabbyamp @ 2025-05-13 16:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

There's a merged pull request on the void-packages repository

New package: python3-ocrmypdf-16.10.1
https://github.com/void-linux/void-packages/pull/54713

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES** 
It does what it's supposed to, i.e. it puts an OCR layer over a PDF file.

EDIT 5/1/25: update to 16.10.1 - tested
EDIT 5/10/25: img2pdf: update to 0.6.1- tested

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc



^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2025-05-13 16:45 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-16 14:09 [PR PATCH] New package: python3-ocrmypdf-16.10.0 slymattz
2025-03-16 14:25 ` [PR PATCH] [Updated] " slymattz
2025-03-16 16:49 ` slymattz
2025-03-16 16:54 ` slymattz
2025-03-16 17:07 ` slymattz
2025-03-16 20:01 ` slymattz
2025-03-16 20:42 ` slymattz
2025-03-16 20:43 ` slymattz
2025-03-17 10:34 ` [PR REVIEW] " ahesford
2025-03-17 10:34 ` ahesford
2025-03-17 10:34 ` ahesford
2025-03-17 11:09 ` [PR PATCH] [Updated] " slymattz
2025-03-17 11:14 ` slymattz
2025-03-17 11:51 ` slymattz
2025-03-17 12:05 ` slymattz
2025-03-17 13:48 ` [PR REVIEW] " classabbyamp
2025-03-17 13:57 ` slymattz
2025-03-17 14:03 ` slymattz
2025-03-17 14:15 ` slymattz
2025-03-17 14:25 ` classabbyamp
2025-03-17 14:25 ` [PR PATCH] [Updated] " slymattz
2025-03-17 14:33 ` [PR REVIEW] " slymattz
2025-03-17 14:52 ` slymattz
2025-03-17 14:54 ` [PR PATCH] [Updated] " slymattz
2025-03-17 15:05 ` [PR REVIEW] " slymattz
2025-03-17 15:11 ` slymattz
2025-03-17 15:32 ` chrysos349
2025-03-17 15:34 ` chrysos349
2025-03-17 15:38 ` [PR PATCH] [Updated] " slymattz
2025-04-20 15:24 ` slymattz
2025-04-23 14:43 ` [PR REVIEW] " ahesford
2025-04-23 14:55 ` [PR PATCH] [Updated] " slymattz
2025-04-23 15:01 ` [PR REVIEW] " slymattz
2025-05-01 17:54 ` [PR PATCH] [Updated] " slymattz
2025-05-10 11:24 ` [PR PATCH] [Updated] New package: python3-ocrmypdf-16.10.1 slymattz
2025-05-13 16:45 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).