1 # Copyright © 2017 Nick Bowler
2 # License GPLv2+: GNU General Public License version 2 or later.
3 # There is NO WARRANTY, to the extent permitted by law.
5 # This file is a modified version of the original ebuild from Gentoo,
6 # covered by the following copyright and permission notice:
8 # Copyright 1999-2017 Gentoo Foundation
9 # Distributed under the terms of the GNU General Public License v2
13 PYTHON_COMPAT=( python2_7 )
17 DESCRIPTION="Convert vector graphic file formats like .cdr, .svg, wmf and more."
18 HOMEPAGE="https://sk1project.net/modules.php?name=Products&product=uniconvertor"
19 SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
21 KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x86-solaris"
23 LICENSE="GPL-2 LGPL-2"
27 dev-python/pycairo[${PYTHON_USEDEP}]
28 imagemagick? ( media-gfx/imagemagick:= )
30 dev-python/pillow[${PYTHON_USEDEP}]"
33 app-text/ghostscript-gpl"
36 "${FILESDIR}"/${P}-import.patch
37 "${FILESDIR}"/${P}-test.patch
40 python_prepare_all() {
43 if use imagemagick; then
44 PATCHES+=("$FILESDIR/$P-libimg.patch")
45 wand=$(pkg-config --libs MagickWand | sed -e "s:^ *::g" -e "s: *$::g" -e "s:-l:\':g" -e "s: :',:g" -e "s:$:':g" -e "s:,'$::g")
48 distutils-r1_python_prepare_all
50 if use imagemagick; then
52 -e "/libraries/s:'MagickWand':${wand}:g" \
57 "${EPREFIX}"/usr/share/imagemagick/sRGB.icm \
58 src/unittests/cms_tests/cms_data/sRGB.icm || die
63 #distutils_install_for_testing
64 cd src/unittests || die
65 ${EPYTHON} all_tests.py || die