# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ EAPI=2 inherit eutils autotools DESCRIPTION="GPS waypoints, tracks and routes converter" HOMEPAGE="http://www.gpsbabel.org/" SRC_URI="http://www.gpsbabel.org/plan9.php?dl=${P}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc ~sparc x86 ~x86-fbsd" IUSE="doc" RDEPEND="dev-libs/expat usb? ( dev-libs/libusb )" DEPEND="${RDEPEND} doc? ( dev-java/fop virtual/latex-base dev-libs/libxslt dev-libs/libxml2 dev-lang/perl app-text/docbook-xml-dtd:4.1.2 )" src_prepare() { # may be other name? epatch "${FILESDIR}/${P}-freebsd-configure.patch" eautoreconf } src_configure() { econf \ $(use_with doc doc "${S}"/doc/manual) \ --with-zlib=system } src_compile() { emake || die if use doc; then emake doc || die cd "${S}/doc" emake || die fi } src_install() { emake DESTDIR="${D}" install || die dodoc README* || die if use doc; then cd "${S}"/doc/ dohtml ./manual/htmldoc-development/* || die docinto manual dodoc doc.dvi babelfront2.eps ../gpsbabel.pdf || die fi }