diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-12-03 03:20:30 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2015-12-03 03:20:30 -0500 |
commit | adff2ac56891fb107dc025f26d501a35281e1f13 (patch) | |
tree | fca2bcf7d4b6cd738971ae09fba938db40ea8c10 /libre | |
parent | d872c53acbd9554c6bdf4edbe3a3124c9bc05df2 (diff) |
xerces2-java: add new package to [libre]
Diffstat (limited to 'libre')
-rw-r--r-- | libre/xerces2-java/PKGBUILD | 63 | ||||
-rw-r--r-- | libre/xerces2-java/xerces2-java-HTMLObjectElementImpl.patch | 18 | ||||
-rw-r--r-- | libre/xerces2-java/xerces2-java-dont_unzip.patch | 65 | ||||
-rw-r--r-- | libre/xerces2-java/xerces2-java-taskdef.patch | 38 |
4 files changed, 184 insertions, 0 deletions
diff --git a/libre/xerces2-java/PKGBUILD b/libre/xerces2-java/PKGBUILD new file mode 100644 index 000000000..aaf2811a7 --- /dev/null +++ b/libre/xerces2-java/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> + +_libname=xerces2 +pkgname=${_libname}-java +pkgver=2.11.0 +pkgrel=3.parabola1 +pkgdesc="High performance fully compliant Java XML parser" +arch=('any') +url="http://xml.apache.org/xerces2-j" +license=('APACHE') +depends=('java-runtime' 'java-resolver' 'java-xml-commons-external') +makedepends=('apache-ant' 'java-resolver' 'java-xml-commons-external' 'jh') +provides=("java-xerces2=${pkgver}") +conflicts=('java-xerces2') +replaces=('java-xerces2') +source=("http://archive.apache.org/dist/xerces/j/Xerces-J-src.${pkgver}.tar.gz" + "http://repo.maven.apache.org/maven2/xerces/xercesImpl/${pkgver}/xercesImpl-${pkgver}.pom" + "xerces2-java-taskdef.patch" + "xerces2-java-dont_unzip.patch" + "xerces2-java-HTMLObjectElementImpl.patch") +md5sums=('d01fc11eacbe43b45681cb85ac112ebf' + '64288948e6420e49679348b0ce1963f8' + '600788add1665864495e2bd0ab015613' + '3bd20b2ea82f14d77031bf0e49c03516' + 'e1c26eeaedd33dc0a7af493a07a17211') + +prepare() { + cd "${srcdir}/xerces-${pkgver//./_}" + mkdir -p tools + patch -Np1 -i ../xerces2-java-taskdef.patch + patch -Np1 -i ../xerces2-java-dont_unzip.patch + patch -Np1 -i ../xerces2-java-HTMLObjectElementImpl.patch +} + +build() { + cd "${srcdir}/xerces-${pkgver//./_}" + ln -sf /usr/share/java/resolver.jar tools/resolver.jar + ln -sf /usr/share/java/xml-apis.jar tools/xml-apis.jar + + ant clean jar sampjar javadocs +} + +package() { + cd "${srcdir}/xerces-${pkgver//./_}" + + # Install license file + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" + + # Install documentation + install -d "${pkgdir}/usr/share/doc/${pkgname}" + cp -r "build/docs/javadocs" "${pkgdir}/usr/share/doc/${pkgname}" + cp -r "build/samples" "${pkgdir}/usr/share/doc/${pkgname}/examples" + + # Install Maven artifacts + export DESTDIR=${pkgdir} + jh mvn-install xerces xercesImpl ${pkgver} \ + "${srcdir}/xercesImpl-${pkgver}.pom" \ + "build/xercesImpl.jar" \ + "xercesImpl.jar" + + ln -s "/usr/share/java/xercesImpl.jar" \ + "${pkgdir}/usr/share/java/xercesImpl-${pkgver}.jar" +} diff --git a/libre/xerces2-java/xerces2-java-HTMLObjectElementImpl.patch b/libre/xerces2-java/xerces2-java-HTMLObjectElementImpl.patch new file mode 100644 index 000000000..b18badc5d --- /dev/null +++ b/libre/xerces2-java/xerces2-java-HTMLObjectElementImpl.patch @@ -0,0 +1,18 @@ +--- xerces-2_11_0.orig/src/org/apache/html/dom/HTMLElementImpl.java 2010-11-26 15:42:05.000000000 -0500 ++++ xerces-2_11_0/src/org/apache/html/dom/HTMLElementImpl.java 2015-12-02 09:54:52.042144620 -0500 +@@ -20,6 +20,7 @@ +
+ import org.apache.xerces.dom.ElementImpl;
+ import org.w3c.dom.Attr;
++import org.w3c.dom.Document;
+ import org.w3c.dom.Node;
+ import org.w3c.dom.NodeList;
+ import org.w3c.dom.html.HTMLElement;
+@@ -254,4 +255,7 @@ + return null;
+ }
+
++ public Document getContentDocument() {
++ throw new UnsupportedOperationException();
++ }
+ }
diff --git a/libre/xerces2-java/xerces2-java-dont_unzip.patch b/libre/xerces2-java/xerces2-java-dont_unzip.patch new file mode 100644 index 000000000..8d068a259 --- /dev/null +++ b/libre/xerces2-java/xerces2-java-dont_unzip.patch @@ -0,0 +1,65 @@ +--- xerces-2_11_0.orig/build.xml 2010-11-26 15:42:11.000000000 -0500 ++++ xerces-2_11_0/build.xml 2015-12-03 02:10:02.884516544 -0500 +@@ -246,30 +246,6 @@ + tofile="${build.src}/org/apache/xerces/impl/msg/XPointerMessages_en.properties"/>
+ <copy file="${src.dir}/org/apache/xerces/impl/xpath/regex/message.properties"
+ tofile="${build.src}/org/apache/xerces/impl/xpath/regex/message_en.properties"/>
+-
+- <!-- now deal with API's: -->
+- <unzip src="${src.apis.zip}" dest="${build.src}">
+- <patternset
+- includes="org/xml/sax/**
+- javax/xml/**
+- javax/xml/datatype/**
+- javax/xml/namespace/**
+- javax/xml/parsers/**
+- javax/xml/stream/**
+- javax/xml/transform/**
+- javax/xml/validation/**
+- javax/xml/xpath/**
+- org/w3c/dom/*
+- org/w3c/dom/bootstrap/**
+- org/w3c/dom/events/**
+- org/w3c/dom/html/**
+- org/w3c/dom/ls/**
+- org/w3c/dom/ranges/**
+- org/w3c/dom/traversal/**
+- org/w3c/dom/views/**
+- org/w3c/dom/xpath/**"
+- />
+- </unzip>
+
+ <!-- substitute tokens as needed -->
+ <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
+@@ -1231,31 +1207,6 @@ + <!-- HACK: Remove reference to XML11Configurable from SAX parser -->
+ <replace file="${build.dir}/src/org/apache/xerces/parsers/AbstractSAXParser.java"
+ token="return (fConfiguration instanceof XML11Configurable);" value="return false;"/>
+-
+- <!-- now deal with API's: -->
+- <unzip src="${src.apis.zip}" dest="${build.src}">
+- <patternset
+- includes="org/xml/sax/**
+- javax/xml/**
+- javax/xml/datatype/**
+- javax/xml/namespace/**
+- javax/xml/parsers/**
+- javax/xml/stream/**
+- javax/xml/transform/**
+- javax/xml/validation/**
+- javax/xml/xpath/**
+- org/w3c/dom/*
+- org/w3c/dom/bootstrap/**
+- org/w3c/dom/events/**
+- org/w3c/dom/html/**
+- org/w3c/dom/ls/**
+- org/w3c/dom/ranges/**
+- org/w3c/dom/traversal/**
+- org/w3c/dom/views/**
+- org/w3c/dom/xpath/**"
+- />
+- </unzip>
+-
+
+ <!-- substitute tokens as needed -->
+ <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
diff --git a/libre/xerces2-java/xerces2-java-taskdef.patch b/libre/xerces2-java/xerces2-java-taskdef.patch new file mode 100644 index 000000000..06ba7fe95 --- /dev/null +++ b/libre/xerces2-java/xerces2-java-taskdef.patch @@ -0,0 +1,38 @@ +--- xerces-2_11_0.orig/build.xml 2010-11-26 15:42:11.000000000 -0500 ++++ xerces-2_11_0/build.xml 2015-09-07 21:19:33.401435351 -0500 +@@ -39,7 +39,7 @@ + <property name="tools.dir" value="./tools"/>
+
+ <!-- enable compilation under JDK 1.4 and above -->
+- <taskdef name="xjavac" classname="org.apache.xerces.util.XJavac">
++ <taskdef name="xjavac" classname="org.apache.tools.ant.taskdefs.Javac">
+ <classpath>
+ <pathelement location="${tools.dir}/bin/xjavac.jar"/>
+ </classpath>
+@@ -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"/>
|