Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: img2pdf-0.4.0
@ 2021-03-08 18:19 oynqr
  2021-03-08 18:21 ` [PR PATCH] [Updated] " oynqr
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: oynqr @ 2021-03-08 18:19 UTC (permalink / raw)
  To: ml

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

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

https://github.com/oynqr/void-packages img2pdf
https://github.com/void-linux/void-packages/pull/29324

New package: img2pdf-0.4.0
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 1040f20e08a460119f0975d41017e622d5848b99 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:10 +0100
Subject: [PATCH 1/2] New package: python3-pikepdf-2.8.0.post1

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

diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template
new file mode 100644
index 00000000000..b7e858d5a58
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pikepdf'
+pkgname=python3-pikepdf
+version=2.8.0.post1
+revision=1
+wrksrc="pikepdf-${version}"
+build_style=python3-pep517
+hostmakedepends="python3-pybind11 python3-setuptools python3-setuptools_scm python3-wheel"
+makedepends="libqpdf-devel"
+depends="python3-lxml python3-Pillow"
+short_desc="Python library for reading and writing PDF files"
+maintainer="Philipp David <pd@3b.pm>"
+license="MPL-2.0"
+homepage="https://github.com/pikepdf/pikepdf"
+distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
+checksum=f742acfd2c41ceff0ade2dec8ddc4875ce0a75f51f5e943b56f4d741ab54b122

From 90e91651c14d3ddc644b60c9291faf9698aa0693 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:18 +0100
Subject: [PATCH 2/2] New package: img2pdf-0.4.0

---
 srcpkgs/img2pdf/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/img2pdf/template

diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
new file mode 100644
index 00000000000..4f043ef2c82
--- /dev/null
+++ b/srcpkgs/img2pdf/template
@@ -0,0 +1,14 @@
+# Template file for 'img2pdf'
+pkgname=img2pdf
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+checkdepends="python3-pip python3-wheel"
+depends="python3-pikepdf python3-Pillow"
+short_desc="Lossless conversion of raster images to PDF"
+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=eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9

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

* Re: [PR PATCH] [Updated] New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
@ 2021-03-08 18:21 ` oynqr
  2021-03-09 10:27 ` oynqr
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-08 18:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/oynqr/void-packages img2pdf
https://github.com/void-linux/void-packages/pull/29324

New package: img2pdf-0.4.0
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 1040f20e08a460119f0975d41017e622d5848b99 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:10 +0100
Subject: [PATCH 1/2] New package: python3-pikepdf-2.8.0.post1

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

diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template
new file mode 100644
index 00000000000..b7e858d5a58
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/template
@@ -0,0 +1,15 @@
+# Template file for 'python3-pikepdf'
+pkgname=python3-pikepdf
+version=2.8.0.post1
+revision=1
+wrksrc="pikepdf-${version}"
+build_style=python3-pep517
+hostmakedepends="python3-pybind11 python3-setuptools python3-setuptools_scm python3-wheel"
+makedepends="libqpdf-devel"
+depends="python3-lxml python3-Pillow"
+short_desc="Python library for reading and writing PDF files"
+maintainer="Philipp David <pd@3b.pm>"
+license="MPL-2.0"
+homepage="https://github.com/pikepdf/pikepdf"
+distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
+checksum=f742acfd2c41ceff0ade2dec8ddc4875ce0a75f51f5e943b56f4d741ab54b122

From 2b61368edc39e7b31f8ffbc59346913d9b49e7b8 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:18 +0100
Subject: [PATCH 2/2] New package: img2pdf-0.4.0

---
 srcpkgs/img2pdf/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/img2pdf/template

diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
new file mode 100644
index 00000000000..70c69251914
--- /dev/null
+++ b/srcpkgs/img2pdf/template
@@ -0,0 +1,14 @@
+# Template file for 'img2pdf'
+pkgname=img2pdf
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-pikepdf python3-Pillow"
+checkdepends="python3-pip python3-wheel"
+short_desc="Lossless conversion of raster images to PDF"
+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=eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9

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

* Re: [PR PATCH] [Updated] New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
  2021-03-08 18:21 ` [PR PATCH] [Updated] " oynqr
@ 2021-03-09 10:27 ` oynqr
  2021-03-09 12:41 ` [PR PATCH] [Updated] [WIP] " oynqr
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-09 10:27 UTC (permalink / raw)
  To: ml

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

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

https://github.com/oynqr/void-packages img2pdf
https://github.com/void-linux/void-packages/pull/29324

New package: img2pdf-0.4.0
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 6624d01e148d8474f363f6ed2f88c69697dd6964 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Tue, 9 Mar 2021 11:25:25 +0100
Subject: [PATCH 1/3] New package: python3-setuptools_scm_git_archive-1.1

---
 .../template                                  | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_scm_git_archive/template

