summaryrefslogtreecommitdiff
blob: a683b4aea8e703a58c8879940a6c929ca1c42d5e (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/antenna/antenna-0.9.13-r1.ebuild,v 1.3 2006/09/13 22:11:26 nichoj Exp $

inherit java-pkg-2 java-ant-2 eutils

MY_P=${DISTDIR}/${PN}-src-${PV}.zip

DESCRIPTION="Ant task for J2ME"
HOMEPAGE="http://antenna.sourceforge.net/"
SRC_URI="mirror://sourceforge/antenna/${PN}-src-${PV}.zip"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86"
IUSE="doc"

DEPEND=">=virtual/jdk-1.4
	app-arch/unzip
	dev-java/ant-core"
RDEPEND=">=virtual/jre-1.4
	~dev-java/servletapi-2.3"

src_unpack() {
	mkdir ${S} && cd ${S}

	unpack ${A}

	# Adds target dependencies and javadoc target
	# and removes any hardcoded paths in targets in favor of properties
	# TODO file upstream
	epatch ${FILESDIR}/${P}-ant.patch

	cat > build.properties <<-END
	project.name=${PN}
	project.version=${PV}
	classpath.servlet=$(java-pkg_getjars servletapi-2.3)
	END
}

src_compile() {
	eant jar $(use_doc)
}

src_install() {
	java-pkg_newjar dist/${PN}-bin-${PV}.jar ${PN}.jar

	dodir /usr/share/ant-core/lib/
	dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant-core/lib/

	if use doc; then
		java-pkg_dohtml doc/*
		java-pkg_dohtml -r dist/doc/api
	fi
}