summaryrefslogtreecommitdiff
blob: 9a7f8c126210fb77742c6e14abf53e5642325a7f (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
51
52
53
54
55
56
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/libdvbpsi/libdvbpsi-0.1.7.ebuild,v 1.1 2010/04/23 11:40:24 aballier Exp $

IUSE="doc"

DESCRIPTION="library for MPEG TS/DVB PSI tables decoding and generation"
HOMEPAGE="http://www.videolan.org/libdvbpsi"
SRC_URI="http://download.videolan.org/pub/${PN}/${PV}/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
# doxygen missing: ~ia64
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"

DEPEND="doc? (
		>=app-doc/doxygen-1.2.16
		media-gfx/graphviz
	)"
RDEPEND=""

pkg_setup() {
	if use doc; then
		# Making the documentation requires that /usr/bin/dot from
		# media-libs/graphviz supports PNG output.
		# This is an automagic dependency :(, Bug #181147
		# Check that /usr/bin/dot supports png by calling it with
		# an unsupported format (-Txxx) to get a list of supported formats

		if /usr/bin/dot -Txxx 2>&1 | grep -q png ; then
			# dot supports png
			:
		else
			die "You need to recompile media-gfx/graphviz with png support."
		fi
	fi
}

src_compile() {
	econf --enable-release

	emake || die "emake failed"

	if use doc; then
		einfo "Attempting to build documentation"
		emake doc || die "Could not build documentation."
	else
		einfo "Documentation was not built"
	fi
}

src_install () {
	emake DESTDIR="${D}" install || die
	use doc && dohtml "${S}"/doc/doxygen/html/*
	dodoc AUTHORS INSTALL README NEWS
}