summaryrefslogtreecommitdiff
blob: c3d11389846b0de27ece3b60aa37fcad31f16ba7 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="5"

JAVA_PKG_IUSE="doc source"

inherit java-pkg-2 java-ant-2

DESCRIPTION="Object-Graph Navigation Language: get/set properties of objects"
HOMEPAGE="http://www.ognl.org/"
SRC_URI="https://github.com/jkuhnert/ognl/archive/OGNL_${PV//./_}.tar.gz
	https://ognl.dev.java.net/source/browse/*checkout*/ognl/osbuild.xml"

LICENSE="Apache-1.1"
SLOT="3.0"
KEYWORDS="amd64 x86"

CDEPEND="dev-java/javassist:3"

RDEPEND="
	${CDEPEND}
	>=virtual/jre-1.6"

DEPEND="
	${CDEPEND}
	app-arch/unzip
	>=virtual/jdk-1.6"

S="${WORKDIR}/${PN}-OGNL_${PV//./_}"

java_prepare() {
	java-pkg_clean

	cp "${DISTDIR}/osbuild.xml" "${S}/" || die

	sed "s/\(name=\"compile.version\" value=\"\)1.3\"/\1$(java-pkg_get-source)\"/" \
		-i osbuild.xml || die

	cd lib/build || die

	java-pkg_jar-from javassist-3
}

EANT_DOC_TARGET="javadocs"

src_install() {
	java-pkg_newjar build/ognl-2.7.2.jar "${PN}.jar"

	use doc && java-pkg_dohtml -r dist/docs/api
	use source && java-pkg_dosrc src/java/*
}