media-gfx/cgal-ipelets: Add cgal-ipelets-5.6
[shuber-gentoo-overlay.git] / media-gfx / ipe-tools / ipe-tools-7.2.20.1.ebuild
1 # Copyright 2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{8..10} )
7 inherit python-single-r1
8
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"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="+annotate +svgtoipe +figtoipe +ipe5toxml +pdftoipe"
17
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 )"
23 RDEPEND="${DEPEND}"
24 BDEPEND=""
25
26 src_compile() {
27 # Tools with makefile
28 for tool in figtoipe ipe5toxml; do
29 if use ${tool}; then
30 cd ${tool}
31 emake
32 cd ..
33 fi
34 done
35
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
40 }
41
42 src_install() {
43 exeinto /usr/bin/
44
45 for tool in svgtoipe figtoipe ipe5toxml; do
46 use ${tool} && doexe ${tool}/${tool}
47 use ${tool} && doman ${tool}/${tool}.1
48 done
49
50 use annotate && doexe annotate/annotate-ipe
51
52 # Fixing python tools
53 if use annotate || use svgtoipe; then
54 python_fix_shebang ${ED}/usr/bin
55 fi
56 }