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"
15 KEYWORDS="~amd64 ~x86"
18 RDEPEND="app-text/texlive-core
27 S="${WORKDIR}/${P}/src"
28 COMMONDIR=/usr/share/ipe/common
31 # colon-separated list of paths
32 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
33 # according to TeX directory structure
34 local urwdir=fonts/type1/urw
35 # add colon as field separator
36 local IFS="${IFS}:" dir
37 for dir in ${texmfdist}; do
38 if [[ -d ${dir}/${urwdir} ]]; then
39 URWFONTDIR="${dir}/${urwdir}"
49 -e 's_moc_/usr/lib64/qt5/bin/moc_' \
50 -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
52 sed -i -e 's/install -s/install/' common.mak || die
55 einfo "Adding patch for higher output precision"
56 epatch "${FILESDIR}"/${PN}-outputprecision.patch
61 if search_urw_fonts; then
62 einfo "URW fonts found in ${URWFONTDIR}"
64 ewarn "Could not find directory containing URW fonts"
65 ewarn "Ipe will not function properly without them."
72 IPEPREFIX="${EPREFIX}/usr" \
73 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
78 IPEPREFIX="${EPREFIX}/usr" \
79 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
81 dodoc ../{news,readme}.txt
82 doicon ipe/icons/ipe.png
83 make_desktop_entry ipe Ipe ipe
85 if [ -d $COMMONDIR/styles ]; then
86 einfo "Linking common style sheets from $COMMONDIR"
87 for f in $COMMONDIR/styles/*; do
88 einfo " Linking ${f##*/}"
89 dosym $f usr/share/ipe/${PV}/styles/${f##*/}
92 elog "Style sheets from $COMMONDIR/styles have been symlinked to"
93 elog "the style sheet directory of ${P}. If you add additional"
94 elog "style sheets later to $COMMONDIR/styles you may symlink"
95 elog "them by hand to '/usr/share/ipe/${PV}/styles/'."