This is an automated email from the git hooks/post-receive script. eugene pushed a commit to branch properone in repository xslthl.
commit 45a2453344a3860619c1cb0fdefc0bf348a15f6e Author: Eugene Zhukov <eug...@debian.org> Date: Thu Feb 16 08:45:15 2017 +0000 Add patch to remove SaxonB and SaxonEE connectors --- debian/changelog | 6 +- debian/compat | 2 +- debian/control | 6 +- debian/copyright | 11 +- debian/maven.ignoreRules | 3 + debian/patches/remove_connectors.patch | 349 +++++++++++++++++++++++++++++++++ debian/patches/saxon-he.patch | 45 ----- debian/patches/series | 2 +- 8 files changed, 366 insertions(+), 58 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5cdb702..b7e4a44 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -xslthl (2.1.3-2.1) UNRELEASED; urgency=medium +xslthl (2.1.3-3) unstable; urgency=medium - * Non-maintainer upload. * Moved the package to Git + * Remove ConnectorSaxonB and ConnectorSaxonEE classes - -- Eugene Zhukov <eugene@localhost> Tue, 07 Feb 2017 21:36:44 +0200 + -- Eugene Zhukov <eug...@debian.org> Thu, 16 Feb 2017 07:01:26 +0000 xslthl (2.1.3-2) unstable; urgency=medium diff --git a/debian/compat b/debian/compat index 45a4fb7..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -8 +10 diff --git a/debian/control b/debian/control index fdabc9c..c9f0b09 100644 --- a/debian/control +++ b/debian/control @@ -3,9 +3,9 @@ Section: text Priority: optional Maintainer: Debian Java Maintainers <pkg-java-maintain...@lists.alioth.debian.org> Uploaders: Eugene Zhukov <eug...@debian.org>, Mathieu Malaterre <ma...@debian.org> -Build-Depends: debhelper (>= 9), default-jdk, maven-debian-helper (>= 1.6.1) -Build-Depends-Indep: libsaxon-java, libsaxonhe-java, libxalan2-java, junit4 -Standards-Version: 3.9.7 +Build-Depends: debhelper (>=10), default-jdk, maven-debian-helper (>= 1.6.1), + libsaxon-java, libsaxonhe-java, libxalan2-java, junit4 +Standards-Version: 3.9.8 Vcs-Git: https://anonscm.debian.org/git/pkg-java/xslthl.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/xslthl.git Homepage: http://xslthl.sourceforge.net diff --git a/debian/copyright b/debian/copyright index 1886e7c..113d7ab 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,6 +5,12 @@ Source: http://xslthl.sourceforge.net/ Files: * Copyright: 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks License: Zlib + +Files: debian/* +Copyright: 2010-2012 Mathieu Malaterre <ma...@debian.org> +License: Zlib + +License: Zlib This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. @@ -20,8 +26,3 @@ License: Zlib 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. - -Files: debian/* -Copyright: 2010-2012 Mathieu Malaterre <ma...@debian.org> -License: Zlib - Same as above diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules index fbb4b27..c2af102 100644 --- a/debian/maven.ignoreRules +++ b/debian/maven.ignoreRules @@ -1,6 +1,9 @@ +junit junit * * * * org.apache.maven.plugins maven-antrun-plugin * * * * org.apache.maven.plugins maven-assembly-plugin * * * * org.apache.maven.plugins maven-javadoc-plugin * * * * org.apache.maven.plugins maven-source-plugin * * * * +org.apache.maven.plugins maven-surefire-plugin * * * * +org.apache.maven.wagon wagon-ssh-external * * * * org.codehaus.mojo findbugs-maven-plugin * * * * diff --git a/debian/patches/remove_connectors.patch b/debian/patches/remove_connectors.patch new file mode 100644 index 0000000..c5a34c5 --- /dev/null +++ b/debian/patches/remove_connectors.patch @@ -0,0 +1,349 @@ +Description: Remove ConnectorSaxonB and ConnectorSaxonEE + This is needed for compatibility with Saxon-HE 9.7 + +--- xslthl-2.1.3.orig/src/main/java/net/sf/xslthl/ConnectorSaxonB.java ++++ /dev/null +@@ -1,145 +0,0 @@ +-/* +- * xslthl - XSLT Syntax Highlighting +- * https://sourceforge.net/projects/xslthl/ +- * Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks +- * +- * This software is provided 'as-is', without any express or implied +- * warranty. In no event will the authors be held liable for any damages +- * arising from the use of this software. +- * +- * Permission is granted to anyone to use this software for any purpose, +- * including commercial applications, and to alter it and redistribute it +- * freely, subject to the following restrictions: +- * +- * 1. The origin of this software must not be misrepresented; you must not +- * claim that you wrote the original software. If you use this software +- * in a product, an acknowledgment in the product documentation would be +- * appreciated but is not required. +- * 2. Altered source versions must be plainly marked as such, and must not be +- * misrepresented as being the original software. +- * 3. This notice may not be removed or altered from any source distribution. +- * +- * Michal Molhanec <mol1111 at users.sourceforge.net> +- * Jirka Kosek <kosek at users.sourceforge.net> +- * Michiel Hendriks <elmuerte at users.sourceforge.net> +- */ +-package net.sf.xslthl; +- +-import java.util.ArrayList; +-import java.util.List; +- +-import net.sf.saxon.event.Builder; +-import net.sf.saxon.expr.XPathContext; +-import net.sf.saxon.om.Axis; +-import net.sf.saxon.om.AxisIterator; +-import net.sf.saxon.om.Item; +-import net.sf.saxon.om.ListIterator; +-import net.sf.saxon.om.NamePool; +-import net.sf.saxon.om.NodeInfo; +-import net.sf.saxon.om.SequenceIterator; +-import net.sf.saxon.pattern.AnyNodeTest; +-import net.sf.saxon.type.Type; +- +-/** +- * A new saxon connector to be used with saxon 8.5 and later. +- */ +-public class ConnectorSaxonB { +- +- private static void blockToSaxon6Node(Block b, Builder builder, +- NamePool pool, Config config) throws Exception { +- if (b.isStyled()) { +- int elemId = pool.allocate(config.prefix, config.uri, +- ((StyledBlock) b).getStyle()); +- builder.startElement(elemId, -1, 0, 0); +- builder.characters(b.getText(), 0, b.getText().length()); +- builder.endElement(); +- } else { +- builder.characters(b.getText(), 0, b.getText().length()); +- } +- } +- +- /** +- * Highlight the nodes using the standard configuration file +- * +- * @param context +- * @param hlCode +- * @param nodes +- * @return +- * @throws Exception +- */ +- public static SequenceIterator highlight(XPathContext context, +- String hlCode, SequenceIterator nodes) throws Exception { +- return highlight(context, hlCode, nodes, null); +- } +- +- /** +- * highlight the nodes using a specific interface +- * +- * @param context +- * @param hlCode +- * @param seq +- * @param configFilename +- * @return +- * @throws Exception +- */ +- public static SequenceIterator highlight(XPathContext context, +- String hlCode, SequenceIterator seq, String configFilename) +- throws Exception { +- try { +- Config c = Config.getInstance(configFilename); +- MainHighlighter hl = c.getMainHighlighter(hlCode); +- +- NamePool pool = context.getController().getNamePool(); +- +- List<Item> resultNodes = new ArrayList<Item>(); +- while (seq.next() != null) { +- Item itm = seq.current(); +- if (itm instanceof NodeInfo) { +- NodeInfo ni = (NodeInfo) itm; +- SequenceIterator ae = ni.iterateAxis(Axis.CHILD, +- AnyNodeTest.getInstance()); +- while (ae.next() != null) { +- Item itm2 = ae.current(); +- if (itm2 instanceof NodeInfo) { +- NodeInfo n2i = (NodeInfo) itm2; +- if (n2i.getNodeKind() == Type.TEXT) { +- if (hl != null) { +- Builder builder = context.getController() +- .makeBuilder(); +- builder.open(); +- builder.startDocument(0); +- List<Block> l = hl.highlight(n2i +- .getStringValue()); +- for (Block b : l) { +- blockToSaxon6Node(b, builder, pool, c); +- } +- builder.endDocument(); +- builder.close(); +- NodeInfo doc = builder.getCurrentRoot(); +- AxisIterator elms = doc.iterateAxis( +- Axis.CHILD, AnyNodeTest +- .getInstance()); +- while (elms.next() != null) { +- resultNodes.add(elms.current()); +- } +- } else { +- resultNodes.add(n2i); +- } +- } else { +- resultNodes.add(n2i); +- } +- } else { +- resultNodes.add(itm2); +- } +- } +- } else { +- resultNodes.add(itm); +- } +- } +- return new ListIterator(resultNodes); +- } catch (Exception e) { +- e.printStackTrace(); +- return null; +- } +- } +-} +--- xslthl-2.1.3.orig/src/main/java/net/sf/xslthl/ConnectorSaxonEE.java ++++ /dev/null +@@ -1,195 +0,0 @@ +-/* +- * xslthl - XSLT Syntax Highlighting +- * https://sourceforge.net/projects/xslthl/ +- * Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks +- * +- * This software is provided 'as-is', without any express or implied +- * warranty. In no event will the authors be held liable for any damages +- * arising from the use of this software. +- * +- * Permission is granted to anyone to use this software for any purpose, +- * including commercial applications, and to alter it and redistribute it +- * freely, subject to the following restrictions: +- * +- * 1. The origin of this software must not be misrepresented; you must not +- * claim that you wrote the original software. If you use this software +- * in a product, an acknowledgment in the product documentation would be +- * appreciated but is not required. +- * 2. Altered source versions must be plainly marked as such, and must not be +- * misrepresented as being the original software. +- * 3. This notice may not be removed or altered from any source distribution. +- * +- * Michal Molhanec <mol1111 at users.sourceforge.net> +- * Jirka Kosek <kosek at users.sourceforge.net> +- * Michiel Hendriks <elmuerte at users.sourceforge.net> +- */ +-package net.sf.xslthl; +- +-import java.lang.reflect.Constructor; +-import java.lang.reflect.Method; +-import java.util.ArrayList; +-import java.util.List; +- +-import net.sf.saxon.event.Builder; +-import net.sf.saxon.expr.XPathContext; +-import net.sf.saxon.om.Item; +-import net.sf.saxon.om.NamePool; +-import net.sf.saxon.om.NodeInfo; +-import net.sf.saxon.om.SequenceIterator; +-import net.sf.saxon.type.AnyType; +-import net.sf.saxon.type.Type; +- +-/** +- * A new saxon connector to be used with saxon 8.5 and later. This class uses +- * Java reflection to call Saxon classes in order to be able to compile both +- * connectors with the older Saxon library. +- */ +-public class ConnectorSaxonEE { +- +- private static void blockToSaxon6Node(Block b, Builder builder, +- Config config) throws Exception { +- if (b.isStyled()) { +- // int elemId = pool.allocate(config.prefix, config.uri, +- // ((StyledBlock) b).getStyle()); +- +- // new FingerprintedQName(config.prefix, config.uri, ((StyledBlock) +- // b).getStyle()) +- Class fpQnameClazz = Class +- .forName("net.sf.saxon.om.FingerprintedQName"); +- Constructor constructor = fpQnameClazz.getConstructor(new Class[] { +- String.class, String.class, String.class }); +- Object fpQname = constructor.newInstance(new Object[] { +- config.prefix, config.uri, ((StyledBlock) b).getStyle() }); +- +- // builder.startElement(fpQname, AnyType.getInstance(), 0, 0); +- Method startElement = builder.getClass().getMethod( +- "startElement", +- new Class[] { Class.forName("net.sf.saxon.om.NodeName"), +- net.sf.saxon.type.SchemaType.class, int.class, +- int.class }); +- startElement.invoke(builder, +- new Object[] { fpQname, AnyType.getInstance(), 0, 0 }); +- builder.characters(b.getText(), 0, b.getText().length()); +- builder.endElement(); +- } else { +- builder.characters(b.getText(), 0, b.getText().length()); +- } +- } +- +- /** +- * Highlight the nodes using the standard configuration file +- * +- * @param context +- * @param hlCode +- * @param nodes +- * @return +- * @throws Exception +- */ +- public static SequenceIterator highlight(XPathContext context, +- String hlCode, SequenceIterator nodes) throws Exception { +- return highlight(context, hlCode, nodes, null); +- } +- +- /** +- * highlight the nodes using a specific interface +- * +- * @param context +- * @param hlCode +- * @param seq +- * @param configFilename +- * @return +- * @throws Exception +- */ +- public static SequenceIterator highlight(XPathContext context, +- String hlCode, SequenceIterator seq, String configFilename) +- throws Exception { +- try { +- Config c = Config.getInstance(configFilename); +- MainHighlighter hl = c.getMainHighlighter(hlCode); +- +- // Axis info obtained via Java reflection. +- byte childType = (Byte) Class.forName("net.sf.saxon.om.AxisInfo") +- .getField("CHILD").get(null); +- Method iterateAxis = Class +- .forName("net.sf.saxon.om.NodeInfo") +- .getMethod( +- "iterateAxis", +- new Class[] { +- byte.class, +- Class.forName("net.sf.saxon.pattern.NodeTest") }); +- Class axisIterClazz = Class +- .forName("net.sf.saxon.tree.iter.AxisIterator"); +- Method next = axisIterClazz.getMethod("next", new Class[0]); +- +- List<Item> resultNodes = new ArrayList<Item>(); +- Item itm = null; +- while ((itm = seq.next()) != null) { +- // Item itm = seq.current(); +- if (itm instanceof NodeInfo) { +- NodeInfo ni = (NodeInfo) itm; +- SequenceIterator ae = (SequenceIterator) iterateAxis +- .invoke(ni, +- new Object[] { +- childType, +- net.sf.saxon.pattern.AnyNodeTest +- .getInstance() }); +- // SequenceIterator ae = ni.iterateAxis(childType, +- // net.sf.saxon.pattern.AnyNodeTest.getInstance()); +- Item itm2 = null; +- while ((itm2 = ae.next()) != null) { +- if (itm2 instanceof NodeInfo) { +- NodeInfo n2i = (NodeInfo) itm2; +- if (n2i.getNodeKind() == Type.TEXT) { +- if (hl != null) { +- Builder builder = context.getController() +- .makeBuilder(); +- builder.open(); +- builder.startDocument(0); +- List<Block> l = hl.highlight(n2i +- .getStringValue()); +- for (Block b : l) { +- blockToSaxon6Node(b, builder, c); +- } +- builder.endDocument(); +- builder.close(); +- NodeInfo doc = builder.getCurrentRoot(); +- +- Object elms = iterateAxis +- .invoke(doc, +- new Object[] { +- childType, +- net.sf.saxon.pattern.AnyNodeTest +- .getInstance() }); +- // Object elms = +- // doc.iterateAxis(childType,net.sf.saxon.pattern.AnyNodeTest); +- Item crt = null; +- while ((crt = (Item) next.invoke(elms, +- new Object[0])) != null) { +- resultNodes.add(crt); +- } +- } else { +- resultNodes.add(n2i); +- } +- } else { +- resultNodes.add(n2i); +- } +- } else { +- resultNodes.add(itm2); +- } +- } +- } else { +- resultNodes.add(itm); +- } +- } +- Class lstIterClassName = Class +- .forName("net.sf.saxon.tree.iter.ListIterator"); +- Constructor constructor = lstIterClassName +- .getConstructor(new Class[] { List.class }); +- return (SequenceIterator) constructor +- .newInstance(new Object[] { resultNodes }); +- } catch (Throwable e) { +- e.printStackTrace(); +- return null; +- } +- } +-} diff --git a/debian/patches/saxon-he.patch b/debian/patches/saxon-he.patch deleted file mode 100644 index c499c66..0000000 --- a/debian/patches/saxon-he.patch +++ /dev/null @@ -1,45 +0,0 @@ -Description: Make package compile with libsaxonhe-java - ---- a/src/main/java/net/sf/xslthl/ConnectorSaxonB.java -+++ b/src/main/java/net/sf/xslthl/ConnectorSaxonB.java -@@ -30,10 +30,10 @@ - - import net.sf.saxon.event.Builder; - import net.sf.saxon.expr.XPathContext; --import net.sf.saxon.om.Axis; --import net.sf.saxon.om.AxisIterator; -+import net.sf.saxon.om.AxisInfo; -+import net.sf.saxon.tree.iter.AxisIterator; - import net.sf.saxon.om.Item; --import net.sf.saxon.om.ListIterator; -+import net.sf.saxon.tree.iter.ListIterator; - import net.sf.saxon.om.NamePool; - import net.sf.saxon.om.NodeInfo; - import net.sf.saxon.om.SequenceIterator; -@@ -50,7 +50,7 @@ - if (b.isStyled()) { - int elemId = pool.allocate(config.prefix, config.uri, - ((StyledBlock) b).getStyle()); -- builder.startElement(elemId, -1, 0, 0); -+ builder.startElement(null, null, 0, 0); - builder.characters(b.getText(), 0, b.getText().length()); - builder.endElement(); - } else { -@@ -96,7 +96,7 @@ - Item itm = seq.current(); - if (itm instanceof NodeInfo) { - NodeInfo ni = (NodeInfo) itm; -- SequenceIterator ae = ni.iterateAxis(Axis.CHILD, -+ SequenceIterator ae = ni.iterateAxis(AxisInfo.CHILD, - AnyNodeTest.getInstance()); - while (ae.next() != null) { - Item itm2 = ae.current(); -@@ -117,7 +117,7 @@ - builder.close(); - NodeInfo doc = builder.getCurrentRoot(); - AxisIterator elms = doc.iterateAxis( -- Axis.CHILD, AnyNodeTest -+ AxisInfo.CHILD, AnyNodeTest - .getInstance()); - while (elms.next() != null) { - resultNodes.add(elms.current()); diff --git a/debian/patches/series b/debian/patches/series index ad60f29..1fdd831 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,4 @@ pom_fixes.patch sh_compat.patch using_system_config_file.diff -saxon-he.patch +remove_connectors.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/xslthl.git _______________________________________________ pkg-java-commits mailing list pkg-java-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits