From 9820d8babd9e653f04a9eff0667f31c29c73bee3 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 24 Jun 2020 14:30:27 -0400 Subject: [PATCH] Update to build using Java 11 --- xerces-j2-getcontentdocument.patch | 65 ++++++++++++++++++++++++++++++ xerces-j2-modulefix.patch | 12 ++++++ xerces-j2.spec | 21 ++++++++-- 3 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 xerces-j2-getcontentdocument.patch create mode 100644 xerces-j2-modulefix.patch diff --git a/xerces-j2-getcontentdocument.patch b/xerces-j2-getcontentdocument.patch new file mode 100644 index 0000000..9c8e00f --- /dev/null +++ b/xerces-j2-getcontentdocument.patch @@ -0,0 +1,65 @@ +diff -up ./src/org/apache/html/dom/HTMLFrameElementImpl.java.fix ./src/org/apache/html/dom/HTMLFrameElementImpl.java +--- ./src/org/apache/html/dom/HTMLFrameElementImpl.java.fix 2018-04-21 00:02:12.000000000 -0400 ++++ ./src/org/apache/html/dom/HTMLFrameElementImpl.java 2020-06-24 13:22:17.584233178 -0400 +@@ -17,6 +17,7 @@ + package org.apache.html.dom; + + import org.w3c.dom.html.HTMLFrameElement; ++import org.w3c.dom.Document; + + /** + * @xerces.internal +@@ -137,7 +138,10 @@ public class HTMLFrameElementImpl + { + super( owner, name ); + } +- ++ ++ public Document getContentDocument() { ++ return super.getOwnerDocument(); ++ } + + } + +diff -up ./src/org/apache/html/dom/HTMLIFrameElementImpl.java.fix ./src/org/apache/html/dom/HTMLIFrameElementImpl.java +--- ./src/org/apache/html/dom/HTMLIFrameElementImpl.java.fix 2018-04-21 00:02:12.000000000 -0400 ++++ ./src/org/apache/html/dom/HTMLIFrameElementImpl.java 2020-06-24 13:22:37.686198652 -0400 +@@ -17,6 +17,7 @@ + package org.apache.html.dom; + + import org.w3c.dom.html.HTMLIFrameElement; ++import org.w3c.dom.Document; + + /** + * @xerces.internal +@@ -161,6 +162,9 @@ public class HTMLIFrameElementImpl + super( owner, name ); + } + ++ public Document getContentDocument() { ++ return super.getOwnerDocument(); ++ } + + } + +diff -up ./src/org/apache/html/dom/HTMLObjectElementImpl.java.fix ./src/org/apache/html/dom/HTMLObjectElementImpl.java +--- ./src/org/apache/html/dom/HTMLObjectElementImpl.java.fix 2018-04-21 00:02:09.000000000 -0400 ++++ ./src/org/apache/html/dom/HTMLObjectElementImpl.java 2020-06-24 13:23:01.294158104 -0400 +@@ -17,6 +17,7 @@ + package org.apache.html.dom; + + import org.w3c.dom.html.HTMLObjectElement; ++import org.w3c.dom.Document; + + /** + * @xerces.internal +@@ -251,6 +252,9 @@ public class HTMLObjectElementImpl + super( owner, name ); + } + ++ public Document getContentDocument() { ++ return super.getOwnerDocument(); ++ } + + } + diff --git a/xerces-j2-modulefix.patch b/xerces-j2-modulefix.patch new file mode 100644 index 0000000..b895e21 --- /dev/null +++ b/xerces-j2-modulefix.patch @@ -0,0 +1,12 @@ +diff -up ./build.xml.fix2 ./build.xml +--- ./build.xml.fix2 2020-06-24 14:11:03.342338406 -0400 ++++ ./build.xml 2020-06-24 14:14:03.000100028 -0400 +@@ -447,7 +447,7 @@ Authors: + author='true' version='true' + windowtitle='XML Standard API' doctitle='XML Standard API' + bottom='${copyright}' +- additionalparam='${additional.param}' ++ additionalparam='--patch-module jdk.xml.dom=${build.src}/org/w3c/dom/html ${additional.param}' + /> + + = 2.7.1 BuildRequires: xml-commons-apis >= 1.4.01 BuildRequires: xml-commons-resolver >= 1.2 +BuildRequires: java-11-openjdk-devel Requires: xalan-j2 >= 2.7.1 Requires: xml-commons-apis >= 1.4.01 @@ -111,6 +118,8 @@ Requires: %{name} = %{version}-%{release} %setup -q -n xerces-%{cvs_version} %patch0 -p0 -b .orig %patch1 -p0 -b .orig +%patch2 -p0 -b .orig +%patch3 -p0 -b .orig # Copy the custom ant tasks into place mkdir -p tools/org/apache/xerces/util @@ -128,6 +137,7 @@ sed -i 's/\r//' LICENSE README NOTICE %mvn_file : %{name} jaxp_parser_impl %build +export JAVA_HOME=/usr/lib/jvm/java-11 pushd tools # Build custom ant tasks @@ -145,8 +155,8 @@ ln -sf $(build-classpath xerces-j2) x.jar popd # Build everything -export ANT_OPTS="-Xmx256m -Djava.endorsed.dirs=$(pwd)/tools -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true" -ant -Djavac.source=1.5 -Djavac.target=1.5 \ +export ANT_OPTS="-Xmx512m -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true" +ant -Djavac.source=1.6 -Djavac.target=1.6 \ -Dbuild.compiler=modern \ clean jars javadocs @@ -198,6 +208,11 @@ ln -sf %{name}.jar %{_javadir}/jaxp_parser_impl.jar %{_datadir}/%{name} %changelog +* Wed Jun 24 2020 Jeff Johnston - 2.12.0-5 +- Change to build using Java 11 +- Fix some impl classes that require getContentDocument() method +- Add a patch-module option for Javadoc generation + * Fri Jan 31 2020 Fedora Release Engineering - 2.12.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild