Bug#800632: scilab: diff for NMU version 5.5.2-1.1

Sylvestre Ledru sylvestre at debian.org
Sat Oct 3 11:28:23 UTC 2015


No, go ahead, no need to wait :)

Calixte, Clément, you should probably bump the dep and apply this patch.

Thanks,
S


Le 03/10/2015 12:45, Gilles Filippini a écrit :
> Control: tags 800632 + patch
> Control: tags 800632 + pending
>
> Dear maintainer,
>
> I've prepared an NMU for scilab (versioned as 5.5.2-1.1) and
> uploaded it to DELAYED/2. Please feel free to tell me if I
> should delay it longer.
>
> Regards,
>
> _g.
>
> diff -Nru scilab-5.5.2/debian/changelog scilab-5.5.2/debian/changelog
> --- scilab-5.5.2/debian/changelog	2015-04-27 18:30:06.000000000 +0200
> +++ scilab-5.5.2/debian/changelog	2015-10-03 10:06:56.000000000 +0200
> @@ -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 -Nru scilab-5.5.2/debian/patches/batik-1.8.diff scilab-5.5.2/debian/patches/batik-1.8.diff
> --- scilab-5.5.2/debian/patches/batik-1.8.diff	1970-01-01 01:00:00.000000000 +0100
> +++ scilab-5.5.2/debian/patches/batik-1.8.diff	2015-10-03 09:45:21.000000000 +0200
> @@ -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 -Nru scilab-5.5.2/debian/patches/fop-2.0.diff scilab-5.5.2/debian/patches/fop-2.0.diff
> --- scilab-5.5.2/debian/patches/fop-2.0.diff	1970-01-01 01:00:00.000000000 +0100
> +++ scilab-5.5.2/debian/patches/fop-2.0.diff	2015-10-03 12:22:59.000000000 +0200
> @@ -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 -Nru scilab-5.5.2/debian/patches/series scilab-5.5.2/debian/patches/series
> --- scilab-5.5.2/debian/patches/series	2015-04-27 18:27:33.000000000 +0200
> +++ scilab-5.5.2/debian/patches/series	2015-10-03 09:37:02.000000000 +0200
> @@ -5,3 +5,6 @@
>  jh.diff
>  depend-scicos.diff
>  missing-lib.diff
> +xmlgraphics-commons-2.0.diff
> +fop-2.0.diff
> +batik-1.8.diff
> diff -Nru scilab-5.5.2/debian/patches/xmlgraphics-commons-2.0.diff scilab-5.5.2/debian/patches/xmlgraphics-commons-2.0.diff
> --- scilab-5.5.2/debian/patches/xmlgraphics-commons-2.0.diff	1970-01-01 01:00:00.000000000 +0100
> +++ scilab-5.5.2/debian/patches/xmlgraphics-commons-2.0.diff	2015-10-03 09:43:34.000000000 +0200
> @@ -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);
> +                     }
> + 
> +                 };
>



More information about the debian-science-maintainers mailing list