commit: 92320771862c7de6de2b4cecd2477d0bc5aea0e8 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> AuthorDate: Fri Jan 1 16:39:00 2021 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Tue Jan 5 18:26:47 2021 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=92320771
sci-mathematics/scilab: inital attemps at fixing this - version bumped - EAPI bumped - added deps Do not add keywords yet, needs more fixing but at least it is less broken now Closes: https://github.com/gentoo/sci/pull/1026 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> .../scilab/files/scilab-5.5.2-batik-1.8.patch | 99 ---------------------- .../scilab-5.5.2-fix-random-runtime-failure.patch | 12 --- .../scilab/files/scilab-5.5.2-fop-2.0.patch | 38 --------- .../scilab-5.5.2-xmlgraphics-common-2.0.patch | 91 -------------------- ...on.patch => scilab-6.1.0-accessviolation.patch} | 11 +-- ...wlinks.patch => scilab-6.1.0-followlinks.patch} | 0 ....2-freehep.patch => scilab-6.1.0-freehep.patch} | 11 +-- ....2-gluegen.patch => scilab-6.1.0-gluegen.patch} | 0 ...ava-heap.patch => scilab-6.1.0-java-heap.patch} | 0 ...singlib.patch => scilab-6.1.0-missinglib.patch} | 0 ...-5.5.2-nogui.patch => scilab-6.1.0-nogui.patch} | 0 ...{scilab-5.5.2-r1.ebuild => scilab-6.1.0.ebuild} | 23 ++--- 12 files changed, 21 insertions(+), 264 deletions(-) diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-batik-1.8.patch b/sci-mathematics/scilab/files/scilab-5.5.2-batik-1.8.patch deleted file mode 100644 index 007d530ad..000000000 --- a/sci-mathematics/scilab/files/scilab-5.5.2-batik-1.8.patch +++ /dev/null @@ -1,99 +0,0 @@ -From: Bryan Gardiner <[email protected]> -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/configure -+++ b/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/configure.ac -+++ b/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/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java -+++ b/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/sci-mathematics/scilab/files/scilab-5.5.2-fix-random-runtime-failure.patch b/sci-mathematics/scilab/files/scilab-5.5.2-fix-random-runtime-failure.patch deleted file mode 100644 index da7b6e485..000000000 --- a/sci-mathematics/scilab/files/scilab-5.5.2-fix-random-runtime-failure.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN scilab-orig/modules/api_scilab/src/cpp/api_double.cpp scilab/modules/api_scilab/src/cpp/api_double.cpp ---- a/modules/api_scilab/src/cpp/api_double.cpp 2012-08-06 23:26:31.342617365 -0400 -+++ b/modules/api_scilab/src/cpp/api_double.cpp 2012-08-06 23:27:34.838621420 -0400 -@@ -497,7 +497,7 @@ - /*--------------------------------------------------------------------------*/ - int createScalarDouble(void* _pvCtx, int _iVar, double _dblReal) - { -- return createCommonScalarDouble(_pvCtx, _iVar, 0, _dblReal, NULL); -+ return createCommonScalarDouble(_pvCtx, _iVar, 0, _dblReal, 0); - } - /*--------------------------------------------------------------------------*/ - int createScalarComplexDouble(void* _pvCtx, int _iVar, double _dblReal, double _dblImg) diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-fop-2.0.patch b/sci-mathematics/scilab/files/scilab-5.5.2-fop-2.0.patch deleted file mode 100644 index 18bdaac1d..000000000 --- a/sci-mathematics/scilab/files/scilab-5.5.2-fop-2.0.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Bryan Gardiner <[email protected]> -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/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 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/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,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/sci-mathematics/scilab/files/scilab-5.5.2-xmlgraphics-common-2.0.patch b/sci-mathematics/scilab/files/scilab-5.5.2-xmlgraphics-common-2.0.patch deleted file mode 100644 index 4d90f30c7..000000000 --- a/sci-mathematics/scilab/files/scilab-5.5.2-xmlgraphics-common-2.0.patch +++ /dev/null @@ -1,91 +0,0 @@ -From: Bryan Gardiner <[email protected]> -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/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java -+++ b/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); - } - - }; diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch b/sci-mathematics/scilab/files/scilab-6.1.0-accessviolation.patch similarity index 70% rename from sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-accessviolation.patch index a7e5c6d5f..940440563 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch +++ b/sci-mathematics/scilab/files/scilab-6.1.0-accessviolation.patch @@ -1,14 +1,15 @@ -diff -urN scilab-5.5.0-orig/bin/scilab scilab-5.5.0/bin/scilab ---- a/bin/scilab 2014-07-12 15:24:17.105686656 -0400 -+++ b/bin/scilab 2014-07-12 15:25:29.307725409 -0400 -@@ -647,17 +647,6 @@ +diff --git a/bin/scilab b/bin/scilab +index 475457d6..d2b98cc0 100755 +--- a/bin/scilab ++++ b/bin/scilab +@@ -720,17 +720,6 @@ fi GTK_MODULES=$(echo $GTK_MODULES | sed s/gnomebreakpad//g) export GTK_MODULES -# libEGL may be partially supported by the closed-source NVIDIA driver. -# Until they release an EGL driver, we force the egl_glx driver. -# http://bugzilla.scilab.org/show_bug.cgi?id=12940 --if test -x /usr/bin/glxinfo; then +-if test $SCILAB_MODE != "nwni" -a -x /usr/bin/glxinfo; then - NVIDIA_GLX_VENDOR=$(/usr/bin/glxinfo |grep "NVIDIA Corporation") - if test ! -z "$NVIDIA_GLX_VENDOR"; then - EGL_DRIVER=egl_glx diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-followlinks.patch b/sci-mathematics/scilab/files/scilab-6.1.0-followlinks.patch similarity index 100% rename from sci-mathematics/scilab/files/scilab-5.5.2-followlinks.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-followlinks.patch diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch b/sci-mathematics/scilab/files/scilab-6.1.0-freehep.patch similarity index 50% rename from sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-freehep.patch index 46825cb29..6f9587780 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch +++ b/sci-mathematics/scilab/files/scilab-6.1.0-freehep.patch @@ -1,11 +1,12 @@ -diff -uNr scilab-5.5.2-orig/configure.ac scilab-5.5.2/configure.ac ---- a/configure.ac 2016-06-05 12:30:06.582735449 -0400 -+++ b/configure.ac 2016-06-05 12:31:29.706708157 -0400 -@@ -1024,7 +1024,7 @@ +diff --git a/configure.ac b/configure.ac +index f6018580..d783ca96 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1076,7 +1076,7 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version AC_SUBST(FREEHEP_IO) # Freehep Util -- AC_JAVA_CHECK_PACKAGE([freehep-util],[org.freehep.util.StringUtilities],[Freehep Util]) +- AC_JAVA_CHECK_JAR([freehep-util],[org.freehep.util.StringUtilities],[Freehep Util]) + AC_JAVA_CHECK_PACKAGE([freehep-graphicsbase],[org.freehep.graphicsbase.util.UserProperties],[Freehep Util]) FREEHEP_UTIL=$PACKAGE_JAR_FILE AC_SUBST(FREEHEP_UTIL) diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-gluegen.patch b/sci-mathematics/scilab/files/scilab-6.1.0-gluegen.patch similarity index 100% rename from sci-mathematics/scilab/files/scilab-5.5.2-gluegen.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-gluegen.patch diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-java-heap.patch b/sci-mathematics/scilab/files/scilab-6.1.0-java-heap.patch similarity index 100% rename from sci-mathematics/scilab/files/scilab-5.5.2-java-heap.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-java-heap.patch diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-missinglib.patch b/sci-mathematics/scilab/files/scilab-6.1.0-missinglib.patch similarity index 100% rename from sci-mathematics/scilab/files/scilab-5.5.2-missinglib.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-missinglib.patch diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-nogui.patch b/sci-mathematics/scilab/files/scilab-6.1.0-nogui.patch similarity index 100% rename from sci-mathematics/scilab/files/scilab-5.5.2-nogui.patch rename to sci-mathematics/scilab/files/scilab-6.1.0-nogui.patch diff --git a/sci-mathematics/scilab/scilab-5.5.2-r1.ebuild b/sci-mathematics/scilab/scilab-6.1.0.ebuild similarity index 93% rename from sci-mathematics/scilab/scilab-5.5.2-r1.ebuild rename to sci-mathematics/scilab/scilab-6.1.0.ebuild index 4bbbde779..190b3f105 100644 --- a/sci-mathematics/scilab/scilab-5.5.2-r1.ebuild +++ b/sci-mathematics/scilab/scilab-6.1.0.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 JAVA_PKG_OPT_USE="gui" VIRTUALX_REQUIRED="manual" @@ -13,9 +13,10 @@ DESCRIPTION="Scientific software package for numerical computations" HOMEPAGE="http://www.scilab.org/" SRC_URI="http://www.scilab.org/download/${PV}/${P}-src.tar.gz" -LICENSE="CeCILL-2.1" +LICENSE="GPL-2" SLOT="0" KEYWORDS="" + IUSE="bash-completion debug doc emf fftw +gui +matio mpi nls openmp static-libs test tk +umfpack +xcos" REQUIRED_USE="xcos? ( gui ) doc? ( gui )" @@ -63,7 +64,7 @@ CDEPEND=" fftw? ( sci-libs/fftw:3.0 ) gui? ( dev-java/avalon-framework:4.2 - >=dev-java/batik-1.8-r2:1.8 + >=dev-java/batik-1.8:= dev-java/commons-io:1 dev-java/commons-logging:0 >=dev-java/flexdock-1.2.4:0 @@ -76,10 +77,11 @@ CDEPEND=" >=dev-java/jlatexmath-fop-1.0.3:1 ~dev-java/jogl-2.2.4:2.2 >=dev-java/jrosetta-1.0.4:0 + >dev-java/lucene-2:=[contrib] dev-java/skinlf:0 dev-java/xmlgraphics-commons:2 virtual/opengl - xcos? ( dev-java/jgraphx:2.5 ) + xcos? ( dev-java/jgraphx:= ) ) matio? ( >=sci-libs/matio-1.5 ) tk? ( dev-lang/tk:0= ) @@ -100,6 +102,7 @@ DEPEND="${CDEPEND} ) test? ( dev-java/junit:4 + dev-java/ant-junit4:0 gui? ( ${VIRTUALX_DEPEND} ) )" DOCS=( "ACKNOWLEDGEMENTS" "README_Unix" "Readme_Visual.txt" ) @@ -107,12 +110,8 @@ DOCS=( "ACKNOWLEDGEMENTS" "README_Unix" "Readme_Visual.txt" ) PATCHES=( "${FILESDIR}/${P}-followlinks.patch" "${FILESDIR}/${P}-gluegen.patch" - "${FILESDIR}/${P}-fix-random-runtime-failure.patch" "${FILESDIR}/${P}-accessviolation.patch" "${FILESDIR}/${P}-missinglib.patch" - "${FILESDIR}/${P}-batik-1.8.patch" - "${FILESDIR}/${P}-fop-2.0.patch" - "${FILESDIR}/${P}-xmlgraphics-common-2.0.patch" "${FILESDIR}/${P}-freehep.patch" ) @@ -148,10 +147,6 @@ pkg_setup() { src_prepare() { default - # works for me on x86, but users are having - # trouble without see #282 on github - append-ldflags $(no-as-needed) - # increases java heap to 512M when building docs (sync with cheqreqs above) use doc && eapply "${FILESDIR}/${P}-java-heap.patch" @@ -190,7 +185,7 @@ src_prepare() { java-pkg_jar-from fop fop.jar java-pkg_jar-from javahelp jhall.jar java-pkg_jar-from jlatexmath-fop-1 - use xcos && java-pkg_jar-from jgraphx-2.5 + use xcos && java-pkg_jar-from jgraphx if use doc; then java-pkg_jar-from --build-only batik-1.8 batik-all.jar java-pkg_jar-from --build-only saxon-9 saxon.jar saxon9he.jar
