summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-java/xpp2/files/xpp2-2.1.10-fix-java5+.patch17
-rw-r--r--dev-java/xpp2/xpp2-2.1.10-r3.ebuild (renamed from dev-java/xpp2/xpp2-2.1.10-r2.ebuild)14
2 files changed, 27 insertions, 4 deletions
diff --git a/dev-java/xpp2/files/xpp2-2.1.10-fix-java5+.patch b/dev-java/xpp2/files/xpp2-2.1.10-fix-java5+.patch
new file mode 100644
index 000000000000..883bf5fa2d9a
--- /dev/null
+++ b/dev-java/xpp2/files/xpp2-2.1.10-fix-java5+.patch
@@ -0,0 +1,17 @@
+diff --git a/src/java/impl/node/org/gjt/xpp/impl/node/Node.java b/src/java/impl/node/org/gjt/xpp/impl/node/Node.java
+index 7c66608..6c128e9 100644
+--- a/src/java/impl/node/org/gjt/xpp/impl/node/Node.java
++++ b/src/java/impl/node/org/gjt/xpp/impl/node/Node.java
+@@ -273,9 +273,9 @@ public class Node extends StartTag implements XmlNode {
+ oneChild = null;
+
+ if(children != null && children.size() > 0) {
+- Enumeration enum = children.elements();
+- while (enum.hasMoreElements()) {
+- Object child = enum.nextElement();
++ Enumeration elements = children.elements();
++ while (elements.hasMoreElements()) {
++ Object child = elements.nextElement();
+ if(child instanceof XmlNode) {
+ ((XmlNode)child).setParentNode(null);
+ }
diff --git a/dev-java/xpp2/xpp2-2.1.10-r2.ebuild b/dev-java/xpp2/xpp2-2.1.10-r3.ebuild
index bb124374b5c7..db77c7e64ae0 100644
--- a/dev-java/xpp2/xpp2-2.1.10-r2.ebuild
+++ b/dev-java/xpp2/xpp2-2.1.10-r3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-ant-2
@@ -23,21 +23,27 @@ IUSE="test"
RESTRICT="test"
CDEPEND="dev-java/xerces:2"
-DEPEND=">=virtual/jdk-1.3
+DEPEND=">=virtual/jdk-1.8:*
test? ( dev-java/junit:4 )
${CDEPEND}"
-RDEPEND=">=virtual/jre-1.3
+RDEPEND=">=virtual/jre-1.8:*
${CDEPEND}"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${P}-fix-java5+.patch"
+)
+
EANT_GENTOO_CLASSPATH="xerces-2"
EANT_EXTRA_ARGS="-Dx2_present=true -Djunit.present=true"
EANT_BUILD_TARGET="intf intf_jar impl x2impl"
EANT_DOC_TARGET="api"
EANT_TEST_TARGET="junit"
-java_prepare() {
+src_prepare() {
+ default
+
rm -r build/ lib/ || die
# Our usual rewriting stomps over the existing classpath, which