summaryrefslogtreecommitdiff
blob: db309b265facb33cb2f91f73e73c09bce6668527 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/log4j/log4j-1.2.8-r2.ebuild,v 1.5 2004/10/22 11:27:00 absinthe Exp $

inherit java-pkg

DESCRIPTION="A low-overhead robust logging package for Java"
SRC_URI="http://jakarta.apache.org/log4j/jakarta-${P}.tar.gz"
HOMEPAGE="http://jakarta.apache.org"
LICENSE="Apache-1.1"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="jikes doc javamail jmx jms"
DEPEND=">=virtual/jdk-1.4
		dev-java/ant-core
		javamail? ( dev-java/sun-javamail-bin dev-java/sun-jaf-bin )
		jmx? ( dev-java/jmx )
		jms? ( =dev-java/openjms-bin-0.7.6 )
		jikes? ( dev-java/jikes )"
RDEPEND=">=virtual/jre-1.4"

S="${WORKDIR}/jakarta-${P}"

src_unpack() {
	unpack ${A}
	cd ${S}
	rm -rf dist/
}

src_compile() {
	local antflags="jar"
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
	use javamail && antflags="${antflags} -Djavamail.jar=/usr/share/sun-javamail-bin/lib/mail.jar -Dactivation.jar=/usr/share/sun-jaf-bin/lib/activation.jar"
	use jmx && antflags="${antflags} -Djmx.jar=/usr/share/jmx/lib/jmxri.jar -Djmx-extra.jar=/usr/share/jmx/lib/jmxtools.jar"
	use jms && antflags="${antflags} -Djms.jar=/opt/openjms/lib/jms-1.0.2a.jar"
	ant ${antflags} || die "compilation error"
}

src_install() {
	cd dist/lib
	mv log4j-${PV}.jar ${PN}.jar
	java-pkg_dojar ${PN}.jar

	cd ${S}
	use doc && java-pkg_dohtml -r docs/*
}