1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils toolchain-funcs qt4-r2
8 DESCRIPTION="A drawing editor which creates figures for inclusion in LaTeX documents and makes PDF presentations."
9 HOMEPAGE="http://ipe7.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/ipe7/ipe/${P}-src.tar.gz"
14 KEYWORDS="~amd64 ~x86"
16 # highprec: applies patch in order to write coordinates with higher precision
17 IUSE="seamonkey highprec"
22 >=media-libs/freetype-2.1.8
24 >=x11-libs/cairo-1.8.0
25 >=x11-libs/qt-core-4.5:4
26 >=x11-libs/qt-gui-4.5:4
30 !seamonkey? ( || ( www-client/firefox
31 www-client/firefox-bin ) )
32 seamonkey? ( || ( www-client/seamonkey
33 www-client/seamonkey-bin ) )"
38 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)" # colon-separated list of paths
39 local urwdir=fonts/type1/urw # according to TeX directory structure
40 local IFS="${IFS}:" # add colon as field separator
41 for dir in ${texmfdist}; do
42 if [[ -d "${dir}/${urwdir}" ]]; then
43 URWFONTDIR="${dir}/${urwdir}"
53 einfo "Adding patch for higher output precision"
54 epatch "${FILESDIR}"/${PN}-outputprecision.patch
59 if search_urw_fonts; then
60 einfo "URW fonts found in ${URWFONTDIR}."
62 ewarn "Could not find directory containing URW fonts. Ipe will not"
63 ewarn "function properly without them."
68 # Ipe's default browser is Firefox
70 use seamonkey && myconf="IPEBROWSER=seamonkey"
71 # fix detection of lua
72 sed -i -e 's/lua5.1/lua/g' config.mak || die
73 # don't strip installed binaries
74 sed -i -e 's/install -s/install/' common.mak || die
75 # use moc instead of moc-qt4
76 sed -i -e 's/moc-qt4/moc/' config.mak || die
78 # -j1, since there are no deps in the Makefiles on libipe
79 emake -j1 CXX=$(tc-getCXX) $myconf IPEPREFIX="/usr" \
80 IPEDOCDIR="/usr/share/doc/${PF}" || die "emake failed"
84 emake install IPEPREFIX="/usr" IPEDOCDIR="/usr/share/doc/${PF}" \
85 INSTALL_ROOT="${D}" || die "emake install failed"
86 dodoc ../{news,readme}.txt || die