summaryrefslogtreecommitdiff
blob: 36ea614f2101372429797d36d544af759481ca8b (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
57
58
59
60
61
62
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="A library to support C++ developers with debugging their applications"
HOMEPAGE="http://libcwd.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="QPL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc examples pch"

DEPEND="doc? ( app-doc/doxygen )"
RDEPEND=""

src_unpack() {
	unpack ${A}
	cd "${S}"

	sed -i \
		-e 's/-O3//' \
		configure || die "sed failed"

	epatch "${FILESDIR}"/gcc-4.3.patch ||die

	# Clean-out possibly old docs
	rm -f  documentation/doxygen.config
	rm -rf documentation/html/*
}

src_compile() {
	econf \
		$(use_enable pch) \
		$(use_enable debug) \
		|| die "econf failed"
	emake || die "emake failed"

	if use doc; then
		cd documentation
		doxygen doxygen.config
	fi
}

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

	dodoc README* NEWS

	if use doc; then
		dohtml -r documentation/reference-manual/*
		insinto /usr/share/doc/${PF}
		doins -r documentation/tutorial
	fi

	if use examples; then
		insinto /usr/share/doc/${PF}
		doins -r example-project
	fi
}