1 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs qt4-r2
7 DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
8 HOMEPAGE="http://ipe7.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/ipe7/${PN}/7.1.0/${P}-src.tar.gz"
13 KEYWORDS="~amd64 ~x86"
16 RDEPEND="app-text/texlive-core
25 S="${WORKDIR}/${P}/src"
26 COMMONDIR=/usr/share/ipe/common
29 # colon-separated list of paths
30 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
31 # according to TeX directory structure
32 local urwdir=fonts/type1/urw
33 # add colon as field separator
34 local IFS="${IFS}:" dir
35 for dir in ${texmfdist}; do
36 if [[ -d ${dir}/${urwdir} ]]; then
37 URWFONTDIR="${dir}/${urwdir}"
45 if search_urw_fonts; then
46 einfo "URW fonts found in ${URWFONTDIR}"
48 ewarn "Could not find directory containing URW fonts"
49 ewarn "Ipe will not function properly without them."
57 -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
59 sed -i -e 's/install -s/install/' common.mak || die
62 einfo "Adding patch for higher output precision"
63 epatch "${FILESDIR}"/${PN}-outputprecision.patch
70 IPEPREFIX="${EPREFIX}/usr" \
71 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
76 IPEPREFIX="${EPREFIX}/usr" \
77 IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
79 dodoc ../{news,readme}.txt
80 doicon ipe/icons/ipe.png
81 make_desktop_entry ipe Ipe ipe
83 if [ -d $COMMONDIR/styles ]; then
84 einfo "Linking common style sheets from $COMMONDIR"
85 for f in $COMMONDIR/styles/*; do
86 einfo " Linking ${f##*/}"
87 dosym $f usr/share/ipe/${PV}/styles/${f##*/}
90 elog "Style sheets from $COMMONDIR/styles have been symlinked to"
91 elog "the style sheet directory of ${P}. If you add additional"
92 elog "style sheets later to $COMMONDIR/styles you may symlink"
93 elog "them by hand to '/usr/share/ipe/${PV}/styles/'."