summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2022-05-06 19:41:20 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-05-22 19:19:32 +0200
commit348d30ce4af35fa75876c248b52800eae26421fd (patch)
tree490855da88fca046d395a8a0db4c6063409c20e4 /dev-java/jdom/jdom-2.0.6.1.ebuild
parentnet-dns/knot: drop 3.1.4 (diff)
downloadgentoo-348d30ce4af35fa75876c248b52800eae26421fd.tar.gz
gentoo-348d30ce4af35fa75876c248b52800eae26421fd.tar.bz2
gentoo-348d30ce4af35fa75876c248b52800eae26421fd.zip
dev-java/jdom: add 2.0.6.1
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/25477 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/jdom/jdom-2.0.6.1.ebuild')
-rw-r--r--dev-java/jdom/jdom-2.0.6.1.ebuild97
1 files changed, 97 insertions, 0 deletions
diff --git a/dev-java/jdom/jdom-2.0.6.1.ebuild b/dev-java/jdom/jdom-2.0.6.1.ebuild
new file mode 100644
index 00000000000..3c0b46178bc
--- /dev/null
+++ b/dev-java/jdom/jdom-2.0.6.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.jdom:jdom2:2.0.6.1"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Java-based solution for accessing, manipulating, and outputting XML data"
+HOMEPAGE="http://www.jdom.org"
+SRC_URI="https://github.com/hunterhacker/jdom/archive/${PN^^}-${PV}.tar.gz"
+
+LICENSE="Apache-1.1"
+SLOT="2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+# FAILURES!!!
+# Tests run: 1887, Failures: 23
+RESTRICT="test"
+
+CP_DEPEND="
+ dev-java/iso-relax:0
+ dev-java/jaxen:1.2
+ dev-java/xalan:0
+"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ ${CP_DEPEND}
+ test? (
+ dev-java/xerces:2
+ )
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CP_DEPEND}
+"
+
+S="${WORKDIR}/jdom-JDOM-${PV}"
+
+JAVA_TEST_SRC_DIR="test/src/java"
+JAVA_TEST_RESOURCE_DIRS="test/src/resources"
+JAVA_TEST_GENTOO_CLASSPATH="junit-4,xerces-2"
+
+src_prepare() {
+ default
+ java-pkg_clean
+
+ # Remove Android stuff to avoid junit RDEPEND.
+ rm -vr contrib/src/java/org/jdom2/contrib/android || die
+
+ # There are resources in JAVA_TEST_SRC_DIR
+ cp -r test/src/{java,resources}/org || die
+ # Remove .java files from JAVA_TEST_RESOURCE_DIRS
+ find test/src/resources -type f -name '*.java' -exec rm -rf {} + || die "deleting classes failed"
+}
+
+src_compile() {
+ JAVA_SRC_DIR="core/src/java"
+ JAVA_JAR_FILENAME="jdom.jar"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":jdom.jar"
+ rm -rf target || die
+
+ JAVA_SRC_DIR="contrib/src/java"
+ JAVA_RESOURCE_DIRS="contrib/src/resources"
+ JAVA_JAR_FILENAME="jdom-contrib.jar"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":jdom-contrib.jar"
+ rm -rf target || die
+
+ if use doc; then
+ JAVA_SRC_DIR=()
+ JAVA_SRC_DIR=(
+ "core/src/java"
+ "contrib/src/java"
+ )
+ JAVA_JAR_FILENAME="ignoreme.jar"
+ java-pkg-simple_src_compile
+ fi
+}
+
+src_install() {
+ default # https://bugs.gentoo.org/789582
+ java-pkg_dojar "jdom.jar"
+ java-pkg_dojar "jdom-contrib.jar"
+ if use doc; then
+ java-pkg_dojavadoc target/api
+ fi
+ if use source; then
+ java-pkg_dosrc "core/src/java/*" "contrib/src/java/*"
+ fi
+}