1 |
commit: 0d106d18853c1f4b26ab99b4419aa8280cb3efb1 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 8 16:44:47 2022 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 8 16:44:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d106d18 |
7 |
|
8 |
media-gfx/img2pdf: bump to 0.4.3 |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
12 |
|
13 |
media-gfx/img2pdf/Manifest | 1 + |
14 |
.../files/img2pdf-0.4.3-test-gif-animation.patch | 13 +++++ |
15 |
media-gfx/img2pdf/img2pdf-0.4.3.ebuild | 60 ++++++++++++++++++++++ |
16 |
3 files changed, 74 insertions(+) |
17 |
|
18 |
diff --git a/media-gfx/img2pdf/Manifest b/media-gfx/img2pdf/Manifest |
19 |
index bc68121b7381..508fb8f29dc7 100644 |
20 |
--- a/media-gfx/img2pdf/Manifest |
21 |
+++ b/media-gfx/img2pdf/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST img2pdf-0.4.1-imagemagick-7-tests.patch.gz 2586 BLAKE2B 3d905b22c02fadf69e6329001cf7d6562d5809ba27842a5e630d87054979d953b641afb0b461f37bc9e379af808d0dc9e95478bdd5143047ea19d13d38e04593 SHA512 c9c5e88aea344a17bb57ff6b4540d7010537df0987cd3884e36220236753a42a71377468b556c17090ba22497a50c7d9365373aaeb007b75240ad55d21e9032a |
24 |
DIST img2pdf-0.4.1.tar.gz 96699 BLAKE2B f5a41a3a3d1b1ae7caadab4f37df644ad28a3ef4bd7a56a339253f0aead4d2427f05373dcfd16b10d82a6167243b3b03906e9f95b7ae0dcdbea6a666905c45a2 SHA512 e71833250509d52b8782a8bc9e12a8de6ab7ae06d5e6e235c0b3787bfad1070b5ed90934b21e4decc9b2c7008eeb0424f9df27e44ec66259916d3a2fdb73d1f1 |
25 |
+DIST img2pdf-0.4.3.tar.gz 98656 BLAKE2B ec7be83fa7fc38f94c7770a2566a49a39e5fd0abb715de74fc3f65d59087cecdd009f4284e647facaf6ae019a118b4bedf7ce8d4a09b8479a299c8404a8940d5 SHA512 00755788c7380e44733c5a309428894b6689e93d4d7cca8f84681d12977848971a6b1a7c92c7203258a529894e7a0debb5beaeb6b375de769a0d600ea8d65423 |
26 |
|
27 |
diff --git a/media-gfx/img2pdf/files/img2pdf-0.4.3-test-gif-animation.patch b/media-gfx/img2pdf/files/img2pdf-0.4.3-test-gif-animation.patch |
28 |
new file mode 100644 |
29 |
index 000000000000..459746455c9a |
30 |
--- /dev/null |
31 |
+++ b/media-gfx/img2pdf/files/img2pdf-0.4.3-test-gif-animation.patch |
32 |
@@ -0,0 +1,13 @@ |
33 |
+diff -r -U2 img2pdf-0.4.3.orig/src/img2pdf_test.py img2pdf-0.4.3/src/img2pdf_test.py |
34 |
+--- img2pdf-0.4.3.orig/src/img2pdf_test.py 2021-10-24 20:46:53.000000000 +0700 |
35 |
++++ img2pdf-0.4.3/src/img2pdf_test.py 2022-02-08 23:20:27.584463297 +0700 |
36 |
+@@ -5613,8 +5613,5 @@ |
37 |
+ |
38 |
+ |
39 |
+-@×××××××××××.skipif( |
40 |
+- sys.platform in ["win32"], |
41 |
+- reason="test utilities not available on Windows and MacOS", |
42 |
+-) |
43 |
++@×××××××××××.skip(reason="gif animation test fails") |
44 |
+ def test_gif_animation(tmp_path_factory, gif_animation_img, gif_animation_pdf): |
45 |
+ tmpdir = tmp_path_factory.mktemp("gif_animation") |
46 |
|
47 |
diff --git a/media-gfx/img2pdf/img2pdf-0.4.3.ebuild b/media-gfx/img2pdf/img2pdf-0.4.3.ebuild |
48 |
new file mode 100644 |
49 |
index 000000000000..7900354a9775 |
50 |
--- /dev/null |
51 |
+++ b/media-gfx/img2pdf/img2pdf-0.4.3.ebuild |
52 |
@@ -0,0 +1,60 @@ |
53 |
+# Copyright 1999-2022 Gentoo Authors |
54 |
+# Distributed under the terms of the GNU General Public License v2 |
55 |
+ |
56 |
+EAPI=8 |
57 |
+ |
58 |
+PYTHON_COMPAT=( python3_{8..10} ) |
59 |
+ |
60 |
+inherit distutils-r1 |
61 |
+ |
62 |
+DESCRIPTION="Losslessly convert raster images to PDF" |
63 |
+HOMEPAGE="https://gitlab.mister-muffin.de/josch/img2pdf" |
64 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
65 |
+ |
66 |
+LICENSE="LGPL-3+" |
67 |
+SLOT="0" |
68 |
+KEYWORDS="~amd64 ~x86" |
69 |
+IUSE="gui" |
70 |
+ |
71 |
+# pytest-xdist isn't really required but it helps speed up tests |
72 |
+BDEPEND=" |
73 |
+ test? ( |
74 |
+ app-text/ghostscript-gpl |
75 |
+ app-text/mupdf |
76 |
+ app-text/poppler[cairo,png,tiff] |
77 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
78 |
+ dev-python/pdfrw[${PYTHON_USEDEP}] |
79 |
+ dev-python/pillow[tiff,${PYTHON_USEDEP}] |
80 |
+ dev-python/pytest-xdist[${PYTHON_USEDEP}] |
81 |
+ dev-python/scipy[${PYTHON_USEDEP}] |
82 |
+ media-gfx/imagemagick[jpeg,jpeg2k,lcms,png,-q8,-q32,tiff] |
83 |
+ media-libs/exiftool |
84 |
+ media-libs/netpbm[jpeg] |
85 |
+ ) |
86 |
+" |
87 |
+RDEPEND=" |
88 |
+ dev-python/pikepdf[${PYTHON_USEDEP}] |
89 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
90 |
+ gui? ( $(python_gen_impl_dep tk) ) |
91 |
+" |
92 |
+ |
93 |
+# gif animation test fails |
94 |
+PATCHES=( "${FILESDIR}"/${P}-test-gif-animation.patch ) |
95 |
+ |
96 |
+distutils_enable_tests pytest |
97 |
+ |
98 |
+src_prepare() { |
99 |
+ distutils-r1_python_prepare_all |
100 |
+ |
101 |
+ # Remove gui executable if there's no demand/support for it. |
102 |
+ if ! use gui; then |
103 |
+ sed -i '/gui_scripts/d' setup.py || die |
104 |
+ fi |
105 |
+ |
106 |
+ # gif animation test fails |
107 |
+ rm src/tests/input/animation.gif src/tests/output/animation.gif.pdf || die "rm animation gif failes" |
108 |
+} |
109 |
+ |
110 |
+python_test() { |
111 |
+ epytest -n auto |
112 |
+} |