X-Git-Url: https://git.sthu.org/?p=shuber-gentoo-overlay.git;a=blobdiff_plain;f=media-gfx%2Fipe-tools%2Fipe-tools-7.2.20.1.ebuild;fp=media-gfx%2Fipe-tools%2Fipe-tools-7.2.20.1.ebuild;h=73f53b647ba3797341b711cda2910064535dc126;hp=0000000000000000000000000000000000000000;hb=2e1e793428302fb31e47cdb42f99cd7e994e5100;hpb=843bdee827fc4b555efe9c79f79b795628c16f74 diff --git a/media-gfx/ipe-tools/ipe-tools-7.2.20.1.ebuild b/media-gfx/ipe-tools/ipe-tools-7.2.20.1.ebuild new file mode 100644 index 0000000..73f53b6 --- /dev/null +++ b/media-gfx/ipe-tools/ipe-tools-7.2.20.1.ebuild @@ -0,0 +1,56 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit python-single-r1 + +DESCRIPTION="Tools to use with the Ipe drawing editor." +HOMEPAGE="https://github.com/otfried/ipe-tools" +SRC_URI="https://github.com/otfried/ipe-tools/archive/v${PV}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+annotate +svgtoipe +figtoipe +ipe5toxml +pdftoipe" + +DEPEND="annotate? ( ${PYTHON_DEPS} dev-python/PyPDF2 ) + 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 )" +RDEPEND="${DEPEND}" +BDEPEND="" + +src_compile() { + # Tools with makefile + for tool in figtoipe ipe5toxml; do + if use ${tool}; then + cd ${tool} + emake + cd .. + fi + done + + # 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 + use ${tool} && doexe ${tool}/${tool} + use ${tool} && doman ${tool}/${tool}.1 + done + + use annotate && doexe annotate/annotate-ipe + + # Fixing python tools + if use annotate || use svgtoipe; then + python_fix_shebang ${ED}/usr/bin + fi +}