summaryrefslogtreecommitdiff
path: root/media-gfx/img2pdf/img2pdf-0.4.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-15 13:42:19 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-15 13:42:19 +0100
commitbd8ca999980e9c0c9ae40a11789c858bb58769e3 (patch)
tree355d68a84921e04a81231e74fc062f229f76a733 /media-gfx/img2pdf/img2pdf-0.4.4.ebuild
parentb3f2504c1d05b5999b74b2135860fc721e3adf68 (diff)
gentoo auto-resync : 15:07:2022 - 13:42:19
Diffstat (limited to 'media-gfx/img2pdf/img2pdf-0.4.4.ebuild')
-rw-r--r--media-gfx/img2pdf/img2pdf-0.4.4.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/media-gfx/img2pdf/img2pdf-0.4.4.ebuild b/media-gfx/img2pdf/img2pdf-0.4.4.ebuild
new file mode 100644
index 000000000000..8787b8ffc761
--- /dev/null
+++ b/media-gfx/img2pdf/img2pdf-0.4.4.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 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"
+
+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/mupdf
+ app-text/poppler[cairo,png,tiff]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pdfrw[${PYTHON_USEDEP}]
+ dev-python/pillow[tiff,${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ media-gfx/imagemagick[jpeg,jpeg2k,lcms,png,-q8,-q32,tiff]
+ media-libs/exiftool
+ media-libs/netpbm[jpeg]
+ )
+"
+RDEPEND="
+ dev-python/pikepdf[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ gui? ( $(python_gen_impl_dep tk) )
+"
+
+# gif animation test fails
+PATCHES=( "${FILESDIR}"/img2pdf-0.4.3-test-gif-animation.patch )
+
+distutils_enable_tests pytest
+
+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
+
+ # gif animation test fails
+ rm src/tests/input/animation.gif src/tests/output/animation.gif.pdf || die "rm animation gif failes"
+}
+
+python_test() {
+ epytest -n auto
+}