summaryrefslogtreecommitdiff
blob: 7b8faf60266b869732751851a3584809aa20c9b0 (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-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/bsf/bsf-2.3.0-r2.ebuild,v 1.8 2004/12/18 09:28:08 corsair Exp $

inherit java-pkg eutils

DESCRIPTION="Bean Script Framework"
HOMEPAGE="http://jakarta.apache.org/bsf/"
SRC_URI="http://cvs.apache.org/dist/jakarta/bsf/v2.3.0rc1/src/bsf-src-2.3.0.tar.gz mirror://gentoo/bsf-rhino-1.5.patch.bz2"
LICENSE="Apache-1.1"
SLOT="2.3"
KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~ppc64"
IUSE="doc jython rhino jikes"
RDEPEND=">=virtual/jre-1.4
	jython? ( >=dev-java/jython-2.1-r5 )
	rhino? ( >=dev-java/rhino-1.4 )
	=dev-java/servletapi-2.3*
	>=dev-java/ant-1.5.4"
DEPEND=">=virtual/jdk-1.4
	jikes? ( >=dev-java/jikes-1.18 )
	${RDEPEND}"


src_unpack() {
	unpack ${A}

	epatch ${WORKDIR}/bsf-rhino-1.5.patch

	cd ${S}/src/build/lib
	if use rhino; then
		java-pkg_jar-from rhino || die "Missing rhino"
	fi

	if use jython; then
		java-pkg_jar-from jython || die "Missing jython"
	fi

}

src_compile() {

	use rhino && cp="${cp}:$(java-config -p rhino)"
	use jython && cp="${cp}:$(java-config -p jython)"

	# karltk: fix this
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"

	cd ${S}/src/taglib
	ant ${antflags} -Dservlet.jar="$(java-config -p servletapi-2.3)" compile || die "Failed to build taglib"

	cd ${S}/src
	ant ${antflags} -Dclasspath=${cp} compile || die "Failed to build main package"
	if use doc ; then
		ant ${antflags} javadocs || die
	fi
}

src_install() {
	java-pkg_dojar src/build/lib/bsf.jar

	use doc && java-pkg_dohtml -r src/build/javadocs/*
}