1 # Copyright 2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{8..10} )
7 inherit python-single-r1
9 DESCRIPTION="Tools to use with the Ipe drawing editor."
10 HOMEPAGE="https://github.com/otfried/ipe-tools"
11 SRC_URI="https://github.com/otfried/ipe-tools/archive/v${PV}.tar.gz"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="+annotate +svgtoipe +figtoipe +ipe5toxml +pdftoipe"
18 DEPEND="annotate? ( ${PYTHON_DEPS} dev-python/PyPDF2 )
19 svgtoipe? ( !media-gfx/svgtoipe ${PYTHON_DEPS} dev-lang/python[xml] )
20 figtoipe? ( !media-gfx/figtoipe sys-libs/zlib )
21 ipe5toxml? ( !media-gfx/ipe5toxml )
22 pdftoipe? ( !media-gfx/pdftoipe app-text/poppler )"
28 for tool in figtoipe ipe5toxml; do
36 # Fixing python tool naming
37 use svgtoipe && mv svgtoipe/svgtoipe.py svgtoipe/svgtoipe
38 # File collision with annotate from media-libs/gd, hence suffix -ipe
39 use annotate && mv annotate/annotate.py annotate/annotate-ipe
45 for tool in svgtoipe figtoipe ipe5toxml; do
46 use ${tool} && doexe ${tool}/${tool}
47 use ${tool} && doman ${tool}/${tool}.1
50 use annotate && doexe annotate/annotate-ipe
53 if use annotate || use svgtoipe; then
54 python_fix_shebang ${ED}/usr/bin