diff options
author | eolianoe | 2015-09-27 16:27:05 +0200 |
---|---|---|
committer | eolianoe | 2015-09-27 16:27:05 +0200 |
commit | 06ec7f8f59e35b44652df196d2fdcc3c917ca0dc (patch) | |
tree | 836d203a37c2cf4df6c2947231f49d96b6de77bb | |
parent | 7e13ac6098f0b3a846dbf32a0c5f7115aa2c4cf6 (diff) | |
download | aur-06ec7f8f59e35b44652df196d2fdcc3c917ca0dc.tar.gz |
Fix compilation against system library
Add patchs to compile with java-batik=1.8, fop=2.0 and
java-xmlgraphics-commons=2.0
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | scilab-5.5.2-batik-1.8.patch | 98 | ||||
-rw-r--r-- | scilab-5.5.2-fop-2.0.patch | 38 | ||||
-rw-r--r-- | scilab-5.5.2-xmlgraphics-common-2.0.patch | 91 |
5 files changed, 259 insertions, 12 deletions
@@ -1,10 +1,10 @@ # Generated by mksrcinfo v7 -# Fri Sep 18 07:50:26 UTC 2015 +# Sun Sep 27 14:18:56 UTC 2015 pkgbase = scilab pkgdesc = A scientific software package for numerical computations. pkgver = 5.5.2 - pkgrel = 5 - url = http://www.scilab.org + pkgrel = 6 + url = https://www.scilab.org install = scilab.install arch = i686 arch = x86_64 @@ -43,12 +43,18 @@ pkgbase = scilab depends = xalan-java depends = docbook-xsl depends = jogl2.2.4 - depends = java-batik1.7 - depends = java-xmlgraphics-commons=1.5 + depends = java-batik>=1.8 + depends = java-xmlgraphics-commons>=2.0 conflicts = scilab-git conflicts = scilab-bin - source = http://www.scilab.org/download/5.5.2/scilab-5.5.2-src.tar.gz + source = https://www.scilab.org/download/5.5.2/scilab-5.5.2-src.tar.gz + source = scilab-5.5.2-batik-1.8.patch + source = scilab-5.5.2-fop-2.0.patch + source = scilab-5.5.2-xmlgraphics-common-2.0.patch sha256sums = a734519de96d35b8f081768a5584086e46db089ab11c021744897b22ec4d0f5e + sha256sums = 4f243e32be0aa2755405e121e7a23a370276c98e00d1b016bd43df56a76782ca + sha256sums = a8e03352cdaa5955414945e3fc8f56a035793869934345eef301cc6124b7ec95 + sha256sums = 64de4a044fb7228cae7003e6f86f6f0958ea10049f2fb24a11a07b0087e4ef36 pkgname = scilab @@ -4,30 +4,44 @@ pkgname=scilab pkgver=5.5.2 -pkgrel=5 +pkgrel=6 pkgdesc='A scientific software package for numerical computations.' arch=('i686' 'x86_64') -url='http://www.scilab.org' +url='https://www.scilab.org' license=('BSD' 'custom:CeCILL') depends=('shared-mime-info' 'desktop-file-utils' 'gtk-update-icon-cache' 'suitesparse>=4.4.1' 'arpack' 'fftw' 'libmatio' 'tk' 'curl' 'java-runtime=7' - 'beanshell2' 'eclipse-ecj' 'java-flexdock>=1.2.4' 'fop-hyph' + 'beanshell2' 'eclipse-ecj' 'java-flexdock>=1.2.4' 'fop-hyph' 'java-freehep-vectorgraphics' 'jeuclid-core' 'jgraphx>=2.0.0.1' 'javahelp2' 'saxon-he' 'jlatexmath-fop>=1.0.3' 'jrosetta>=1.0.4' 'jgoodies-looks' 'java-qdox' 'scirenderer' 'java-skinlf' 'java-testng' 'xalan-java' 'docbook-xsl' 'jogl2.2.4' - 'java-batik1.7' 'java-xmlgraphics-commons=1.5') + 'java-batik>=1.8' 'java-xmlgraphics-commons>=2.0') makedepends=('java-environment=7' 'apache-ant' 'ocaml' 'gcc-fortran' ) conflicts=('scilab-git' 'scilab-bin') -source=("${url}/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz") -sha256sums=('a734519de96d35b8f081768a5584086e46db089ab11c021744897b22ec4d0f5e') +source=("${url}/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz" + 'scilab-5.5.2-batik-1.8.patch' + 'scilab-5.5.2-fop-2.0.patch' + 'scilab-5.5.2-xmlgraphics-common-2.0.patch') +sha256sums=('a734519de96d35b8f081768a5584086e46db089ab11c021744897b22ec4d0f5e' + '4f243e32be0aa2755405e121e7a23a370276c98e00d1b016bd43df56a76782ca' + 'a8e03352cdaa5955414945e3fc8f56a035793869934345eef301cc6124b7ec95' + '64de4a044fb7228cae7003e6f86f6f0958ea10049f2fb24a11a07b0087e4ef36') install=${pkgname}.install +prepare(){ + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p2 < "${srcdir}"/scilab-5.5.2-batik-1.8.patch + patch -p2 < "${srcdir}"/scilab-5.5.2-fop-2.0.patch + patch -p2 < "${srcdir}"/scilab-5.5.2-xmlgraphics-common-2.0.patch +} + build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/scilab-5.5.2-batik-1.8.patch b/scilab-5.5.2-batik-1.8.patch new file mode 100644 index 000000000000..aaf4da8845d4 --- /dev/null +++ b/scilab-5.5.2-batik-1.8.patch @@ -0,0 +1,98 @@ +From: Bryan Gardiner <bog@khumba.net> +Project-Bug-URL: https://bugzilla.scilab.org/show_bug.cgi?id=13813 +Gentoo-Bug-URL: https://github.com/gentoo-science/sci/pull/456 + +Updates Scilab to build against (and require) Batik >=1.8, fixing an API change +with SAXSVGDocumentFactory being moved. This is not tested beyond "yes Scilab +still links to Batik to export SVGs," as I'm not sure of a good test case, and +it's awaiting upstream review. + +--- a/scilab/configure ++++ b/scilab/configure +@@ -16600,8 +16600,8 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar batik used + fi + + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.7) of batik" >&5 +-$as_echo_n "checking minimal version (1.7) of batik... " >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.8) of batik" >&5 ++$as_echo_n "checking minimal version (1.8) of batik... " >&6; } + saved_ac_java_classpath=$ac_java_classpath + export ac_java_classpath="$BATIK:$ac_java_classpath" + if test "x" == "x"; then +@@ -16614,7 +16614,7 @@ import org.apache.batik.Version; + + public class conftest { + public static void main(String[] argv) { +- String minVersion="1.7"; ++ String minVersion="1.8"; + + System.out.println(Version.getVersion()); + if (compare(minVersion, Version.getVersion()) > 0) { +@@ -16663,7 +16663,7 @@ EOF + STDOUT=`cat conftest.java.output` + fi + echo "configure: CLASSPATH was $CLASSPATH" >&5 +- as_fn_error $? "Wrong version of batik. Expected at least 1.7. Found $STDOUT" "$LINENO" 5 ++ as_fn_error $? "Wrong version of batik. Expected at least 1.8. Found $STDOUT" "$LINENO" 5 + fi + fi + if test -f conftest.java.output; then +@@ -16673,7 +16673,7 @@ EOF + echo "configure: failed program was:" >&5 + cat conftest.java >&5 + echo "configure: CLASSPATH was $CLASSPATH" >&5 +- as_fn_error $? "Wrong version of batik. Expected at least 1.7. Found $STDOUT" "$LINENO" 5 ++ as_fn_error $? "Wrong version of batik. Expected at least 1.8. Found $STDOUT" "$LINENO" 5 + fi + + else +@@ -16686,7 +16686,7 @@ import org.apache.batik.Version; + + public class conftest { + public static void main(String[] argv) { +- String minVersion="1.7"; ++ String minVersion="1.8"; + + System.out.println(Version.getVersion()); + if (compare(minVersion, Version.getVersion()) != 0) { +@@ -16735,7 +16735,7 @@ EOF + STDOUT=`cat conftest.java.output` + fi + echo "configure: CLASSPATH was $CLASSPATH" >&5 +- as_fn_error $? "Wrong version of batik. Expected exact version 1.7. Found $STDOUT" "$LINENO" 5 ++ as_fn_error $? "Wrong version of batik. Expected exact version 1.8. Found $STDOUT" "$LINENO" 5 + fi + fi + if test -f conftest.java.output; then +@@ -16745,7 +16745,7 @@ EOF + echo "configure: failed program was:" >&5 + cat conftest.java >&5 + echo "configure: CLASSPATH was $CLASSPATH" >&5 +- as_fn_error $? "Wrong version of batik. Expected exact version 1.7. Found $STDOUT" "$LINENO" 5 ++ as_fn_error $? "Wrong version of batik. Expected exact version 1.8. Found $STDOUT" "$LINENO" 5 + fi + + fi +--- a/scilab/configure.ac ++++ b/scilab/configure.ac +@@ -1038,7 +1038,7 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version + BATIK=$PACKAGE_JAR_FILE + fi + AC_SUBST(BATIK) +- AC_JAVA_CHECK_VERSION_PACKAGE([batik],[import org.apache.batik.Version;],$BATIK,[1.7],[Version.getVersion()]) ++ AC_JAVA_CHECK_VERSION_PACKAGE([batik],[import org.apache.batik.Version;],$BATIK,[1.8],[Version.getVersion()]) + + # Commons I/O library + AC_JAVA_CHECK_PACKAGE([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library]) +--- a/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java ++++ b/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java +@@ -28,7 +28,7 @@ import org.apache.batik.bridge.DocumentLoader; + 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/scilab-5.5.2-fop-2.0.patch b/scilab-5.5.2-fop-2.0.patch new file mode 100644 index 000000000000..83c6f6ca4826 --- /dev/null +++ b/scilab-5.5.2-fop-2.0.patch @@ -0,0 +1,38 @@ +From: Bryan Gardiner <bog@khumba.net> +Project-Bug-URL: https://bugzilla.scilab.org/show_bug.cgi?id=14009 +Gentoo-Bug-URL: https://github.com/gentoo-science/sci/pull/456 + +Updates Scilab to build against FOP >=2.0. This is not tested, as I'm not sure +of a test case, and it's awaiting upstream review. + +--- a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java ++++ b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java +@@ -43,10 +43,10 @@ public class FopConverter extends ContainerConverter { + String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase(); + + try { +- FopFactory fopFactory = FopFactory.newInstance(); ++ FopFactory fopFactory = ++ FopFactory.newInstance(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml")); + 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/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java ++++ b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java +@@ -114,11 +114,11 @@ public class CodeExporter extends FOCodeConverter { + * @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); diff --git a/scilab-5.5.2-xmlgraphics-common-2.0.patch b/scilab-5.5.2-xmlgraphics-common-2.0.patch new file mode 100644 index 000000000000..c12df968fe93 --- /dev/null +++ b/scilab-5.5.2-xmlgraphics-common-2.0.patch @@ -0,0 +1,91 @@ +From: Bryan Gardiner <bog@khumba.net> +Project-Bug-URL: https://bugzilla.scilab.org/show_bug.cgi?id=13724 +Gentoo-Bug-URL: https://github.com/gentoo-science/sci/pull/456 + +Updates Scilab 5.5.2 to build against xmlgraphics-common >=2.0. This is not +tested, as I'm not sure of a test case, and a similar patch (where the +super.processShape calls are passed cached=true) is already awaiting upstream +review. + +--- a/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java ++++ b/scilab/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); + } + + }; |