1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="A drawing editor which creates figures for inclusion in LaTeX documents and makes PDF presentations."
10 HOMEPAGE="http://tclab.kaist.ac.kr/ipe/"
11 SRC_URI="http://luaforge.net/frs/download.php/2727/${MY_P}-src.tar.gz"
15 KEYWORDS="~amd64 ~x86"
18 DEPEND=">=x11-libs/qt-4.2:4
19 >=media-libs/freetype-2.1.8"
20 # The virtual/tetex dep is for pdfLaTeX and URW fonts.
23 !seamonkey? ( || ( www-client/mozilla-firefox
24 www-client/mozilla-firefox-bin ) )
25 seamonkey? ( || ( www-client/seamonkey
26 www-client/seamonkey-bin ) )"
28 S="${WORKDIR}/${MY_P}/src"
31 local texmfdist="$(kpsewhich -var-value=TEXMFDIST)" # colon-separated list of paths
32 local urwdir=fonts/type1/urw # according to TeX directory structure
33 local IFS="${IFS}:" # add colon as field separator
34 for dir in ${texmfdist}; do
35 if [[ -d "${dir}/${urwdir}" ]]; then
36 URWFONTDIR="${dir}/${urwdir}"
45 if has_version ">=x11-libs/qt-4.2.2" ; then
46 QT4_BUILT_WITH_USE_CHECK="qt3support"
50 if search_urw_fonts; then
51 einfo "URW fonts found in ${URWFONTDIR}."
53 ewarn "Could not find directory containing URW fonts. Ipe will not"
54 ewarn "function properly without them."
61 epatch "${FILESDIR}"/${P}-include-string.patch
65 # Ipe bug #240, Gentoo bug #80448#c8: allow Ipe to be built with GCC 4.2
66 sed -i -e "s/-Werror/-Wno-error/" \
67 config.pri figtoipe/figtoipe.pro ipe5toxml/ipe5toxml.pro
69 # Ipe's default browser is Firefox
71 use seamonkey && myconf="IPEBROWSER=seamonkey"
76 "IPEDOCDIR=/usr/share/doc/${PF}"
77 emake || die "emake failed"
81 emake install INSTALL_ROOT="${D}" || die "emake install failed"
83 cd "${WORKDIR}"/${MY_P}
84 local fontmapdir=/usr/share/${PN}/${MY_P/${PN}-/}
85 if [ -n ${URWFONTDIR} ]; then
86 einfo "Creating fontmap ..."
87 sed -e "s:/usr/share/texmf/fonts/type1/urw:${URWFONTDIR}:" \
88 tetex-fontmap.xml > "${D}/${fontmapdir}/fontmap.xml"
92 dodoc install.txt news.txt readme.txt