summaryrefslogtreecommitdiff
blob: 958f3821c284c649935b1c0af7e445a90fdd9b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsbabel/gpsbabel-1.3.6.ebuild,v 1.5 2009/07/10 13:54:10 ssuominen Exp $

EAPI=2

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"
IUSE="doc usb"

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_configure() {
	econf \
		$(use_with doc doc "${S}"/doc/manual) \
		$(use_with usb libusb) \
		--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
}