commit: 5acf363c71b1e17cc90caf09abb5a2697c406682 Author: Justin Lecher <jlec <AT> gentoo <DOT> org> AuthorDate: Sat Jan 27 20:25:36 2018 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Sat Jan 27 20:25:36 2018 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5acf363c
sci-mathematics/scilab: Update to new localization handling Bump to EAPI=6 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> Package-Manager: Portage-2.3.20, Repoman-2.3.6 .../files/scilab-5.5.2-accessviolation.patch | 4 +- .../scilab/files/scilab-5.5.2-batik-1.8.patch | 13 ++-- .../scilab-5.5.2-fix-random-runtime-failure.patch | 4 +- .../scilab/files/scilab-5.5.2-followlinks.patch | 4 +- .../scilab/files/scilab-5.5.2-fop-2.0.patch | 8 +-- .../scilab/files/scilab-5.5.2-freehep.patch | 4 +- .../scilab/files/scilab-5.5.2-gluegen.patch | 4 +- .../scilab/files/scilab-5.5.2-java-heap.patch | 4 +- .../scilab/files/scilab-5.5.2-missinglib.patch | 4 +- .../scilab/files/scilab-5.5.2-nogui.patch | 4 +- .../scilab-5.5.2-xmlgraphics-common-2.0.patch | 4 +- sci-mathematics/scilab/scilab-5.5.2-r1.ebuild | 80 +++++++++++++--------- 12 files changed, 78 insertions(+), 59 deletions(-) diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch b/sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch index a84de9a2b..a7e5c6d5f 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-accessviolation.patch @@ -1,6 +1,6 @@ diff -urN scilab-5.5.0-orig/bin/scilab scilab-5.5.0/bin/scilab ---- scilab-5.5.0-orig/bin/scilab 2014-07-12 15:24:17.105686656 -0400 -+++ scilab-5.5.0/bin/scilab 2014-07-12 15:25:29.307725409 -0400 +--- 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 @@ GTK_MODULES=$(echo $GTK_MODULES | sed s/gnomebreakpad//g) export GTK_MODULES 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 index aaf4da884..007d530ad 100644 --- 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 @@ -7,8 +7,8 @@ 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 +--- 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 @@ -74,8 +74,8 @@ it's awaiting upstream review. fi fi ---- a/scilab/configure.ac -+++ b/scilab/configure.ac +--- 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 @@ -85,8 +85,8 @@ it's awaiting upstream review. # 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 +--- 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; @@ -96,3 +96,4 @@ it's awaiting upstream review. 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 index 92ac45339..da7b6e485 100644 --- 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 @@ -1,6 +1,6 @@ diff -urN scilab-orig/modules/api_scilab/src/cpp/api_double.cpp scilab/modules/api_scilab/src/cpp/api_double.cpp ---- scilab-orig/modules/api_scilab/src/cpp/api_double.cpp 2012-08-06 23:26:31.342617365 -0400 -+++ scilab/modules/api_scilab/src/cpp/api_double.cpp 2012-08-06 23:27:34.838621420 -0400 +--- 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) diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-followlinks.patch b/sci-mathematics/scilab/files/scilab-5.5.2-followlinks.patch index fd6aa7bae..a3f60bee7 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-followlinks.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-followlinks.patch @@ -1,5 +1,5 @@ ---- m4/java.m4.orig 2014-02-11 23:43:03.030430258 -0500 -+++ m4/java.m4 2014-02-11 23:43:54.008428766 -0500 +--- a/m4/java.m4 2014-02-11 23:43:03.030430258 -0500 ++++ b/m4/java.m4 2014-02-11 23:43:54.008428766 -0500 @@ -839,7 +839,7 @@ for jar in "$jardir/$1.jar" "$jardir/lib$1.jar" "$jardir/lib$1-java.jar" "$jardir/$1*.jar"; do 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 index 83c6f6ca4..18bdaac1d 100644 --- 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 @@ -5,8 +5,8 @@ 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 +--- 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(); @@ -20,8 +20,8 @@ of a test case, and it's awaiting upstream review. // 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 +--- 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 */ diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch b/sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch index 3595902e7..46825cb29 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-freehep.patch @@ -1,6 +1,6 @@ diff -uNr scilab-5.5.2-orig/configure.ac scilab-5.5.2/configure.ac ---- scilab-5.5.2-orig/configure.ac 2016-06-05 12:30:06.582735449 -0400 -+++ scilab-5.5.2/configure.ac 2016-06-05 12:31:29.706708157 -0400 +--- 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 @@ AC_SUBST(FREEHEP_IO) diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-gluegen.patch b/sci-mathematics/scilab/files/scilab-5.5.2-gluegen.patch index 151443926..d75c31e9a 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-gluegen.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-gluegen.patch @@ -1,5 +1,5 @@ ---- scilab/modules/gui/src/java/org/scilab/modules/gui/SwingView.java.orig 2014-03-24 22:38:00.928934500 -0400 -+++ scilab/modules/gui/src/java/org/scilab/modules/gui/SwingView.java 2014-03-24 22:37:33.947567043 -0400 +--- a/modules/gui/src/java/org/scilab/modules/gui/SwingView.java 2014-03-24 22:38:00.928934500 -0400 ++++ b/modules/gui/src/java/org/scilab/modules/gui/SwingView.java 2014-03-24 22:37:33.947567043 -0400 @@ -157,7 +157,7 @@ static { diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-java-heap.patch b/sci-mathematics/scilab/files/scilab-5.5.2-java-heap.patch index 31060d75a..ca17e52a6 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-java-heap.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-java-heap.patch @@ -1,5 +1,5 @@ ---- etc/jvm_options.xml.orig 2014-02-12 00:05:34.323390688 -0500 -+++ etc/jvm_options.xml 2014-02-12 00:05:53.977390112 -0500 +--- a/etc/jvm_options.xml 2014-02-12 00:05:34.323390688 -0500 ++++ b/etc/jvm_options.xml 2014-02-12 00:05:53.977390112 -0500 @@ -22,7 +22,7 @@ <!-- ENABLE Just In Time java compiler --> <option value="-Djava.compiler=JIT"/> diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-missinglib.patch b/sci-mathematics/scilab/files/scilab-5.5.2-missinglib.patch index 7f88068c5..25b281820 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-missinglib.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-missinglib.patch @@ -1,6 +1,6 @@ diff -urN scilab-5.5.1-orig/Makefile.am scilab-5.5.1/Makefile.am ---- scilab-5.5.1-orig/Makefile.am 2014-10-09 18:22:21.994610695 -0400 -+++ scilab-5.5.1/Makefile.am 2014-10-09 18:24:28.208333575 -0400 +--- a/Makefile.am 2014-10-09 18:22:21.994610695 -0400 ++++ b/Makefile.am 2014-10-09 18:24:28.208333575 -0400 @@ -74,6 +74,7 @@ if NEED_JAVA scilab_bin_LDADD += \ diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-nogui.patch b/sci-mathematics/scilab/files/scilab-5.5.2-nogui.patch index 60cee5a45..f83fa31d0 100644 --- a/sci-mathematics/scilab/files/scilab-5.5.2-nogui.patch +++ b/sci-mathematics/scilab/files/scilab-5.5.2-nogui.patch @@ -1,5 +1,5 @@ ---- Makefile.in.orig 2014-01-09 22:29:06.534469383 -0500 -+++ Makefile.in 2014-01-09 22:29:40.368471544 -0500 +--- a/Makefile.in 2014-01-09 22:29:06.534469383 -0500 ++++ b/Makefile.in 2014-01-09 22:29:40.368471544 -0500 @@ -2247,8 +2247,8 @@ @BUILD_HELP_TRUE@ done; \ @BUILD_HELP_TRUE@ fi 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 index c12df968f..4d90f30c7 100644 --- 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 @@ -7,8 +7,8 @@ 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 +--- 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 { } diff --git a/sci-mathematics/scilab/scilab-5.5.2-r1.ebuild b/sci-mathematics/scilab/scilab-5.5.2-r1.ebuild index c9f67ad06..c655c1324 100644 --- a/sci-mathematics/scilab/scilab-5.5.2-r1.ebuild +++ b/sci-mathematics/scilab/scilab-5.5.2-r1.ebuild @@ -1,15 +1,13 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 - -RESTRICT="test" +EAPI=6 JAVA_PKG_OPT_USE="gui" VIRTUALX_REQUIRED="manual" -inherit eutils autotools bash-completion-r1 check-reqs fdo-mime flag-o-matic \ - fortran-2 java-pkg-opt-2 pax-utils toolchain-funcs virtualx +inherit autotools bash-completion-r1 check-reqs eutils flag-o-matic \ + fortran-2 java-pkg-opt-2 pax-utils toolchain-funcs virtualx xdg-utils DESCRIPTION="Scientific software package for numerical computations" HOMEPAGE="http://www.scilab.org/" @@ -22,12 +20,29 @@ IUSE="bash-completion debug doc emf fftw +gui +matio mpi nls openmp static-libs test tk +umfpack +xcos" REQUIRED_USE="xcos? ( gui ) doc? ( gui )" -LINGUAS="fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ" -LINGUAS_DOC="fr_FR pt_BR ja_JP ru_RU" +RESTRICT="test" -for l in ${LINGUAS}; do - IUSE="${IUSE} linguas_${l}" +IUSE_L10N="fr zh zh ru ca de es pt ja it uk pl cs" +L10N_DOC="fr pt ja ru" + +map_lang() { + local lang=${1/_/-} + case $1 in + # Retain the following, which have a specific subtag + de_*|en_*|pt_*|zh_*) ;; + # Consider all other xx_XX as duplicates of the generic xx tag + *_*) lang=${1%%_*} ;; + esac + echo ${lang} +} + +prev_l= +for l in ${IUSE_L10N}; do + l=$(map_lang ${l}) + [[ ${l} != "${prev_l}" ]] && IUSE+=" l10n_${l}" + prev_l=${l} done +unset l prev_l CDEPEND=" dev-libs/libpcre @@ -89,6 +104,18 @@ DEPEND="${CDEPEND} 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" +) + pkg_pretend() { use doc && CHECKREQS_MEMORY="512M" check-reqs_pkg_pretend } @@ -107,37 +134,28 @@ pkg_setup() { unset F77 java-pkg-opt-2_pkg_setup - ALL_LINGUAS="en_US" - ALL_LINGUAS_DOC="en_US" - for l in ${LINGUAS}; do - use linguas_${l} && ALL_LINGUAS="${ALL_LINGUAS} ${l}" + ALL_L10N="en_US" + ALL_L10N_DOC="en_US" + for l in ${IUSE_L10N}; do + use l10n_${l} && ALL_L10N="${ALL_L10N} ${l}" done - for l in ${LINGUAS_DOC}; do - use linguas_${l} && ALL_LINGUAS_DOC="${ALL_LINGUAS_DOC} ${l}" + for l in ${L10N_DOC}; do + use l10n_${l} && ALL_L10N_DOC="${ALL_L10N_DOC} ${l}" done - export ALL_LINGUAS ALL_LINGUAS_DOC + export ALL_L10N ALL_L10N_DOC } src_prepare() { - epatch \ - "${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" + 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 && epatch "${FILESDIR}/${P}-java-heap.patch" + use doc && eapply "${FILESDIR}/${P}-java-heap.patch" - # use the LINGUAS variable that we set + # use the L10N variable that we set sed -i -e "/^ALL_LINGUAS=/d" -e "/^ALL_LINGUAS_DOC=/d" -i configure.ac ||die # make sure the DOCBOOK_ROOT variable is set @@ -260,7 +278,7 @@ src_install() { } pkg_postinst() { - fdo-mime_mime_database_update + xdg_mimeinfo_database_update einfo "If you are using the NVIDIA binary drivers, and run into graphics" einfo "crashes, you may try to run scilab as follows:" einfo "EGL_DRIVER=egl_glx scilab" @@ -268,5 +286,5 @@ pkg_postinst() { } pkg_postrm() { - fdo-mime_mime_database_update + xdg_mimeinfo_database_update }