From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGUM3-0005re-Ez for guix-patches@gnu.org; Sun, 19 Nov 2017 13:30:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGUM0-0001HA-Sv for guix-patches@gnu.org; Sun, 19 Nov 2017 13:30:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:39247) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGUM0-0001H0-O2 for guix-patches@gnu.org; Sun, 19 Nov 2017 13:30:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eGUM0-00075s-Fi for guix-patches@gnu.org; Sun, 19 Nov 2017 13:30:04 -0500 Subject: [bug#29359] [PATCH 16/31] gnu: Add java-xerces. Resent-Message-ID: From: Julien Lepiller Date: Sun, 19 Nov 2017 18:57:50 +0100 Message-Id: <20171119175805.902-16-julien@lepiller.eu> In-Reply-To: <20171119175805.902-1-julien@lepiller.eu> References: <20171119175805.902-1-julien@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29359@debbugs.gnu.org * gnu/packages/java.scm (java-xerces): New variable. * gnu/packages/patches/java-xerces-bootclasspath.patch: New file. * gnu/packages/patches/java-xerces-build_dont_unzip.patch: New file. * gnu/packages/patches/java-xerces-xjavac_taskdef.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. --- gnu/local.mk | 3 + gnu/packages/java.scm | 74 ++++++++++++++++++++++ .../patches/java-xerces-bootclasspath.patch | 38 +++++++++++ .../patches/java-xerces-build_dont_unzip.patch | 44 +++++++++++++ .../patches/java-xerces-xjavac_taskdef.patch | 45 +++++++++++++ 5 files changed, 204 insertions(+) create mode 100644 gnu/packages/patches/java-xerces-bootclasspath.patch create mode 100644 gnu/packages/patches/java-xerces-build_dont_unzip.patch create mode 100644 gnu/packages/patches/java-xerces-xjavac_taskdef.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2fbafe118..6094ddfc4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -757,6 +757,9 @@ dist_patch_DATA = \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ %D%/packages/patches/jacal-fix-texinfo.patch \ %D%/packages/patches/java-powermock-fix-java-files.patch \ + %D%/packages/patches/java-xerces-bootclasspath.patch \ + %D%/packages/patches/java-xerces-build_dont_unzip.patch \ + %D%/packages/patches/java-xerces-xjavac_taskdef.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/jbig2dec-CVE-2016-9601.patch \ %D%/packages/patches/jbig2dec-CVE-2017-7885.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 886a71f23..873226aca 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7992,3 +7992,77 @@ the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs: to other xml.apache.org projects instead of shipping it's own \"standalone\" project.") (license license:asl2.0))) + +(define-public java-xerces + (package + (name "java-xerces") + (version "2.11.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://apache/xerces/j/source/" + "Xerces-J-src." version ".tar.gz")) + (sha256 + (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm")) + (patches (search-patches + "java-xerces-xjavac_taskdef.patch" + "java-xerces-build_dont_unzip.patch" + "java-xerces-bootclasspath.patch")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f;; Test files are not present + #:test-target "test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'create-build.properties + (lambda* (#:key inputs #:allow-other-keys) + (let ((jaxp (assoc-ref inputs "java-jaxp")) + (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) + (with-output-to-file "build.properties" + (lambda _ + (format #t + "jar.jaxp = ~a/share/java/jaxp.jar~@ + jar.apis-ext = ~a/share/java/jaxp.jar~@ + jar.resolver = ~a/share/java/xml-resolver.jar~%" + jaxp jaxp resolver))) + ;; Make xerces use our version of jaxp in tests + (substitute* "build.xml" + (("xml-apis.jar") + (string-append jaxp "/share/java/jaxp.jar")) + (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") + "${jar.apis}"))) + #t)) + (replace 'install (install-jars "build"))))) + (inputs + `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) + ("java-jaxp" ,java-jaxp))) + (home-page "https://xerces.apache.org/xerces2-j/") + (synopsis "Validating XML parser for Java with DOM level 3 support") + (description "The Xerces2 Java parser is the reference implementation of +XNI, the Xerces Native Interface, and also a fully conforming XML Schema +processor. + +Xerces2-J supports the following standards and APIs: + +@itemize +@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation +@item Namespaces in XML Recommendation +@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and + Range Recommendations +@item Simple API for XML (SAX) 2.0.1 Core and Extension +@item Java APIs for XML Processing (JAXP) 1.2.01 +@item XML Schema 1.0 Structures and Datatypes Recommendations +@item Experimental implementation of the Document Object Model (DOM) Level 3 + Core and Load/Save Working Drafts +@item Provides a partial implementation of the XML Inclusions (XInclude) W3C + Candidate Recommendation +@end itemize + +Xerces is now able to parse documents written according to the XML 1.1 +Candidate Recommendation, except that it does not yet provide an option to +enable normalization checking as described in section 2.13 of this +specification. It also handles namespaces according to the XML Namespaces 1.1 +Candidate Recommendation, and will correctly serialize XML 1.1 documents if +the DOM level 3 load/save API's are in use.") + (license license:asl2.0))) diff --git a/gnu/packages/patches/java-xerces-bootclasspath.patch b/gnu/packages/patches/java-xerces-bootclasspath.patch new file mode 100644 index 000000000..efaa548a6 --- /dev/null +++ b/gnu/packages/patches/java-xerces-bootclasspath.patch @@ -0,0 +1,38 @@ +Based on https://anonscm.debian.org/viewvc/pkg-java/trunk/libxerces2-java/debian/patches/03_bootclasspath.patch?revision=14509, adopted for guix + +--- xerces-2_11_0/build.xml.orig 2010-11-26 21:42:11.000000000 +0100 ++++ xerces-2_11_0/build.xml 2017-03-28 14:04:41.946606996 +0200 +@@ -290,13 +290,14 @@ + destdir="${build.dest}" + source="${javac.source}" + target="${javac.target}" +- classpath="${build.dir}/classes:${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}" ++ classpath="${build.dir}/classes:${jar.jaxp}:${jar.apis-ext}:${jar.resolver}" + debug="${debug}" nowarn="true" + debuglevel="${debuglevel}" + deprecation="${deprecation}" + optimize="${optimize}" + includeAntRuntime="false" +- includeJavaRuntime="false" ++ includeJavaRuntime="true" ++ bootclasspath="${jar.jaxp}:${jar.apis-ext}:${jar.resolver}" + excludes="org/xml/sax/** + javax/xml/** + org/w3c/dom/* +@@ -1451,13 +1452,14 @@ + destdir="${build.dest}" + source="${javac.source}" + target="${javac.target}" +- classpath="${build.dir}/classes:${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}" ++ classpath="${build.dir}/classes:${jar.jaxp}:${jar.apis-ext}:${jar.resolver}" + debug="${debug}" + debuglevel="${debuglevel}" + deprecation="${deprecation}" + optimize="${optimize}" + includeAntRuntime="false" +- includeJavaRuntime="false" ++ includeJavaRuntime="true" ++ bootclasspath="${jar.jaxp}:${jar.apis-ext}:${jar.resolver}" + excludes="org/xml/sax/** + javax/xml/** + org/w3c/dom/* diff --git a/gnu/packages/patches/java-xerces-build_dont_unzip.patch b/gnu/packages/patches/java-xerces-build_dont_unzip.patch new file mode 100644 index 000000000..2ff562886 --- /dev/null +++ b/gnu/packages/patches/java-xerces-build_dont_unzip.patch @@ -0,0 +1,44 @@ +Don't unzip the sources which were bundled originally. Guix strips them from +the source and uses pre-build packages. + +Taken from https://anonscm.debian.org/viewvc/pkg-java/trunk/libxerces2-java/debian/patches/02_build_dont_unzip.patch?revision=14507 + +Index: b/build.xml +=================================================================== +--- a/build.xml ++++ b/build.xml +@@ -247,7 +247,7 @@ + + +- ++ + + + + +- ++ + + + + + +- ++ + + + +@@ -291,7 +291,7 @@ + source="${javac.source}" + target="${javac.target}" + classpath="${build.dir}/classes:${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}" +- debug="${debug}" ++ debug="${debug}" nowarn="true" + debuglevel="${debuglevel}" + deprecation="${deprecation}" + optimize="${optimize}" +@@ -359,7 +359,7 @@ + source="${javac.source}" + target="${javac.target}" + classpath="${build.dir}/classes:${tools.dir}/${jar.apis}" +- debug="${debug}" ++ debug="${debug}" nowarn="true" + debuglevel="${debuglevel}" + includeAntRuntime="false" + includeJavaRuntime="true"/> +@@ -379,7 +379,7 @@ + source="${javac.source}" + target="${javac.target}" + classpath="${tools.dir}/${jar.apis}:${build.dir}/classes:./tools/junit.jar" +- debug="${debug}" ++ debug="${debug}" nowarn="true" + debuglevel="${debuglevel}" + includeAntRuntime="false" + includeJavaRuntime="true"/> -- 2.15.0