summaryrefslogtreecommitdiff
blob: 52808192da8f1f5152c04e2e771f1c68b43c2243 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/log4cpp/log4cpp-0.3.4b.ebuild,v 1.15 2006/10/18 16:57:47 dev-zero Exp $

KEYWORDS="x86 ppc amd64 s390"

DESCRIPTION="library of C++ classes for flexible logging to files, syslog, IDSA and other destinations"
HOMEPAGE="http://log4cpp.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
IUSE="doc threads"

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

src_unpack() {
	unpack ${A}

	# We have to fix it directly in Makefile.in to avoid
	# loosing configuration-options
	cd "${S}/doc"
	sed -i \
		-e 's#$(man3dir)#$(DESTDIR)/$(man3dir)#' \
		-e 's#$(docdir)#$(DESTDIR)/$(docdir)/html#' \
		-e 's#$(prefix)#$(datadir)#' \
		Makefile.in || die "sed failed"
}

src_compile() {
	econf \
		--without-omnithreads \
		--without-idsa \
		$(use_with threads pthreads) \
		$(use_enable doc doxygen) \
		|| die "econf failed"
	emake || die "emake failed"
}

src_install () {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc AUTHORS ChangeLog NEWS README THANKS TODO
}