1 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs
7 DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
8 HOMEPAGE="http://ipe.otfried.org"
9 SRC_URI="https://dl.bintray.com/otfried/generic/ipe/${PV%.*}/${P}-src.tar.gz"
17 KEYWORDS="~amd64 ~x86"
20 RDEPEND="app-text/texlive-core
29 S="${WORKDIR}/${P}/src"
30 COMMONDIR=/usr/share/ipe/common
33 # colon-separated list of paths
34 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
35 # according to TeX directory structure
36 local urwdir=fonts/type1/urw
37 # add colon as field separator
38 local IFS="${IFS}:" dir
39 for dir in ${texmfdist}; do
40 if [[ -d ${dir}/${urwdir} ]]; then
41 URWFONTDIR="${dir}/${urwdir}"
51 -e 's_moc_/usr/lib64/qt5/bin/moc_' \
52 -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
54 sed -i -e 's/install -s/install/' common.mak || die
57 einfo "Adding patch for higher output precision"
58 epatch "${FILESDIR}"/${PN}-outputprecision.patch
63 if search_urw_fonts; then
64 einfo "URW fonts found in ${URWFONTDIR}"
66 ewarn "Could not find directory containing URW fonts"
67 ewarn "Ipe will not function properly without them."
74 IPEPREFIX="${EPREFIX}/usr" \
75 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
81 IPEPREFIX="${EPREFIX}/usr" \
82 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
84 dodoc ../{news,readme}.txt
85 doicon ipe/icons/ipe.png
86 make_desktop_entry ipe Ipe ipe
88 if [ -d $COMMONDIR/styles ]; then
89 einfo "Linking common style sheets from $COMMONDIR"
90 for f in $COMMONDIR/styles/*; do
91 einfo " Linking ${f##*/}"
92 dosym $f usr/share/ipe/${PV}/styles/${f##*/}
95 elog "Style sheets from $COMMONDIR/styles have been symlinked to"
96 elog "the style sheet directory of ${P}. If you add additional"
97 elog "style sheets later to $COMMONDIR/styles you may symlink"
98 elog "them by hand to '/usr/share/ipe/${PV}/styles/'."