media-gfx/ipe-tools: Add ipe-tools-7.2.24.1
[shuber-gentoo-overlay.git] / media-gfx / ipe-tools / ipe-tools-7.2.24.1.ebuild
similarity index 56%
rename from media-gfx/ipe-tools/ipe-tools-7.2.13.1.ebuild
rename to media-gfx/ipe-tools/ipe-tools-7.2.24.1.ebuild
index fb126112bb5099323b314f8c6eab6d96c84a0629..4e144cfa47e1020b189e1d567561aa3a94c2a570 100644 (file)
@@ -3,7 +3,7 @@
 
 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."
@@ -13,9 +13,10 @@ SRC_URI="https://github.com/otfried/ipe-tools/archive/v${PV}.tar.gz"
 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 )"
@@ -23,7 +24,7 @@ RDEPEND="${DEPEND}"
 BDEPEND=""
 
 src_compile() {
-       # tools with makefile
+       # Tools with makefile
        for tool in figtoipe ipe5toxml; do
                if use ${tool}; then
                        cd ${tool}
@@ -32,24 +33,24 @@ src_compile() {
                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
 }