4d4280ca555f11d3422df54e7674796c43fb29ac
[shuber-gentoo-overlay.git] / media-gfx / ipe-tools / ipe-tools-7.2.13.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_{6,7,8} )
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="+svgtoipe +figtoipe +ipe5toxml +pdftoipe"
17
18 DEPEND="svgtoipe? ( !media-gfx/svgtoipe ${PYTHON_DEPS} dev-lang/python[xml] )
19 figtoipe? ( !media-gfx/figtoipe sys-libs/zlib )
20 ipe5toxml? ( !media-gfx/ipe5toxml )
21 pdftoipe? ( !media-gfx/pdftoipe app-text/poppler )"
22 RDEPEND="${DEPEND}"
23 BDEPEND=""
24
25 src_compile() {
26 # tools with makefile
27 for tool in figtoipe ipe5toxml; do
28 if use ${tool}; then
29 cd ${tool}
30 emake
31 cd ..
32 fi
33 done
34
35 # Fixing python tools
36 if use svgtoipe; then
37 mv svgtoipe/svgtoipe.py svgtoipe/svgtoipe
38 fi
39 }
40
41 src_install() {
42 exeinto /usr/bin/
43
44 for tool in svgtoipe figtoipe ipe5toxml; do
45 if use ${tool}; then
46 doexe ${tool}/${tool}
47 doman ${tool}/${tool}.1
48 fi
49 done
50
51 # Fixing python tools
52 if use svgtoipe; then
53 python_fix_shebang ${ED}/usr/bin
54 fi
55 }