summaryrefslogtreecommitdiff
blob: 395895743a20412ac8d4e6ad971b06e1c6c5f025 (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-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-modeler/commons-modeler-1.1.ebuild,v 1.7 2005/01/01 18:18:45 eradicator Exp $

inherit java-pkg

DESCRIPTION="A lib to make the setup of Java Management Extensions easier"
SRC_URI="mirror://apache/jakarta/commons/modeler/source/modeler-1.1-src.tar.gz"
HOMEPAGE="http://jakarta.apache.org/commons/modeler/"
LICENSE="Apache-1.1"
SLOT="0"
DEPEND=">=virtual/jdk-1.4
		>=dev-java/jmx-1.2.1
		>=dev-java/commons-logging-1.0.3
		>=dev-java/commons-digester-1.4.1
		>=dev-java/xalan-2.5.1"
KEYWORDS="x86 ~amd64"
IUSE="doc jikes"

S=${WORKDIR}/${P}-src

src_unpack() {
	unpack "modeler-${PV}-src.tar.gz"
	cd ${S}

	# Setup the build environment
	echo "commons-digester.jar=`java-config --classpath=commons-digester | sed s/":"/"\n"/g | tail -n 1`" >> build.properties
	echo "commons-logging.jar=`java-config --classpath=commons-logging | sed s/":"/"\n"/g | tail -n 1`" >> build.properties
	echo "jmx.jar=`java-config --classpath=jmx | sed s/":"/"\n"/g | head -n1`" >> build.properties
	echo "jmxtools.jar=`java-config --classpath=jmx | sed s/":"/"\n"/g | tail -n1`" >> build.properties
	echo "jaxp.xalan.jar=`java-config --classpath=xalan`" >> build.properties
	echo "junit.jar=`java-config --classpath=junit`" >> build.properties
	mkdir dist
}

src_compile() {
	antflags="prepare jar"
	use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
	use doc && antflags="${antflags} javadoc"
	ant ${antflags} || die "compile problem"
}

src_install () {
	java-pkg_dojar dist/${PN}.jar  || die "Unable to install"
	dodoc LICENSE.txt RELEASE-NOTES-1.1.txt RELEASE-NOTES.txt
	use doc && java-pkg_dohtml -r docs/*
}