summaryrefslogtreecommitdiff
blob: 779e044cb1d661a0d7388854aa3cb5373ae50feb (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/velocity/velocity-1.4-r2.ebuild,v 1.3 2005/07/15 11:43:07 axxo Exp $

inherit java-pkg

DESCRIPTION="A Java-based template engine that allows easy creation/rendering of documents that format and present data."
HOMEPAGE="http://jakarta.apache.org/velocity/"
SRC_URI="mirror://apache/jakarta/velocity/binaries/velocity-${PV}/velocity-${PV}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~x86"
IUSE="doc j2ee jikes junit"

RDEPEND=">=virtual/jre-1.3.1
	>=dev-java/avalon-logkit-bin-1.2
	=dev-java/jakarta-oro-2.0*
	j2ee? ( =dev-java/sun-j2ee-1.3.1* )
	jikes? ( >=dev-java/jikes-1.17 )"
DEPEND=">=virtual/jdk-1.3.1
	${RDEPEND}
	>=dev-java/ant-1.5.1"

src_compile () {
	cd ${S}/build
	local antflags
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
	use junit && antflags="${antflags} test"
	use doc && antflags="${antflags} javadocs"
	if use j2ee ; then
		cp /opt/sun-j2ee-1.3.1/lib/j2ee.jar ${S}/build/lib
		ant ${antflags} jar-J2EE || die "Java compile failed."
	else
		ant ${antflags} jar || die "Java compile failed"
	fi
}


src_install() {
	cd ${S}
	if use j2ee ; then
		java-pkg_newjar bin/${PN}-J2EE-${PV}.jar ${PN}-J2EE.jar
	else
		java-pkg_newjar bin/${P}.jar ${PN}.jar
	fi
	dodoc NOTICE README.txt
	use doc && java-pkg_dohtml -r docs/*
}