[scilab] 08/16: Import Debian changes 5.5.2-1.1

Julien Puydt julien.puydt at laposte.net
Wed Nov 15 16:00:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository scilab.

commit 633ce18e44fcfbb9dcad1c7f7a9612ba2f42e99d
Author: Gilles Filippini <pini at debian.org>
Date:   Sat Oct 3 10:06:53 2015 +0200

    Import Debian changes 5.5.2-1.1
    
    scilab (5.5.2-1.1) unstable; urgency=medium
    
      * Non-maintainer upload.
      * Three new patches to cope with java libs API changes:
        - xmlgraphics-commons-2.0.diff
        - fop-2.0.diff
        - batik-1.8.diff
        (closes: #800632).
---
 debian/changelog                            | 11 ++++
 debian/patches/batik-1.8.diff               | 16 ++++++
 debian/patches/fop-2.0.diff                 | 57 +++++++++++++++++++
 debian/patches/series                       |  3 +
 debian/patches/xmlgraphics-commons-2.0.diff | 88 +++++++++++++++++++++++++++++
 5 files changed, 175 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b2f6528..574d6a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+scilab (5.5.2-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Three new patches to cope with java libs API changes:
+    - xmlgraphics-commons-2.0.diff
+    - fop-2.0.diff
+    - batik-1.8.diff
+    (closes: #800632).
+
+ -- Gilles Filippini <pini at debian.org>  Sat, 03 Oct 2015 10:06:53 +0200
+
 scilab (5.5.2-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/debian/patches/batik-1.8.diff b/debian/patches/batik-1.8.diff
new file mode 100644
index 0000000..80de2de
--- /dev/null
+++ b/debian/patches/batik-1.8.diff
@@ -0,0 +1,16 @@
+Description: adapt to batik 1.8 API
+ New path for class SAXSVGDocumentFactory.
+Author: Gilles Filippini <pini at debian.org>
+Index: scilab-5.5.2/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
+===================================================================
+--- scilab-5.5.2.orig/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
++++ scilab-5.5.2/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
+@@ -28,7 +28,7 @@ import org.apache.batik.bridge.DocumentL
+ import org.apache.batik.bridge.GVTBuilder;
+ import org.apache.batik.bridge.UserAgent;
+ import org.apache.batik.bridge.UserAgentAdapter;
+-import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
++import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
+ import org.apache.batik.gvt.GraphicsNode;
+ import org.apache.batik.util.XMLResourceDescriptor;
+ import org.scilab.forge.jlatexmath.ParseException;
diff --git a/debian/patches/fop-2.0.diff b/debian/patches/fop-2.0.diff
new file mode 100644
index 0000000..b846535
--- /dev/null
+++ b/debian/patches/fop-2.0.diff
@@ -0,0 +1,57 @@
+Description: adapt to fop 2.0 API
+ New way to configure and create Fop. See rationals there:
+ <http://wiki.apache.org/xmlgraphics-fop/FopFactoryConfiguration>
+Author: Gilles Filippini <pini at debian.org>
+Index: scilab-5.5.2/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
+===================================================================
+--- scilab-5.5.2.orig/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
++++ scilab-5.5.2/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
+@@ -36,6 +36,8 @@ import org.scilab.modules.helptools.scil
+ import org.scilab.modules.gui.messagebox.ScilabModalDialog;
+ 
+ import org.apache.fop.apps.FopFactory;
++import org.apache.fop.apps.FopFactoryBuilder;
++import org.apache.fop.apps.FopConfParser;
+ import org.apache.fop.apps.Fop;
+ import org.apache.fop.apps.FOUserAgent;
+ import org.apache.fop.apps.MimeConstants;
+@@ -114,11 +116,11 @@ public class CodeExporter extends FOCode
+      * @param format the page format
+      */
+     public void convert(String code, int[] lineNumberArray, String fileName, String type, String title, PageFormat format) {
+-        FopFactory fopFactory = FopFactory.newInstance();
+         OutputStream out = null;
+ 
+         try {
+-            fopFactory.setUserConfig(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml"));
++            FopFactoryBuilder fopFactoryBuilder = new FopConfParser(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml")).getFopFactoryBuilder();
++            FopFactory fopFactory = fopFactoryBuilder.build();
+             FOUserAgent userAgent = fopFactory.newFOUserAgent();
+             userAgent.setProducer(CREATOR);
+             userAgent.setTitle(title);
+Index: scilab-5.5.2/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
+===================================================================
+--- scilab-5.5.2.orig/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
++++ scilab-5.5.2/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
+@@ -19,6 +19,8 @@ import javax.xml.transform.stream.Stream
+ import org.apache.fop.apps.FOPException;
+ import org.apache.fop.apps.Fop;
+ import org.apache.fop.apps.FopFactory;
++import org.apache.fop.apps.FopFactoryBuilder;
++import org.apache.fop.apps.FopConfParser;
+ import org.apache.fop.apps.FormattingResults;
+ import org.apache.fop.apps.MimeConstants;
+ import org.scilab.forge.jlatexmath.fop.JLaTeXMathElementMapping;
+@@ -43,10 +45,10 @@ public class FopConverter extends Contai
+         String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase();
+ 
+         try {
+-            FopFactory fopFactory = FopFactory.newInstance();
++            FopFactoryBuilder fopFactoryBuilder = new FopConfParser(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml")).getFopFactoryBuilder();
++            FopFactory fopFactory = fopFactoryBuilder.build();
+             fopFactory.addElementMapping(new JLaTeXMathElementMapping());
+             fopFactory.getXMLHandlerRegistry().addXMLHandler(new JLaTeXMathXMLHandler());
+-            fopFactory.setUserConfig(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml"));
+ 
+             // Step 3: Construct fop with desired output format
+             OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName));
diff --git a/debian/patches/series b/debian/patches/series
index 73011c6..e4a224b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,6 @@ disable-xcos-dep-check.diff
 jh.diff
 depend-scicos.diff
 missing-lib.diff
+xmlgraphics-commons-2.0.diff
+fop-2.0.diff
+batik-1.8.diff
diff --git a/debian/patches/xmlgraphics-commons-2.0.diff b/debian/patches/xmlgraphics-commons-2.0.diff
new file mode 100644
index 0000000..7fe99f5
--- /dev/null
+++ b/debian/patches/xmlgraphics-commons-2.0.diff
@@ -0,0 +1,88 @@
+Description: adapt to xmlgraphics-commons 2.0 API
+ New signature fo PSGraphics2D.processShape:
+ int PSGraphics2D.processShape(Shape s, boolean cached)
+Author: Gilles Filippini <pini at debian.org>
+Index: scilab-5.5.2/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
+===================================================================
+--- scilab-5.5.2.orig/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
++++ scilab-5.5.2/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
+@@ -857,7 +857,7 @@ public class Export {
+                     }
+ 
+                     @Override
+-                    public int processShape(Shape s) throws IOException {
++                    public int processShape(Shape s, boolean cached) throws IOException {
+                         if (s instanceof Ellipse2D.Double) {
+                             Ellipse2D.Double ell = (Ellipse2D.Double) s;
+                             if (ell.height == ell.width) {
+@@ -880,10 +880,10 @@ public class Export {
+                                     buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
+                                     it.next();
+                                 } else {
+-                                    return super.processShape(s);
++                                    return super.processShape(s, cached);
+                                 }
+                             } else {
+-                                return super.processShape(s);
++                                return super.processShape(s, cached);
+                             }
+ 
+                             for (; !it.isDone(); it.next()) {
+@@ -891,7 +891,7 @@ public class Export {
+                                 if (type == PathIterator.SEG_LINETO) {
+                                     buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
+                                 } else {
+-                                    return super.processShape(s);
++                                    return super.processShape(s, cached);
+                                 }
+                             }
+                             buffer.append("] DP");
+@@ -899,7 +899,7 @@ public class Export {
+                             return PathIterator.WIND_NON_ZERO;
+                         }
+ 
+-                        return super.processShape(s);
++                        return super.processShape(s, cached);
+                     }
+                 };
+                 g2d.setGraphicContext(new GraphicContext());
+@@ -1029,7 +1029,7 @@ public class Export {
+                     }
+ 
+                     @Override
+-                    public int processShape(Shape s) throws IOException {
++                    public int processShape(Shape s, boolean cached) throws IOException {
+                         if (s instanceof Ellipse2D.Double) {
+                             Ellipse2D.Double ell = (Ellipse2D.Double) s;
+                             if (ell.height == ell.width) {
+@@ -1052,10 +1052,10 @@ public class Export {
+                                     buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
+                                     it.next();
+                                 } else {
+-                                    return super.processShape(s);
++                                    return super.processShape(s, cached);
+                                 }
+                             } else {
+-                                return super.processShape(s);
++                                return super.processShape(s, cached);
+                             }
+ 
+                             for (; !it.isDone(); it.next()) {
+@@ -1063,7 +1063,7 @@ public class Export {
+                                 if (type == PathIterator.SEG_LINETO) {
+                                     buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
+                                 } else {
+-                                    return super.processShape(s);
++                                    return super.processShape(s, cached);
+                                 }
+                             }
+                             buffer.append("] DP");
+@@ -1071,7 +1071,7 @@ public class Export {
+                             return PathIterator.WIND_NON_ZERO;
+                         }
+ 
+-                        return super.processShape(s);
++                        return super.processShape(s, cached);
+                     }
+ 
+                 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/scilab.git



More information about the debian-science-commits mailing list