File scilab-build-with-fop-2_1.patch of Package scilab

--- a/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
+++ b/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
@@ -43,10 +43,10 @@ public class FopConverter extends Contai
         String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase();
 
         try {
-            FopFactory fopFactory = FopFactory.newInstance();
+            final File configuration = new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml");
+            FopFactory fopFactory = FopFactory.newInstance(configuration);
             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));
--- a/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
+++ b/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
@@ -114,11 +114,10 @@ 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"));
+            FopFactory fopFactory = FopFactory.newInstance(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml"));
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
             userAgent.setProducer(CREATOR);
             userAgent.setTitle(title);

openSUSE Build Service is sponsored by