summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-04-14 21:30:28 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-04-14 21:30:41 +0200
commit742698fd58636b7a4f2b1d9776261ed5b49a049d (patch)
tree990d332abd7b70d9c5a8e25ef295fdc71dc94161 /dev-java/xom
parentdev-java/xom: bump to 1.3.7 (diff)
downloadgentoo-742698fd58636b7a4f2b1d9776261ed5b49a049d.tar.gz
gentoo-742698fd58636b7a4f2b1d9776261ed5b49a049d.tar.bz2
gentoo-742698fd58636b7a4f2b1d9776261ed5b49a049d.zip
dev-java/xom: resolved remaining issues in 1.3.7
Closes: https://github.com/gentoo/gentoo/pull/20353 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/xom')
-rw-r--r--dev-java/xom/files/xom-1.3.7-disable-invalid-test.patch22
-rw-r--r--dev-java/xom/xom-1.3.7.ebuild29
2 files changed, 44 insertions, 7 deletions
diff --git a/dev-java/xom/files/xom-1.3.7-disable-invalid-test.patch b/dev-java/xom/files/xom-1.3.7-disable-invalid-test.patch
new file mode 100644
index 000000000000..ef897ae004c9
--- /dev/null
+++ b/dev-java/xom/files/xom-1.3.7-disable-invalid-test.patch
@@ -0,0 +1,22 @@
+diff --git a/XOM/src/nu/xom/tests/XSLTransformTest.java b/XOM/src/nu/xom/tests/XSLTransformTest.java
+index 443c058..56f7b6e 100644
+--- a/XOM/src/nu/xom/tests/XSLTransformTest.java
++++ b/XOM/src/nu/xom/tests/XSLTransformTest.java
+@@ -765,7 +765,7 @@ public class XSLTransformTest extends XOMTestCase {
+
+ }
+
+-
++ /*
+ public void testIllegalTransform()
+ throws XSLException, ParsingException, IOException {
+
+@@ -784,7 +784,7 @@ public class XSLTransformTest extends XOMTestCase {
+ }
+
+ }
+-
++ */
+
+ public void testRemapPrefixToSameURI()
+ throws IOException, ParsingException, XSLException {
diff --git a/dev-java/xom/xom-1.3.7.ebuild b/dev-java/xom/xom-1.3.7.ebuild
index 81ee3477fb38..6afc067d95bb 100644
--- a/dev-java/xom/xom-1.3.7.ebuild
+++ b/dev-java/xom/xom-1.3.7.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-JAVA_PKG_IUSE="doc source"
+JAVA_PKG_IUSE="doc source test"
JAVA_TESTING_FRAMEWORKS="junit"
inherit java-pkg-2 java-pkg-simple
@@ -18,7 +18,6 @@ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64
CDEPEND="
dev-java/jaxen:1.2
- dev-java/junit:0
dev-java/xerces:2"
RDEPEND="
@@ -27,13 +26,19 @@ RDEPEND="
DEPEND="
${CDEPEND}
+ dev-java/junit:0
>=virtual/jdk-1.8:*"
-JAVA_GENTOO_CLASSPATH="jaxen-1.2,junit,xerces-2"
-JAVA_SRC_DIR="XOM/src/nu"
+JAVA_GENTOO_CLASSPATH="jaxen-1.2,xerces-2"
+JAVA_SRC_DIR="src/main/java"
+JAVA_RESOURCE_DIRS="src/main/resources"
JAVA_TEST_GENTOO_CLASSPATH="junit"
-JAVA_TEST_SRC_DIR="XOM/tests"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+PATCHES=(
+ "${FILESDIR}/${P}-disable-invalid-test.patch"
+)
src_prepare() {
default
@@ -46,6 +51,16 @@ src_prepare() {
rm -rv XOM/src/nu/xom/samples/ || die
rm -rv XOM/src/nu/xom/tools/ || die
- mkdir -pv XOM/tests/nu/xom/ || die
- mv -v XOM/src/nu/xom/tests XOM/tests/nu/xom/|| die
+ # reorganize the code and resources so that it goes well with java-pkg-simple
+ mkdir -pv ${JAVA_SRC_DIR} ${JAVA_RESOURCE_DIRS} ${JAVA_TEST_SRC_DIR}/nu/xom || die
+ mv -v XOM/src/nu/xom/tests ${JAVA_TEST_SRC_DIR}/nu/xom/ || die
+ mv -v XOM/data . || die
+ pushd XOM/src || die
+ for file in $(find -type f -name "*.java"); do
+ cp --parents -R ${file} ${WORKDIR}/${JAVA_SRC_DIR} || die
+ done
+ for file in $(find -type f ! -name "*.java"); do
+ cp --parents -R ${file} ${WORKDIR}/${JAVA_RESOURCE_DIRS} || die
+ done
+ popd
}