EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit python-single-r1
DESCRIPTION="Tools to use with the Ipe drawing editor."
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="+svgtoipe +figtoipe +ipe5toxml +pdftoipe"
+IUSE="+annotate +svgtoipe +figtoipe +ipe5toxml +pdftoipe"
-DEPEND="svgtoipe? ( !media-gfx/svgtoipe ${PYTHON_DEPS} dev-lang/python[xml] )
+DEPEND="annotate? ( ${PYTHON_DEPS} dev-python/pypdf )
+ svgtoipe? ( !media-gfx/svgtoipe ${PYTHON_DEPS} dev-lang/python[xml] )
figtoipe? ( !media-gfx/figtoipe sys-libs/zlib )
ipe5toxml? ( !media-gfx/ipe5toxml )
pdftoipe? ( !media-gfx/pdftoipe app-text/poppler )"
BDEPEND=""
src_compile() {
- # tools with makefile
+ # Tools with makefile
for tool in figtoipe ipe5toxml; do
if use ${tool}; then
cd ${tool}
fi
done
- # Fixing python tools
- if use svgtoipe; then
- mv svgtoipe/svgtoipe.py svgtoipe/svgtoipe
- fi
+ # Fixing python tool naming
+ use svgtoipe && mv svgtoipe/svgtoipe.py svgtoipe/svgtoipe
+ # File collision with annotate from media-libs/gd, hence suffix -ipe
+ use annotate && mv annotate/annotate.py annotate/annotate-ipe
}
src_install() {
exeinto /usr/bin/
for tool in svgtoipe figtoipe ipe5toxml; do
- if use ${tool}; then
- doexe ${tool}/${tool}
- doman ${tool}/${tool}.1
- fi
+ use ${tool} && doexe ${tool}/${tool}
+ use ${tool} && doman ${tool}/${tool}.1
done
+ use annotate && doexe annotate/annotate-ipe
+
# Fixing python tools
- if use svgtoipe; then
+ if use annotate || use svgtoipe; then
python_fix_shebang ${ED}/usr/bin
fi
}