# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt4 MY_P="${P/_/}" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" DESCRIPTION="The Ipe extensible drawing editor creates figures for inclusion in LaTeX documents and makes PDF presentations." SRC_URI="http://ipe.compgeom.org/${MY_P}-src.tar.gz http://tclab.kaist.ac.kr/ipe/${MY_P}-src.tar.gz" HOMEPAGE="http://ipe.compgeom.org/" IUSE="firefox" DEPEND="$(qt4_min_version 4.2) sys-libs/zlib >=media-libs/freetype-2.1.8" RDEPEND="${DEPEND} || ( app-text/tetex app-text/texlive )" # for pdfLaTeX and urw-fonts S=${WORKDIR}/${MY_P}/src src_compile() { local myconf # until Ipe bug #206 is not resolved... # use firefox && myconf="IPEBROWSER=firefox" use firefox && \ sed -i 's/IPEBROWSER = mozilla/IPEBROWSER = firefox/' config.pri qmake \ "IPEPREFIX=/usr" \ "IPEDOCDIR=/usr/share/doc/${PF}" \ ${myconf} \ main.pro || die "qmake failed" emake || die "emake failed" } src_install() { einstall INSTALL_ROOT=${D} || die "einstall failed" cd .. local fontmapdir=/usr/share/${PN}/${MY_P/${PN}-/} cp {urw,tetex}-fontmap.xml ${D}/${fontmapdir}/ # create TeX Live fontmap sed 's/\/share\/texmf\/fonts\//\/share\/texmf-dist\/fonts\//' \ tetex-fontmap.xml > ${D}/${fontmapdir}/texlive-fontmap.xml if has_version 'app-text/tetex'; then einfo "Creating symlink to teTeX fontmap ..." dosym ${fontmapdir}/tetex-fontmap.xml ${fontmapdir}/fontmap.xml eend $? elif has_version 'app-text/texlive'; then einfo "Creating symlink to TeX Live fontmap ..." dosym ${fontmapdir}/texlive-fontmap.xml ${fontmapdir}/fontmap.xml eend $? else ewarn "Supplied fontmaps do not fit or LaTeX distribution not" \ "recognized." einfo "Read /usr/share/doc/${PF}/install.txt.gz, create your own" \ "fontmap" einfo "and submit it to Gentoo's Bugzilla for inclusion." fi dodoc install.txt news.txt readme.txt || die "dodoc failed" }