blob: 0ad3a8809893f8bb7a5fcde68df5da821ea8aba6 (
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
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/avalon-logkit/avalon-logkit-2.0-r2.ebuild,v 1.5 2007/01/30 21:19:24 wolf31o2 Exp $
inherit java-pkg-2 java-ant-2
DESCRIPTION="Easy-to-use Java logging toolkit"
HOMEPAGE="http://avalon.apache.org/"
SRC_URI="mirror://apache/avalon/avalon-logkit/distributions/${P}.dev-0-src.tar.gz"
KEYWORDS="amd64 ~ia64 ppc ppc64 x86"
LICENSE="Apache-2.0"
SLOT="2.0"
IUSE="doc javamail jms source"
COMMON_DEP="
dev-java/log4j
jms? ( dev-java/sun-jms )
javamail? (
dev-java/sun-jaf
dev-java/sun-javamail
)
=dev-java/servletapi-2.4*"
RDEPEND=">=virtual/jre-1.4
${COMMON_DEP}"
# Doesn't like 1.6 changes to JDBC
DEPEND="|| (
=virtual/jdk-1.3*
=virtual/jdk-1.4*
=virtual/jdk-1.5*
)
source? ( app-arch/zip )
dev-java/ant-core
${COMMON_DEP}"
S="${WORKDIR}/${P}.dev-0"
src_unpack() {
unpack ${A}
cd "${S}"
# the build.xml file for ant
cp ${FILESDIR}/${PV}-build.xml ./build.xml
local libs="log4j,servletapi-2.4"
use jms && libs="${libs},sun-jms"
use javamail && libs="${libs},sun-jaf,sun-javamail"
echo "classpath=$(java-pkg_getjars ${libs})" > build.properties
cd "${S}/src/java/org/apache/log/output/"
if ! use jms; then
einfo "Removing jms related files"
rm -rf jms || die "JMS Failure!"
rm -f ServletOutputLogTarget.java || die "JMS Failure!"
fi
if ! use javamail; then
einfo "Removing javamail related files"
rm -rf net || die "JavaMail Failure!"
fi
}
src_compile() {
eant $(use_doc) jar
}
src_install() {
java-pkg_dojar ${S}/dist/avalon-logkit.jar || die "Install Failed!"
dodoc README.txt LICENSE.txt
use doc && java-pkg_dohtml -r ${S}/dist/docs/*
use source && java-pkg_dosrc src/java/*
}
|