summaryrefslogtreecommitdiff
blob: 8f30b5c9509dc92d95df0ee8b106f729da428160 (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/dynalang/dynalang-0.4.ebuild,v 1.4 2010/06/06 21:50:32 ali_bush Exp $

EAPI=3

JAVA_PKG_IUSE="doc source"
JAVA_PKG_BSFIX="off"

inherit java-pkg-2 java-ant-2

MY_P="${PN}-mop-${PV}"

DESCRIPTION="Library for implementation of interoperable metaobject protocols for dynamic languages."
HOMEPAGE="http://sourceforge.net/projects/dynalang/"
SRC_URI="mirror://sourceforge/${PN}/${PN}/${MY_P}.tgz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

IUSE="test"

RDEPEND=">=virtual/jre-1.5"
DEPEND=">=virtual/jdk-1.5
	test? (
		dev-java/emma:0
		dev-java/junit:0
		dev-java/ant-junit:0
	)"

S="${WORKDIR}/${MY_P}"

java_prepare() {
	cp "${FILESDIR}/build.xml" build.xml || die

	find . -iname '*.jar' -delete

	sed -i -e '/ivy:retrieve/d' build.xml || die
	sed -i -e 's_\.\./ivy_ivy_' build.xml || die
	sed -i -e \
		's/clazz.getConstructors/(Constructor<T>[])clazz.getConstructors/' \
		src/org/dynalang/mop/beans/BeanMetaobjectProtocol.java || die

	mkdir -p build/lib/test
}

EANT_DOC_TARGET="doc"

src_test() {
	java-pkg_jar-from --into build/lib/test emma,junit

	ANT_TASKS="ant-junit" eant test
}

src_install() {
	java-pkg_newjar "build/${MY_P}.jar"
	use doc && java-pkg_dojavadoc build/doc/javadoc
	use source && java-pkg_dosrc src/org
}