summaryrefslogtreecommitdiff
blob: cdaf84f036802ec8e9a4da95767fd99ebf6046cf (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/source-highlight/source-highlight-3.1.ebuild,v 1.1 2009/08/11 14:07:14 dev-zero Exp $

EAPI="2"

inherit bash-completion versionator

DESCRIPTION="Generate highlighted source code as an (x)html document"
HOMEPAGE="http://www.gnu.org/software/src-highlite/source-highlight.html"
SRC_URI="mirror://gnu/src-highlite/${P}.tar.gz"
LICENSE="GPL-3"
KEYWORDS="~amd64 ~mips ~ppc ~x86"
SLOT="0"
IUSE="bash-completion doc"

DEPEND=">=dev-libs/boost-1.35.0-r5
	dev-util/ctags"
RDEPEND="${DEPEND}"

src_configure() {
	BOOST_PKG="$(best_version ">=dev-libs/boost-1.35.0-r5")"
	BOOST_VER="$(replace_all_version_separators _ $(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}"))"

	sed -i \
		-e "s|ac_boost_path_tmp/include|ac_boost_path_tmp/include/boost-${BOOST_VER}|" \
		configure || die "sed failed"

	econf \
		--with-boost-regex="boost_regex-mt-${BOOST_VER}" \
		--without-bash-completion
}

src_install () {
	emake DESTDIR="${D}" install || die "make install failed"

	use bash-completion && dobashcompletion source-highlight-bash-completion

	# That's not how we want it
	rm -fr "${D}/usr/share"/{aclocal,doc}
	dodoc AUTHORS ChangeLog CREDITS NEWS README THANKS TODO.txt

	use doc &&  dohtml -A java doc/*.{html,css,java}
}