diff --git a/srcpkgs/python3-setuptools_scm_git_archive/template b/srcpkgs/python3-setuptools_scm_git_archive/template
new file mode 100644
index 00000000000..9b025407c4f
--- /dev/null
+++ b/srcpkgs/python3-setuptools_scm_git_archive/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-setuptools_scm_git_archive'
+pkgname=python3-setuptools_scm_git_archive
+version=1.1
+revision=1
+wrksrc="setuptools_scm_git_archive-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools_scm"
+checkdepends="python3-pytest"
+short_desc="Setuptools_scm plugin that adds support for git archives"
+maintainer="Philipp David <pd@3b.pm>"
+license="MIT"
+homepage="https://github.com/Changaco/setuptools_scm_git_archive"
+distfiles="${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-${version}.tar.gz"
+checksum=6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+
+do_check() {
+	python3 setup.py test ${make_check_args}
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 4321afdd1210d7cf262bcf6bb08ce37e0bd051b0 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:10 +0100
Subject: [PATCH 2/3] New package: python3-pikepdf-2.8.0.post1

---
 .../remove_pytest-xdist_dependency.patch      | 11 ++++++++++
 srcpkgs/python3-pikepdf/template              | 20 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
 create mode 100644 srcpkgs/python3-pikepdf/template

diff --git a/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
new file mode 100644
index 00000000000..27d129188df
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
@@ -0,0 +1,11 @@
+--- setup.cfg
++++ setup.cfg
+@@ -7,8 +7,6 @@ test=pytest
+ [tool:pytest]
+ norecursedirs = lib .pc .git venv
+ testpaths = tests
+-addopts =
+-	-n auto
+ 
+ [coverage:run]
+ 
diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template
new file mode 100644
index 00000000000..1cf9f43ec27
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-pikepdf'
+pkgname=python3-pikepdf
+version=2.8.0.post1
+revision=1
+wrksrc="pikepdf-${version}"
+build_style=python3-module
+hostmakedepends="python3-pybind11 python3-setuptools python3-setuptools_scm python3-setuptools_scm_git_archive python3-toml python3-wheel"
+makedepends="libqpdf-devel python3-pybind11"
+depends="python3-lxml python3-Pillow"
+checkdepends="python3-dateutil python3-hypothesis python3-lxml python3-Pillow python3-psutil python3-pytest"
+short_desc="Python library for reading and writing PDF files"
+maintainer="Philipp David <pd@3b.pm>"
+license="MPL-2.0"
+homepage="https://github.com/pikepdf/pikepdf"
+distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
+checksum=f742acfd2c41ceff0ade2dec8ddc4875ce0a75f51f5e943b56f4d741ab54b122
+
+do_check() {
+	PYTHONPATH="build/lib.linux-${XBPS_MACHINE}-${py3_ver}" python3 -m pytest
+}

From 8805a8a9a10df5a16de92d4b958c805a783ed390 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:18 +0100
Subject: [PATCH 3/3] New package: img2pdf-0.4.0

---
 srcpkgs/img2pdf/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/img2pdf/template

diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
new file mode 100644
index 00000000000..986ed838de9
--- /dev/null
+++ b/srcpkgs/img2pdf/template
@@ -0,0 +1,14 @@
+# Template file for 'img2pdf'
+pkgname=img2pdf
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-pikepdf python3-setuptools"
+depends="python3-Pillow python3-tkinter"
+checkdepends="python3-pytest"
+short_desc="Lossless conversion of raster images to PDF"
+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=eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9

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

* Re: [PR PATCH] [Updated] [WIP] New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
  2021-03-08 18:21 ` [PR PATCH] [Updated] " oynqr
  2021-03-09 10:27 ` oynqr
@ 2021-03-09 12:41 ` oynqr
  2021-03-13 15:22 ` oynqr
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-09 12:41 UTC (permalink / raw)
  To: ml

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

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

https://github.com/oynqr/void-packages img2pdf
https://github.com/void-linux/void-packages/pull/29324

[WIP] New package: img2pdf-0.4.0
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From 6624d01e148d8474f363f6ed2f88c69697dd6964 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Tue, 9 Mar 2021 11:25:25 +0100
Subject: [PATCH 1/3] New package: python3-setuptools_scm_git_archive-1.1

---
 .../template                                  | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_scm_git_archive/template

diff --git a/srcpkgs/python3-setuptools_scm_git_archive/template b/srcpkgs/python3-setuptools_scm_git_archive/template
new file mode 100644
index 00000000000..9b025407c4f
--- /dev/null
+++ b/srcpkgs/python3-setuptools_scm_git_archive/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-setuptools_scm_git_archive'
+pkgname=python3-setuptools_scm_git_archive
+version=1.1
+revision=1
+wrksrc="setuptools_scm_git_archive-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools_scm"
+checkdepends="python3-pytest"
+short_desc="Setuptools_scm plugin that adds support for git archives"
+maintainer="Philipp David <pd@3b.pm>"
+license="MIT"
+homepage="https://github.com/Changaco/setuptools_scm_git_archive"
+distfiles="${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-${version}.tar.gz"
+checksum=6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+
+do_check() {
+	python3 setup.py test ${make_check_args}
+}
+
+post_install() {
+	vlicense LICENSE
+}

From 4321afdd1210d7cf262bcf6bb08ce37e0bd051b0 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:10 +0100
Subject: [PATCH 2/3] New package: python3-pikepdf-2.8.0.post1

---
 .../remove_pytest-xdist_dependency.patch      | 11 ++++++++++
 srcpkgs/python3-pikepdf/template              | 20 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
 create mode 100644 srcpkgs/python3-pikepdf/template

diff --git a/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
new file mode 100644
index 00000000000..27d129188df
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
@@ -0,0 +1,11 @@
+--- setup.cfg
++++ setup.cfg
+@@ -7,8 +7,6 @@ test=pytest
+ [tool:pytest]
+ norecursedirs = lib .pc .git venv
+ testpaths = tests
+-addopts =
+-	-n auto
+ 
+ [coverage:run]
+ 
diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template
new file mode 100644
index 00000000000..1cf9f43ec27
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/template
@@ -0,0 +1,20 @@
+# Template file for 'python3-pikepdf'
+pkgname=python3-pikepdf
+version=2.8.0.post1
+revision=1
+wrksrc="pikepdf-${version}"
+build_style=python3-module
+hostmakedepends="python3-pybind11 python3-setuptools python3-setuptools_scm python3-setuptools_scm_git_archive python3-toml python3-wheel"
+makedepends="libqpdf-devel python3-pybind11"
+depends="python3-lxml python3-Pillow"
+checkdepends="python3-dateutil python3-hypothesis python3-lxml python3-Pillow python3-psutil python3-pytest"
+short_desc="Python library for reading and writing PDF files"
+maintainer="Philipp David <pd@3b.pm>"
+license="MPL-2.0"
+homepage="https://github.com/pikepdf/pikepdf"
+distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
+checksum=f742acfd2c41ceff0ade2dec8ddc4875ce0a75f51f5e943b56f4d741ab54b122
+
+do_check() {
+	PYTHONPATH="build/lib.linux-${XBPS_MACHINE}-${py3_ver}" python3 -m pytest
+}

From 22938ca35cbbe11e4d21e82c4f4cd75baf37c939 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:18 +0100
Subject: [PATCH 3/3] New package: img2pdf-0.4.0

---
 srcpkgs/img2pdf/patches/disableicc.patch      |  11 +
 .../patches/endianess-endianness.patch        | 245 ++++++++++++++++++
 .../patches/fix_color_profile_path.patch      |  49 ++++
 srcpkgs/img2pdf/patches/imdepth.patch         |  22 ++
 srcpkgs/img2pdf/template                      |  15 ++
 5 files changed, 342 insertions(+)
 create mode 100644 srcpkgs/img2pdf/patches/disableicc.patch
 create mode 100644 srcpkgs/img2pdf/patches/endianess-endianness.patch
 create mode 100644 srcpkgs/img2pdf/patches/fix_color_profile_path.patch
 create mode 100644 srcpkgs/img2pdf/patches/imdepth.patch
 create mode 100644 srcpkgs/img2pdf/template

diff --git a/srcpkgs/img2pdf/patches/disableicc.patch b/srcpkgs/img2pdf/patches/disableicc.patch
new file mode 100644
index 00000000000..1c60cf9ad6b
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/disableicc.patch
@@ -0,0 +1,11 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -5320,7 +5320,7 @@ def test_png_palette8(tmp_path_factory,
+ )
+ def test_png_icc(tmp_path_factory, png_icc_img, png_icc_pdf):
+     tmpdir = tmp_path_factory.mktemp("png_icc")
+-    compare_ghostscript(tmpdir, png_icc_img, png_icc_pdf, icc=True)
++    # compare_ghostscript(tmpdir, png_icc_img, png_icc_pdf, icc=True)
+     # compare_poppler(tmpdir, png_icc_img, png_icc_pdf)
+     # compare_mupdf(tmpdir, png_icc_img, png_icc_pdf)
+     # compare_pdfimages_png(tmpdir, png_icc_img, png_icc_pdf)
diff --git a/srcpkgs/img2pdf/patches/endianess-endianness.patch b/srcpkgs/img2pdf/patches/endianess-endianness.patch
new file mode 100644
index 00000000000..f04a6b92096
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/endianess-endianness.patch
@@ -0,0 +1,245 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -863,7 +863,7 @@ def jpg_img(tmp_path_factory, tmp_normal
+     assert "resolution" not in identify[0]["image"]
+     assert identify[0]["image"].get("units") == "Undefined", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") == "Undefined", str(identify)
++    assert identify[0]["image"].get("endianness") == "Undefined", str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+@@ -2219,7 +2219,7 @@ def tiff_float_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2275,7 +2275,7 @@ def tiff_cmyk8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "CMYK", str(identify)
+     assert identify[0]["image"].get("type") == "ColorSeparation", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2335,7 +2335,7 @@ def tiff_cmyk16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "CMYK", str(identify)
+     assert identify[0]["image"].get("type") == "ColorSeparation", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2385,7 +2385,7 @@ def tiff_rgb8_img(tmp_path_factory, tmp_
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2436,7 +2436,7 @@ def tiff_rgb12_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 12, str(identify)
+@@ -2487,7 +2487,7 @@ def tiff_rgb14_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 14, str(identify)
+@@ -2538,7 +2538,7 @@ def tiff_rgb16_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2589,7 +2589,7 @@ def tiff_rgba8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2640,7 +2640,7 @@ def tiff_rgba16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2689,7 +2689,7 @@ def tiff_gray1_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -2739,7 +2739,7 @@ def tiff_gray2_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 2, str(identify)
+@@ -2789,7 +2789,7 @@ def tiff_gray4_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 4, str(identify)
+@@ -2839,7 +2839,7 @@ def tiff_gray8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2889,7 +2889,7 @@ def tiff_gray16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2943,7 +2943,7 @@ def tiff_multipage_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2986,7 +2986,7 @@ def tiff_multipage_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3036,7 +3036,7 @@ def tiff_palette1_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3087,7 +3087,7 @@ def tiff_palette2_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3138,7 +3138,7 @@ def tiff_palette4_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3189,7 +3189,7 @@ def tiff_palette8_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3253,7 +3253,7 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3334,7 +3334,7 @@ def tiff_ccitt_msb_m2l_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in [
++    assert identify[0]["image"].get("endianness") in [
+         "Undefined",
+         "MSB",
+     ]  # FIXME: should be MSB
+@@ -3416,7 +3416,7 @@ def tiff_ccitt_msb_l2m_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in [
++    assert identify[0]["image"].get("endianness") in [
+         "Undefined",
+         "MSB",
+     ]  # FIXME: should be MSB
+@@ -3503,7 +3503,7 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3593,7 +3593,7 @@ def tiff_ccitt_nometa1_img(tmp_path_fact
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3677,7 +3677,7 @@ def tiff_ccitt_nometa2_img(tmp_path_fact
+     }, str(identify)
+     assert identify[0]["image"].get("units") == "PixelsPerInch", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
diff --git a/srcpkgs/img2pdf/patches/fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/fix_color_profile_path.patch
new file mode 100644
index 00000000000..84e69f13fb0
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/fix_color_profile_path.patch
@@ -0,0 +1,49 @@
+--- a/src/img2pdf.py
++++ b/src/img2pdf.py
+@@ -3308,10 +3308,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 complient 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(
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -312,7 +312,7 @@ def compare_ghostscript(tmpdir, img, pdf, gsdevice="png16m", exact=True, icc=Fal
+                     "AE",
+                     "(",
+                     "-profile",
+-                    "/usr/share/color/icc/ghostscript/srgb.icc",
++                    "/usr/share/color/icc/colord/sRGS.icc",
+                     "-depth",
+                     "8",
+                     str(img),
+@@ -667,11 +667,11 @@ def tmp_icc_png(tmp_path_factory, alpha):
+         str(tmp_icc_png),
+         8,
+         2,
+-        iccp="/usr/share/color/icc/sRGB.icc",
++        iccp="/usr/share/color/icc/colord/sRGB.icc",
+     )
+     assert (
+         hashlib.md5(tmp_icc_png.read_bytes()).hexdigest()
+-        == "d09865464626a87b4e7f398e1f914cca"
++        == "b20cad5586ef280995bbf9afd30d2257"
+     )
+     yield tmp_icc_png
+     tmp_icc_png.unlink()
+@@ -4272,7 +4272,7 @@ def png_icc_pdf(tmp_path_factory, tmp_icc_png, request):
+         assert p.pages[0].Resources.XObject.Im0.ColorSpace[1].Alternate == "/DeviceRGB"
+         assert (
+             p.pages[0].Resources.XObject.Im0.ColorSpace[1].read_bytes()
+-            == pathlib.Path("/usr/share/color/icc/sRGB.icc").read_bytes()
++            == pathlib.Path("/usr/share/color/icc/colord/sRGB.icc").read_bytes()
+         )
+         assert p.pages[0].Resources.XObject.Im0.DecodeParms.BitsPerComponent == 8
+         assert p.pages[0].Resources.XObject.Im0.DecodeParms.Colors == 3
diff --git a/srcpkgs/img2pdf/patches/imdepth.patch b/srcpkgs/img2pdf/patches/imdepth.patch
new file mode 100644
index 00000000000..489d34c8c58
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/imdepth.patch
@@ -0,0 +1,22 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -2439,7 +2439,8 @@ def tiff_rgb12_img(tmp_path_factory, tmp
+     assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+-    assert identify[0]["image"].get("depth") == 12, str(identify)
++    assert identify[0]["image"].get("depth") == 16, str(identify)
++    assert identify[0]["image"].get("baseDepth") == 12, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+         "width": 60,
+         "height": 60,
+@@ -2490,7 +2491,8 @@ def tiff_rgb14_img(tmp_path_factory, tmp
+     assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+-    assert identify[0]["image"].get("depth") == 14, str(identify)
++    assert identify[0]["image"].get("depth") == 16, str(identify)
++    assert identify[0]["image"].get("baseDepth") == 14, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+         "width": 60,
+         "height": 60,
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
new file mode 100644
index 00000000000..cd2307f39f2
--- /dev/null
+++ b/srcpkgs/img2pdf/template
@@ -0,0 +1,15 @@
+# Template file for 'img2pdf'
+pkgname=img2pdf
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-pikepdf python3-setuptools"
+depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
+checkdepends="colord exiftool ghostscript ImageMagick6 mupdf-tools netpbm poppler python3-numpy python3-pdfrw python3-pytest python3-scipy"
+short_desc="Lossless conversion of raster images to PDF"
+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=eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9
+patch_args="-Np1"

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

* Re: New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (2 preceding siblings ...)
  2021-03-09 12:41 ` [PR PATCH] [Updated] [WIP] " oynqr
@ 2021-03-13 15:22 ` oynqr
  2021-03-13 19:31 ` leahneukirchen
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-13 15:22 UTC (permalink / raw)
  To: ml

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

New comment by oynqr on void-packages repository

https://github.com/void-linux/void-packages/pull/29324#issuecomment-798503920

Comment:
Current depends include everything but the kitchen sink, maybe python3-tkinter could be dropped since the GUI is not very useful

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

* Re: New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (3 preceding siblings ...)
  2021-03-13 15:22 ` oynqr
@ 2021-03-13 19:31 ` leahneukirchen
  2021-03-14 14:05 ` oynqr
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2021-03-13 19:31 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/29324#issuecomment-798772710

Comment:
Hmm, why is setuptools_scm_git_archive needed?

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

* Re: New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (4 preceding siblings ...)
  2021-03-13 19:31 ` leahneukirchen
@ 2021-03-14 14:05 ` oynqr
  2021-03-15 15:36 ` [PR PATCH] [Updated] " oynqr
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-14 14:05 UTC (permalink / raw)
  To: ml

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

New comment by oynqr on void-packages repository

https://github.com/void-linux/void-packages/pull/29324#issuecomment-798913827

Comment:
I tried building pikepdf with both python3-pep517 and python3-module styles, the former did not want to cross compile and the latter requires setuptools_scm_git_archive. I'll have another look at it tomorrow, maybe the version check can be patched out easily.

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

* Re: [PR PATCH] [Updated] New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (5 preceding siblings ...)
  2021-03-14 14:05 ` oynqr
@ 2021-03-15 15:36 ` oynqr
  2021-03-15 15:38 ` oynqr
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-15 15:36 UTC (permalink / raw)
  To: ml

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

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

https://github.com/oynqr/void-packages img2pdf
https://github.com/void-linux/void-packages/pull/29324

New package: img2pdf-0.4.0
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From dfa9b1ce284896800d9cf66de13b88e923c0b6f6 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:10 +0100
Subject: [PATCH 1/2] New package: python3-pikepdf-2.8.0.post1

---
 .../remove_pytest-xdist_dependency.patch      | 11 +++++++++
 .../remove_setuptools_scm_dependency.patch    | 11 +++++++++
 srcpkgs/python3-pikepdf/template              | 24 +++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
 create mode 100644 srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch
 create mode 100644 srcpkgs/python3-pikepdf/template

diff --git a/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
new file mode 100644
index 000000000000..27d129188dfd
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
@@ -0,0 +1,11 @@
+--- setup.cfg
++++ setup.cfg
+@@ -7,8 +7,6 @@ test=pytest
+ [tool:pytest]
+ norecursedirs = lib .pc .git venv
+ testpaths = tests
+-addopts =
+-	-n auto
+ 
+ [coverage:run]
+ 
diff --git a/srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch b/srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch
new file mode 100644
index 000000000000..0aafb8264a64
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch
@@ -0,0 +1,11 @@
+--- setup.py
++++ setup.py
+@@ -90,8 +90,6 @@ if __name__ == '__main__':
+         setup_requires=[
+             'setuptools >= 50',
+             'wheel >= 0.35',
+-            'setuptools_scm[toml] >= 4.1',
+-            'setuptools_scm_git_archive',
+             'pybind11 >= 2.6.0, <3',
+         ],
+         extras_require={'docs': docs_require},
diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template
new file mode 100644
index 000000000000..fd1e435f7088
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/template
@@ -0,0 +1,24 @@
+# Template file for 'python3-pikepdf'
+pkgname=python3-pikepdf
+version=2.9.0
+revision=1
+wrksrc="pikepdf-${version}"
+build_style=python3-module
+hostmakedepends="python3-pybind11 python3-setuptools python3-toml python3-wheel"
+makedepends="libqpdf-devel python3-pybind11"
+depends="python3-lxml python3-Pillow"
+checkdepends="python3-dateutil python3-hypothesis python3-lxml python3-Pillow python3-psutil python3-pytest"
+short_desc="Python library for reading and writing PDF files"
+maintainer="Philipp David <pd@3b.pm>"
+license="MPL-2.0"
+homepage="https://github.com/pikepdf/pikepdf"
+distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
+checksum=a9dbd2bb52fcdecb066c99cacf96f0ebb40edee50d8885502a5a22d7f723a8b7
+
+pre_build() {
+	vsed -i "s/__version__.*/__version__ = '${version}'/g" setup.py
+}
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) python3 -m pytest
+}

From d2a2ab17e86d9a9f53df613ff804891d59805659 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:18 +0100
Subject: [PATCH 2/2] New package: img2pdf-0.4.0

---
 srcpkgs/img2pdf/patches/disableicc.patch      |  11 +
 .../patches/endianess-endianness.patch        | 245 ++++++++++++++++++
 .../patches/fix_color_profile_path.patch      |  49 ++++
 srcpkgs/img2pdf/patches/imdepth.patch         |  22 ++
 srcpkgs/img2pdf/template                      |  15 ++
 5 files changed, 342 insertions(+)
 create mode 100644 srcpkgs/img2pdf/patches/disableicc.patch
 create mode 100644 srcpkgs/img2pdf/patches/endianess-endianness.patch
 create mode 100644 srcpkgs/img2pdf/patches/fix_color_profile_path.patch
 create mode 100644 srcpkgs/img2pdf/patches/imdepth.patch
 create mode 100644 srcpkgs/img2pdf/template

diff --git a/srcpkgs/img2pdf/patches/disableicc.patch b/srcpkgs/img2pdf/patches/disableicc.patch
new file mode 100644
index 000000000000..1c60cf9ad6bf
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/disableicc.patch
@@ -0,0 +1,11 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -5320,7 +5320,7 @@ def test_png_palette8(tmp_path_factory,
+ )
+ def test_png_icc(tmp_path_factory, png_icc_img, png_icc_pdf):
+     tmpdir = tmp_path_factory.mktemp("png_icc")
+-    compare_ghostscript(tmpdir, png_icc_img, png_icc_pdf, icc=True)
++    # compare_ghostscript(tmpdir, png_icc_img, png_icc_pdf, icc=True)
+     # compare_poppler(tmpdir, png_icc_img, png_icc_pdf)
+     # compare_mupdf(tmpdir, png_icc_img, png_icc_pdf)
+     # compare_pdfimages_png(tmpdir, png_icc_img, png_icc_pdf)
diff --git a/srcpkgs/img2pdf/patches/endianess-endianness.patch b/srcpkgs/img2pdf/patches/endianess-endianness.patch
new file mode 100644
index 000000000000..f04a6b920969
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/endianess-endianness.patch
@@ -0,0 +1,245 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -863,7 +863,7 @@ def jpg_img(tmp_path_factory, tmp_normal
+     assert "resolution" not in identify[0]["image"]
+     assert identify[0]["image"].get("units") == "Undefined", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") == "Undefined", str(identify)
++    assert identify[0]["image"].get("endianness") == "Undefined", str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+@@ -2219,7 +2219,7 @@ def tiff_float_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2275,7 +2275,7 @@ def tiff_cmyk8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "CMYK", str(identify)
+     assert identify[0]["image"].get("type") == "ColorSeparation", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2335,7 +2335,7 @@ def tiff_cmyk16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "CMYK", str(identify)
+     assert identify[0]["image"].get("type") == "ColorSeparation", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2385,7 +2385,7 @@ def tiff_rgb8_img(tmp_path_factory, tmp_
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2436,7 +2436,7 @@ def tiff_rgb12_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 12, str(identify)
+@@ -2487,7 +2487,7 @@ def tiff_rgb14_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 14, str(identify)
+@@ -2538,7 +2538,7 @@ def tiff_rgb16_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2589,7 +2589,7 @@ def tiff_rgba8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2640,7 +2640,7 @@ def tiff_rgba16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2689,7 +2689,7 @@ def tiff_gray1_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -2739,7 +2739,7 @@ def tiff_gray2_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 2, str(identify)
+@@ -2789,7 +2789,7 @@ def tiff_gray4_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 4, str(identify)
+@@ -2839,7 +2839,7 @@ def tiff_gray8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2889,7 +2889,7 @@ def tiff_gray16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2943,7 +2943,7 @@ def tiff_multipage_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2986,7 +2986,7 @@ def tiff_multipage_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3036,7 +3036,7 @@ def tiff_palette1_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3087,7 +3087,7 @@ def tiff_palette2_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3138,7 +3138,7 @@ def tiff_palette4_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3189,7 +3189,7 @@ def tiff_palette8_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3253,7 +3253,7 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3334,7 +3334,7 @@ def tiff_ccitt_msb_m2l_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in [
++    assert identify[0]["image"].get("endianness") in [
+         "Undefined",
+         "MSB",
+     ]  # FIXME: should be MSB
+@@ -3416,7 +3416,7 @@ def tiff_ccitt_msb_l2m_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in [
++    assert identify[0]["image"].get("endianness") in [
+         "Undefined",
+         "MSB",
+     ]  # FIXME: should be MSB
+@@ -3503,7 +3503,7 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3593,7 +3593,7 @@ def tiff_ccitt_nometa1_img(tmp_path_fact
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3677,7 +3677,7 @@ def tiff_ccitt_nometa2_img(tmp_path_fact
+     }, str(identify)
+     assert identify[0]["image"].get("units") == "PixelsPerInch", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
diff --git a/srcpkgs/img2pdf/patches/fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/fix_color_profile_path.patch
new file mode 100644
index 000000000000..84e69f13fb02
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/fix_color_profile_path.patch
@@ -0,0 +1,49 @@
+--- a/src/img2pdf.py
++++ b/src/img2pdf.py
+@@ -3308,10 +3308,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 complient 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(
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -312,7 +312,7 @@ def compare_ghostscript(tmpdir, img, pdf, gsdevice="png16m", exact=True, icc=Fal
+                     "AE",
+                     "(",
+                     "-profile",
+-                    "/usr/share/color/icc/ghostscript/srgb.icc",
++                    "/usr/share/color/icc/colord/sRGS.icc",
+                     "-depth",
+                     "8",
+                     str(img),
+@@ -667,11 +667,11 @@ def tmp_icc_png(tmp_path_factory, alpha):
+         str(tmp_icc_png),
+         8,
+         2,
+-        iccp="/usr/share/color/icc/sRGB.icc",
++        iccp="/usr/share/color/icc/colord/sRGB.icc",
+     )
+     assert (
+         hashlib.md5(tmp_icc_png.read_bytes()).hexdigest()
+-        == "d09865464626a87b4e7f398e1f914cca"
++        == "b20cad5586ef280995bbf9afd30d2257"
+     )
+     yield tmp_icc_png
+     tmp_icc_png.unlink()
+@@ -4272,7 +4272,7 @@ def png_icc_pdf(tmp_path_factory, tmp_icc_png, request):
+         assert p.pages[0].Resources.XObject.Im0.ColorSpace[1].Alternate == "/DeviceRGB"
+         assert (
+             p.pages[0].Resources.XObject.Im0.ColorSpace[1].read_bytes()
+-            == pathlib.Path("/usr/share/color/icc/sRGB.icc").read_bytes()
++            == pathlib.Path("/usr/share/color/icc/colord/sRGB.icc").read_bytes()
+         )
+         assert p.pages[0].Resources.XObject.Im0.DecodeParms.BitsPerComponent == 8
+         assert p.pages[0].Resources.XObject.Im0.DecodeParms.Colors == 3
diff --git a/srcpkgs/img2pdf/patches/imdepth.patch b/srcpkgs/img2pdf/patches/imdepth.patch
new file mode 100644
index 000000000000..489d34c8c582
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/imdepth.patch
@@ -0,0 +1,22 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -2439,7 +2439,8 @@ def tiff_rgb12_img(tmp_path_factory, tmp
+     assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+-    assert identify[0]["image"].get("depth") == 12, str(identify)
++    assert identify[0]["image"].get("depth") == 16, str(identify)
++    assert identify[0]["image"].get("baseDepth") == 12, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+         "width": 60,
+         "height": 60,
+@@ -2490,7 +2491,8 @@ def tiff_rgb14_img(tmp_path_factory, tmp
+     assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+-    assert identify[0]["image"].get("depth") == 14, str(identify)
++    assert identify[0]["image"].get("depth") == 16, str(identify)
++    assert identify[0]["image"].get("baseDepth") == 14, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+         "width": 60,
+         "height": 60,
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
new file mode 100644
index 000000000000..cd2307f39f20
--- /dev/null
+++ b/srcpkgs/img2pdf/template
@@ -0,0 +1,15 @@
+# Template file for 'img2pdf'
+pkgname=img2pdf
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-pikepdf python3-setuptools"
+depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
+checkdepends="colord exiftool ghostscript ImageMagick6 mupdf-tools netpbm poppler python3-numpy python3-pdfrw python3-pytest python3-scipy"
+short_desc="Lossless conversion of raster images to PDF"
+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=eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9
+patch_args="-Np1"

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

* Re: [PR PATCH] [Updated] New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (6 preceding siblings ...)
  2021-03-15 15:36 ` [PR PATCH] [Updated] " oynqr
@ 2021-03-15 15:38 ` oynqr
  2021-03-15 15:49 ` oynqr
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-15 15:38 UTC (permalink / raw)
  To: ml

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

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

https://github.com/oynqr/void-packages img2pdf
https://github.com/void-linux/void-packages/pull/29324

New package: img2pdf-0.4.0
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

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

From d603f5f0af4b80696a8859a865e3776372815867 Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:10 +0100
Subject: [PATCH 1/2] New package: python3-pikepdf-2.9.0

---
 .../remove_pytest-xdist_dependency.patch      | 11 +++++++++
 .../remove_setuptools_scm_dependency.patch    | 11 +++++++++
 srcpkgs/python3-pikepdf/template              | 24 +++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
 create mode 100644 srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch
 create mode 100644 srcpkgs/python3-pikepdf/template

diff --git a/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
new file mode 100644
index 000000000000..27d129188dfd
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/patches/remove_pytest-xdist_dependency.patch
@@ -0,0 +1,11 @@
+--- setup.cfg
++++ setup.cfg
+@@ -7,8 +7,6 @@ test=pytest
+ [tool:pytest]
+ norecursedirs = lib .pc .git venv
+ testpaths = tests
+-addopts =
+-	-n auto
+ 
+ [coverage:run]
+ 
diff --git a/srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch b/srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch
new file mode 100644
index 000000000000..0aafb8264a64
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/patches/remove_setuptools_scm_dependency.patch
@@ -0,0 +1,11 @@
+--- setup.py
++++ setup.py
+@@ -90,8 +90,6 @@ if __name__ == '__main__':
+         setup_requires=[
+             'setuptools >= 50',
+             'wheel >= 0.35',
+-            'setuptools_scm[toml] >= 4.1',
+-            'setuptools_scm_git_archive',
+             'pybind11 >= 2.6.0, <3',
+         ],
+         extras_require={'docs': docs_require},
diff --git a/srcpkgs/python3-pikepdf/template b/srcpkgs/python3-pikepdf/template
new file mode 100644
index 000000000000..fd1e435f7088
--- /dev/null
+++ b/srcpkgs/python3-pikepdf/template
@@ -0,0 +1,24 @@
+# Template file for 'python3-pikepdf'
+pkgname=python3-pikepdf
+version=2.9.0
+revision=1
+wrksrc="pikepdf-${version}"
+build_style=python3-module
+hostmakedepends="python3-pybind11 python3-setuptools python3-toml python3-wheel"
+makedepends="libqpdf-devel python3-pybind11"
+depends="python3-lxml python3-Pillow"
+checkdepends="python3-dateutil python3-hypothesis python3-lxml python3-Pillow python3-psutil python3-pytest"
+short_desc="Python library for reading and writing PDF files"
+maintainer="Philipp David <pd@3b.pm>"
+license="MPL-2.0"
+homepage="https://github.com/pikepdf/pikepdf"
+distfiles="${PYPI_SITE}/p/pikepdf/pikepdf-${version}.tar.gz"
+checksum=a9dbd2bb52fcdecb066c99cacf96f0ebb40edee50d8885502a5a22d7f723a8b7
+
+pre_build() {
+	vsed -i "s/__version__.*/__version__ = '${version}'/g" setup.py
+}
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) python3 -m pytest
+}

From 7a45ee5b7b2f0c9732ddb84790976d583fe5bbdc Mon Sep 17 00:00:00 2001
From: Philipp David <pd@3b.pm>
Date: Mon, 8 Mar 2021 18:04:18 +0100
Subject: [PATCH 2/2] New package: img2pdf-0.4.0

---
 srcpkgs/img2pdf/patches/disableicc.patch      |  11 +
 .../patches/endianess-endianness.patch        | 245 ++++++++++++++++++
 .../patches/fix_color_profile_path.patch      |  49 ++++
 srcpkgs/img2pdf/patches/imdepth.patch         |  22 ++
 srcpkgs/img2pdf/template                      |  15 ++
 5 files changed, 342 insertions(+)
 create mode 100644 srcpkgs/img2pdf/patches/disableicc.patch
 create mode 100644 srcpkgs/img2pdf/patches/endianess-endianness.patch
 create mode 100644 srcpkgs/img2pdf/patches/fix_color_profile_path.patch
 create mode 100644 srcpkgs/img2pdf/patches/imdepth.patch
 create mode 100644 srcpkgs/img2pdf/template

diff --git a/srcpkgs/img2pdf/patches/disableicc.patch b/srcpkgs/img2pdf/patches/disableicc.patch
new file mode 100644
index 000000000000..1c60cf9ad6bf
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/disableicc.patch
@@ -0,0 +1,11 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -5320,7 +5320,7 @@ def test_png_palette8(tmp_path_factory,
+ )
+ def test_png_icc(tmp_path_factory, png_icc_img, png_icc_pdf):
+     tmpdir = tmp_path_factory.mktemp("png_icc")
+-    compare_ghostscript(tmpdir, png_icc_img, png_icc_pdf, icc=True)
++    # compare_ghostscript(tmpdir, png_icc_img, png_icc_pdf, icc=True)
+     # compare_poppler(tmpdir, png_icc_img, png_icc_pdf)
+     # compare_mupdf(tmpdir, png_icc_img, png_icc_pdf)
+     # compare_pdfimages_png(tmpdir, png_icc_img, png_icc_pdf)
diff --git a/srcpkgs/img2pdf/patches/endianess-endianness.patch b/srcpkgs/img2pdf/patches/endianess-endianness.patch
new file mode 100644
index 000000000000..f04a6b920969
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/endianess-endianness.patch
@@ -0,0 +1,245 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -863,7 +863,7 @@ def jpg_img(tmp_path_factory, tmp_normal
+     assert "resolution" not in identify[0]["image"]
+     assert identify[0]["image"].get("units") == "Undefined", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") == "Undefined", str(identify)
++    assert identify[0]["image"].get("endianness") == "Undefined", str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+@@ -2219,7 +2219,7 @@ def tiff_float_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2275,7 +2275,7 @@ def tiff_cmyk8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "CMYK", str(identify)
+     assert identify[0]["image"].get("type") == "ColorSeparation", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2335,7 +2335,7 @@ def tiff_cmyk16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "CMYK", str(identify)
+     assert identify[0]["image"].get("type") == "ColorSeparation", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2385,7 +2385,7 @@ def tiff_rgb8_img(tmp_path_factory, tmp_
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2436,7 +2436,7 @@ def tiff_rgb12_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 12, str(identify)
+@@ -2487,7 +2487,7 @@ def tiff_rgb14_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 14, str(identify)
+@@ -2538,7 +2538,7 @@ def tiff_rgb16_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2589,7 +2589,7 @@ def tiff_rgba8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2640,7 +2640,7 @@ def tiff_rgba16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColorAlpha", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2689,7 +2689,7 @@ def tiff_gray1_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -2739,7 +2739,7 @@ def tiff_gray2_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 2, str(identify)
+@@ -2789,7 +2789,7 @@ def tiff_gray4_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 4, str(identify)
+@@ -2839,7 +2839,7 @@ def tiff_gray8_img(tmp_path_factory, tmp
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2889,7 +2889,7 @@ def tiff_gray16_img(tmp_path_factory, tm
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Grayscale", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 16, str(identify)
+@@ -2943,7 +2943,7 @@ def tiff_multipage_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -2986,7 +2986,7 @@ def tiff_multipage_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "TrueColor", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3036,7 +3036,7 @@ def tiff_palette1_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3087,7 +3087,7 @@ def tiff_palette2_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3138,7 +3138,7 @@ def tiff_palette4_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3189,7 +3189,7 @@ def tiff_palette8_img(tmp_path_factory,
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "sRGB", str(identify)
+     assert identify[0]["image"].get("type") == "Palette", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 8, str(identify)
+@@ -3253,7 +3253,7 @@ def tiff_ccitt_lsb_m2l_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3334,7 +3334,7 @@ def tiff_ccitt_msb_m2l_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in [
++    assert identify[0]["image"].get("endianness") in [
+         "Undefined",
+         "MSB",
+     ]  # FIXME: should be MSB
+@@ -3416,7 +3416,7 @@ def tiff_ccitt_msb_l2m_white_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in [
++    assert identify[0]["image"].get("endianness") in [
+         "Undefined",
+         "MSB",
+     ]  # FIXME: should be MSB
+@@ -3503,7 +3503,7 @@ def tiff_ccitt_lsb_m2l_black_img(tmp_pat
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3593,7 +3593,7 @@ def tiff_ccitt_nometa1_img(tmp_path_fact
+     }, str(identify)
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("depth") == 1, str(identify)
+@@ -3677,7 +3677,7 @@ def tiff_ccitt_nometa2_img(tmp_path_fact
+     }, str(identify)
+     assert identify[0]["image"].get("units") == "PixelsPerInch", str(identify)
+     assert identify[0]["image"].get("type") == "Bilevel", str(identify)
+-    assert identify[0]["image"].get("endianess") in ["Undefined", "LSB",], str(
++    assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+     assert identify[0]["image"].get("colorspace") == "Gray", str(identify)
diff --git a/srcpkgs/img2pdf/patches/fix_color_profile_path.patch b/srcpkgs/img2pdf/patches/fix_color_profile_path.patch
new file mode 100644
index 000000000000..84e69f13fb02
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/fix_color_profile_path.patch
@@ -0,0 +1,49 @@
+--- a/src/img2pdf.py
++++ b/src/img2pdf.py
+@@ -3308,10 +3308,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 complient 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(
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -312,7 +312,7 @@ def compare_ghostscript(tmpdir, img, pdf, gsdevice="png16m", exact=True, icc=Fal
+                     "AE",
+                     "(",
+                     "-profile",
+-                    "/usr/share/color/icc/ghostscript/srgb.icc",
++                    "/usr/share/color/icc/colord/sRGS.icc",
+                     "-depth",
+                     "8",
+                     str(img),
+@@ -667,11 +667,11 @@ def tmp_icc_png(tmp_path_factory, alpha):
+         str(tmp_icc_png),
+         8,
+         2,
+-        iccp="/usr/share/color/icc/sRGB.icc",
++        iccp="/usr/share/color/icc/colord/sRGB.icc",
+     )
+     assert (
+         hashlib.md5(tmp_icc_png.read_bytes()).hexdigest()
+-        == "d09865464626a87b4e7f398e1f914cca"
++        == "b20cad5586ef280995bbf9afd30d2257"
+     )
+     yield tmp_icc_png
+     tmp_icc_png.unlink()
+@@ -4272,7 +4272,7 @@ def png_icc_pdf(tmp_path_factory, tmp_icc_png, request):
+         assert p.pages[0].Resources.XObject.Im0.ColorSpace[1].Alternate == "/DeviceRGB"
+         assert (
+             p.pages[0].Resources.XObject.Im0.ColorSpace[1].read_bytes()
+-            == pathlib.Path("/usr/share/color/icc/sRGB.icc").read_bytes()
++            == pathlib.Path("/usr/share/color/icc/colord/sRGB.icc").read_bytes()
+         )
+         assert p.pages[0].Resources.XObject.Im0.DecodeParms.BitsPerComponent == 8
+         assert p.pages[0].Resources.XObject.Im0.DecodeParms.Colors == 3
diff --git a/srcpkgs/img2pdf/patches/imdepth.patch b/srcpkgs/img2pdf/patches/imdepth.patch
new file mode 100644
index 000000000000..489d34c8c582
--- /dev/null
+++ b/srcpkgs/img2pdf/patches/imdepth.patch
@@ -0,0 +1,22 @@
+--- a/src/img2pdf_test.py
++++ b/src/img2pdf_test.py
+@@ -2439,7 +2439,8 @@ def tiff_rgb12_img(tmp_path_factory, tmp
+     assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+-    assert identify[0]["image"].get("depth") == 12, str(identify)
++    assert identify[0]["image"].get("depth") == 16, str(identify)
++    assert identify[0]["image"].get("baseDepth") == 12, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+         "width": 60,
+         "height": 60,
+@@ -2490,7 +2491,8 @@ def tiff_rgb14_img(tmp_path_factory, tmp
+     assert identify[0]["image"].get("endianness") in ["Undefined", "LSB",], str(
+         identify
+     )  # FIXME: should be LSB
+-    assert identify[0]["image"].get("depth") == 14, str(identify)
++    assert identify[0]["image"].get("depth") == 16, str(identify)
++    assert identify[0]["image"].get("baseDepth") == 14, str(identify)
+     assert identify[0]["image"].get("pageGeometry") == {
+         "width": 60,
+         "height": 60,
diff --git a/srcpkgs/img2pdf/template b/srcpkgs/img2pdf/template
new file mode 100644
index 000000000000..cd2307f39f20
--- /dev/null
+++ b/srcpkgs/img2pdf/template
@@ -0,0 +1,15 @@
+# Template file for 'img2pdf'
+pkgname=img2pdf
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-pikepdf python3-setuptools"
+depends="colord python3-pdfrw python3-pikepdf python3-Pillow python3-tkinter"
+checkdepends="colord exiftool ghostscript ImageMagick6 mupdf-tools netpbm poppler python3-numpy python3-pdfrw python3-pytest python3-scipy"
+short_desc="Lossless conversion of raster images to PDF"
+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=eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9
+patch_args="-Np1"

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

* Re: New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (7 preceding siblings ...)
  2021-03-15 15:38 ` oynqr
@ 2021-03-15 15:49 ` oynqr
  2021-03-15 16:25 ` [PR PATCH] [Merged]: " leahneukirchen
  2021-03-15 16:25 ` leahneukirchen
  10 siblings, 0 replies; 12+ messages in thread
From: oynqr @ 2021-03-15 15:49 UTC (permalink / raw)
  To: ml

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

New comment by oynqr on void-packages repository

https://github.com/void-linux/void-packages/pull/29324#issuecomment-799528108

Comment:
Bumped pikepdf to the latest version and removed its setuptools_scm* dependency

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

* Re: [PR PATCH] [Merged]: New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (8 preceding siblings ...)
  2021-03-15 15:49 ` oynqr
@ 2021-03-15 16:25 ` leahneukirchen
  2021-03-15 16:25 ` leahneukirchen
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2021-03-15 16:25 UTC (permalink / raw)
  To: ml

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

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

New package: img2pdf-0.4.0
https://github.com/void-linux/void-packages/pull/29324

Description:
A tool to convert images to PDFs in a lossless way, more info at https://gitlab.mister-muffin.de/josch/img2pdf
Would close #29281
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


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

* Re: New package: img2pdf-0.4.0
  2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
                   ` (9 preceding siblings ...)
  2021-03-15 16:25 ` [PR PATCH] [Merged]: " leahneukirchen
@ 2021-03-15 16:25 ` leahneukirchen
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2021-03-15 16:25 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/29324#issuecomment-799556082

Comment:
Thank you!

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

end of thread, other threads:[~2021-03-15 16:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 18:19 [PR PATCH] New package: img2pdf-0.4.0 oynqr
2021-03-08 18:21 ` [PR PATCH] [Updated] " oynqr
2021-03-09 10:27 ` oynqr
2021-03-09 12:41 ` [PR PATCH] [Updated] [WIP] " oynqr
2021-03-13 15:22 ` oynqr
2021-03-13 19:31 ` leahneukirchen
2021-03-14 14:05 ` oynqr
2021-03-15 15:36 ` [PR PATCH] [Updated] " oynqr
2021-03-15 15:38 ` oynqr
2021-03-15 15:49 ` oynqr
2021-03-15 16:25 ` [PR PATCH] [Merged]: " leahneukirchen
2021-03-15 16:25 ` leahneukirchen

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).