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"
18 DEPEND=">=x11-libs/qt-core-4.5:4
19 >=x11-libs/qt-gui-4.5:4
20 >=media-libs/freetype-2.1.8
21 >=x11-libs/cairo-1.8.0
23 app-text/texlive-core"
26 !seamonkey? ( || ( www-client/mozilla-firefox
27 www-client/firefox-bin ) )
28 seamonkey? ( || ( www-client/seamonkey
29 www-client/seamonkey-bin ) )"
34 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)" # colon-separated list of paths
35 local urwdir=fonts/type1/urw # according to TeX directory structure
36 local IFS="${IFS}:" # add colon as field separator
37 for dir in ${texmfdist}; do
38 if [[ -d "${dir}/${urwdir}" ]]; then
39 URWFONTDIR="${dir}/${urwdir}"
48 if search_urw_fonts; then
49 einfo "URW fonts found in ${URWFONTDIR}."
51 ewarn "Could not find directory containing URW fonts. Ipe will not"
52 ewarn "function properly without them."
57 # Ipe's default browser is Firefox
59 use seamonkey && myconf="IPEBROWSER=seamonkey"
60 # fix detection of lua
61 sed -i -e 's/lua5.1/lua/g' config.mak || die
62 # don't strip installed binaries
63 sed -i -e 's/install -s/install/' common.mak || die
64 # use moc instead of moc-qt4
65 sed -i -e 's/moc-qt4/moc/' config.mak || die
67 # -j1, since there are no deps in the Makefiles on libipe
68 emake -j1 CXX=$(tc-getCXX) $myconf IPEPREFIX="/usr" IPEDOCDIR="/usr/share/doc/${PF}" || die "emake failed"
72 emake install IPEPREFIX="/usr" IPEDOCDIR="/usr/share/doc/${PF}" INSTALL_ROOT="${D}" || die "emake install failed"
73 dodoc ../{news,readme}.txt || die