1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 inherit lua-single eutils toolchain-funcs
9 DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
10 HOMEPAGE="http://ipe.otfried.org"
11 SRC_URI="https://dl.bintray.com/otfried/generic/ipe/${PV%.*}/${P}-src.tar.gz"
17 KEYWORDS="~amd64 ~x86"
20 REQUIRED_USE="${LUA_REQUIRED_USE}"
22 RDEPEND="app-text/texlive-core
30 BDEPEND="virtual/pkgconfig"
32 S="${WORKDIR}/${P}/src"
33 COMMONDIR=/usr/share/ipe/common
36 # colon-separated list of paths
37 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
38 # according to TeX directory structure
39 local urwdir=fonts/type1/urw
40 # add colon as field separator
41 local IFS="${IFS}:" dir
42 for dir in ${texmfdist}; do
43 if [[ -d ${dir}/${urwdir} ]]; then
44 URWFONTDIR="${dir}/${urwdir}"
54 -e 's_moc_/usr/lib64/qt5/bin/moc_' \
55 -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
57 sed -i -e 's/install -s/install/' common.mak || die
60 eapply "${FILESDIR}"/${PN}-outputprecision.patch
68 if search_urw_fonts; then
69 einfo "URW fonts found in ${URWFONTDIR}"
71 ewarn "Could not find directory containing URW fonts"
72 ewarn "Ipe will not function properly without them."
79 IPEPREFIX="${EPREFIX}/usr" \
80 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
85 IPEPREFIX="${EPREFIX}/usr" \
86 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
87 INSTALL_ROOT="${ED}" \
88 LUA_VERSION="$(lua_get_version)"
89 dodoc ../{news,readme}.txt
90 doicon ipe/icons/ipe.png
91 make_desktop_entry ipe Ipe ipe
93 if [ -d $COMMONDIR/styles ]; then
94 einfo "Linking common style sheets from $COMMONDIR"
95 for f in $COMMONDIR/styles/*; do
96 einfo " Linking ${f##*/}"
97 dosym $f usr/share/ipe/${PV}/styles/${f##*/}
100 elog "Style sheets from $COMMONDIR/styles have been symlinked to"
101 elog "the style sheet directory of ${P}. If you add additional"
102 elog "style sheets later to $COMMONDIR/styles you may symlink"
103 elog "them by hand to '/usr/share/ipe/${PV}/styles/'."