summaryrefslogtreecommitdiff
path: root/dev-java/jdom
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2015-08-25 23:11:42 +0000
committerPatrice Clement <monsieurp@gentoo.org>2015-08-25 23:12:28 +0000
commit762e1d624b1bd525f10e72c233d2236279cb83a9 (patch)
treeecc9e582e565147c70eb578a7510e493dcfece6e /dev-java/jdom
parent10eaeed30aa7d20dcc7cfa51afda18347d1b83c6 (diff)
downloadgentoo-762e1d624b1bd525f10e72c233d2236279cb83a9.tar.gz
gentoo-762e1d624b1bd525f10e72c233d2236279cb83a9.tar.xz
dev-java/jdom: Do away with the hacks and rewrite this ebuild from scratch using java-pkg-simple. Doing so, this eclass is now generating the documentation for free. Fixes 551700.
Package-Manager: portage-2.2.18 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'dev-java/jdom')
-rw-r--r--dev-java/jdom/jdom-2.0.6-r1.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-java/jdom/jdom-2.0.6-r1.ebuild b/dev-java/jdom/jdom-2.0.6-r1.ebuild
new file mode 100644
index 00000000000..737403e41d8
--- /dev/null
+++ b/dev-java/jdom/jdom-2.0.6-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+JAVA_PKG_IUSE="source test doc"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Java API to manipulate XML data"
+SRC_URI="http://www.jdom.org/dist/binary/${P}.zip"
+HOMEPAGE="http://www.jdom.org"
+LICENSE="JDOM"
+SLOT="2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+CDEPEND="dev-java/iso-relax:0
+ dev-java/jaxen:1.1
+ dev-java/xalan:0
+ dev-java/junit:4
+ dev-java/xml-commons-external:1.4"
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+DEPEND="${CDEPEND}
+ app-arch/unzip
+ >=virtual/jdk-1.6"
+IUSE=""
+
+S="${WORKDIR}"
+
+JAVA_GENTOO_CLASSPATH="xalan,junit-4,jaxen-1.1,iso-relax,xml-commons-external-1.4"
+JAVA_SRC_DIR="org"
+
+src_unpack() {
+ default
+ cd "${S}"
+ unpack ./"${P}-sources".jar
+}
+
+java_prepare() {
+ find "${S}"/lib -type f -delete || die
+}
+
+src_compile() {
+ java-pkg-simple_src_compile
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ use source && java-pkg_dosrc org
+}
+
+src_test() {
+ local DIR="org/jdom2/test"
+ local CP="${DIR}:${PN}.jar:$(java-pkg_getjars junit-4,${JAVA_GENTOO_CLASSPATH})"
+
+ local TESTS=$(find "${DIR}" -name "*Test.java" ! -name "Abstract*")
+ TESTS="${TESTS//src\/test\/java\/}"
+ TESTS="${TESTS//.java}"
+ TESTS="${TESTS//\//.}"
+
+ ejavac -classpath "${CP}" -d "${DIR}" $(find "${DIR}" -name "*.java")
+ ejunit4 -classpath "${CP}" ${TESTS}
+}