summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2021-08-22 02:57:48 +0200
committerLouis Sautier <sbraz@gentoo.org>2021-08-22 03:12:41 +0200
commitee9d36f9f57d7337972a5c61c37683d33e5b66d5 (patch)
tree7fbc9fb3d30e85cb4e8e9c331bdb99fcb2d14d86 /media-gfx
parentmedia-libs/dumb: keyword 2.0.3 for ~riscv (diff)
downloadgentoo-ee9d36f9f57d7337972a5c61c37683d33e5b66d5.tar.gz
gentoo-ee9d36f9f57d7337972a5c61c37683d33e5b66d5.tar.bz2
gentoo-ee9d36f9f57d7337972a5c61c37683d33e5b66d5.zip
media-gfx/img2pdf: enable py3.10, re-enable tests, fix deps
Closes: https://bugs.gentoo.org/807969 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/img2pdf/Manifest1
-rw-r--r--media-gfx/img2pdf/img2pdf-0.4.1-r1.ebuild61
2 files changed, 62 insertions, 0 deletions
diff --git a/media-gfx/img2pdf/Manifest b/media-gfx/img2pdf/Manifest
index a3408876defc..ec668cd8f7f2 100644
--- a/media-gfx/img2pdf/Manifest
+++ b/media-gfx/img2pdf/Manifest
@@ -1,3 +1,4 @@
DIST img2pdf-0.3.6.tar.gz 91006 BLAKE2B ad89b42be4613c30383770f336b07773bf13e87061fca61eb7d5e25d6489662fc2bae94d9a6d61d531a77f41b9e94492d0db1f32570f6d471fa9f8cb0816630d SHA512 2a9d31b9de52123941fd650123a483f4dc0757edda304da994353b5f3167bddbb25fa1ed8fededcf859c5d07b65b9c2d5185000949002a68dcae1e7bf0f1547d
DIST img2pdf-0.4.0.tar.gz 107027 BLAKE2B 0bf13e2d4a5aff68779130bc14100a5c6d1ac4eaca9da28ceb50104550b6e4331f6a2202514bcdac0480c0148794d18e9f2dd46ded68bbaa301a207460f91c85 SHA512 bab9ee6ef5273a686cb10e52bdeb62b6df3c0da99d0f0558677e07dc7ad776c2d62829a2f5e9c5639acfb9fc6e9c5e3a81aed42dc288c2a39d245775f1d4391b
+DIST img2pdf-0.4.1-imagemagick-7-tests.patch.gz 2586 BLAKE2B 3d905b22c02fadf69e6329001cf7d6562d5809ba27842a5e630d87054979d953b641afb0b461f37bc9e379af808d0dc9e95478bdd5143047ea19d13d38e04593 SHA512 c9c5e88aea344a17bb57ff6b4540d7010537df0987cd3884e36220236753a42a71377468b556c17090ba22497a50c7d9365373aaeb007b75240ad55d21e9032a
DIST img2pdf-0.4.1.tar.gz 96699 BLAKE2B f5a41a3a3d1b1ae7caadab4f37df644ad28a3ef4bd7a56a339253f0aead4d2427f05373dcfd16b10d82a6167243b3b03906e9f95b7ae0dcdbea6a666905c45a2 SHA512 e71833250509d52b8782a8bc9e12a8de6ab7ae06d5e6e235c0b3787bfad1070b5ed90934b21e4decc9b2c7008eeb0424f9df27e44ec66259916d3a2fdb73d1f1
diff --git a/media-gfx/img2pdf/img2pdf-0.4.1-r1.ebuild b/media-gfx/img2pdf/img2pdf-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..443efdfa6bd0
--- /dev/null
+++ b/media-gfx/img2pdf/img2pdf-0.4.1-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Losslessly convert raster images to PDF"
+HOMEPAGE="https://gitlab.mister-muffin.de/josch/img2pdf"
+SRC_URI="
+ mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+ https://dev.gentoo.org/~sbraz/${P}-imagemagick-7-tests.patch.gz
+"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gui"
+
+# pytest-xdist isn't really required but it helps speed up tests
+BDEPEND="
+ test? (
+ app-text/ghostscript-gpl
+ app-text/poppler
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pdfrw[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ media-gfx/imagemagick[jpeg,jpeg2k,png,q8,q32,tiff]
+ media-libs/exiftool
+ media-libs/netpbm
+ )
+"
+RDEPEND="
+ dev-python/pikepdf[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ gui? ( $(python_gen_impl_dep tk) )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # Backport: commits from 853a1ec3634961ec1ebd5a06771d2770037ea802
+ # up to 152f6fb629581ab2f45a3b520f9468e99b0bc6b8
+ "${WORKDIR}/${P}-imagemagick-7-tests.patch"
+)
+
+src_prepare() {
+ distutils-r1_python_prepare_all
+
+ # Remove gui executable if there's no demand/support for it.
+ if ! use gui; then
+ sed -i '/gui_scripts/d' setup.py || die
+ fi
+}
+
+python_test() {
+ epytest -n auto
+}