aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2013-10-25 09:02:25 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2013-10-28 00:17:27 -0400
commit4ebeb746bd66d1e4a85d8e8d9304a8542a4a1dd0 (patch)
tree01adc52e0231627ad3009c97f811801c0c2861a2 /sci-mathematics/scilab
parentdev-java/jogl version bump (diff)
downloadsci-4ebeb746bd66d1e4a85d8e8d9304a8542a4a1dd0.tar.gz
sci-4ebeb746bd66d1e4a85d8e8d9304a8542a4a1dd0.tar.bz2
sci-4ebeb746bd66d1e4a85d8e8d9304a8542a4a1dd0.zip
sci-mathematics/scilab new release
Diffstat (limited to 'sci-mathematics/scilab')
-rw-r--r--sci-mathematics/scilab/Manifest1
-rw-r--r--sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch33
-rw-r--r--sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch12
-rw-r--r--sci-mathematics/scilab/files/scilab-5.5.0-followlinks.patch12
-rw-r--r--sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch12
-rw-r--r--sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch13
-rw-r--r--sci-mathematics/scilab/scilab-5.5.0.ebuild249
7 files changed, 332 insertions, 0 deletions
diff --git a/sci-mathematics/scilab/Manifest b/sci-mathematics/scilab/Manifest
index 95f51be8a..8c62252ba 100644
--- a/sci-mathematics/scilab/Manifest
+++ b/sci-mathematics/scilab/Manifest
@@ -1,2 +1,3 @@
DIST scilab-5.3.3-src.tar.gz 47253497 SHA256 e6edd7d241f2a09bd2dadaaafff5c152509db240220933b87305875302401335 SHA512 334ff05239efa2c9c378a86521a979aa5578f5a79324dc4f16805a995c673d5bd9656567de127939bf30409e2ba6f5904b75508046adfcfa4a5d6390f53d8ffa WHIRLPOOL 635666dbc52280fd797f01402c42429acd3e55c1bcdd9a2af584e349838e1bb935cef97f0f9f061d7b1c44f6078a0d84fb44f2c4cb17fcf9d3ba59e79c45493e
DIST scilab-5.4.1-src.tar.gz 66112086 SHA256 f63db4de7daeb68409644b2c32888af4f0bb0ca7ede9c3857f4ccb6289ea861c SHA512 819d433f52ebce8d6cbd71d46b7313963d5c7d2de7b946ac1d0b05e2863e168bee8453dc2974f33e09c34c0130c831f17358b38ecb7387dc7c38a64b6da96978 WHIRLPOOL 1f9ad2caa8426659eedb3e17f7cc02e309e4d610393aef74d9c14c68bf8ec7c0a6398d38dabb7d7eecb9db04f6b824eddc48cf5fbdc6fbd92c9b14cba95ad801
+DIST scilab-5.5.0-beta-1-src.tar.gz 68636818 SHA256 71b4b5c8b6fba1af1f66702ca68fb8a17c9d36134cee84fcab8d92d16a85d934 SHA512 bd71d6390fc455a6e797578d356a1179449d2a217d86a29ef7f3da1e709dd02f61b90092638a1873fe6f80647f2a883e6af549946e602e628bb930c443139714 WHIRLPOOL 00b6b0eb23a8040563a1730633ab632cef5724dfe95cc8c3deb14bb541b1365689d1bd221246e79de1bd0404a38d50aee18837b2b3678800e64a5fd4dfd2ab87
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch b/sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch
new file mode 100644
index 000000000..309e45c06
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-always-use-dynamic-stack.patch
@@ -0,0 +1,33 @@
+See https://bugzilla.redhat.com/show_bug.cgi?id=964307
+and http://bugzilla.scilab.org/show_bug.cgi?id=12625
+--- configure.ac.orig 2013-10-24 23:55:14.530698970 -0400
++++ configure.ac 2013-10-25 00:03:25.597684590 -0400
+@@ -698,15 +698,10 @@
+ SCILIBS_CXXFLAGS=''
+ SCILIBS_FFLAGS=''
+
+-if test $IS_64_BITS_CPU = true -o "$MACOSX" = "1"; then
+- if test $f90compatible = false; then
+- AC_MSG_ERROR([64 bits support needs a fortran 90 compiler (try --with-gfortran).])
+- fi
+ AC_DEFINE([USE_DYNAMIC_STACK], [], [If we are building a 64 bits version])
+-fi
+
+ AM_CONDITIONAL(IS_64_BITS_CPU, test $IS_64_BITS_CPU = true)
+-AM_CONDITIONAL(USE_DYNAMIC_STACK, test $IS_64_BITS_CPU = true -o "$MACOSX" = "1")
++AM_CONDITIONAL(USE_DYNAMIC_STACK, true)
+
+ ################
+ ## SSE
+@@ -1958,11 +1953,7 @@
+ AC_CONFIG_COMMANDS_POST([chmod +x $SCI_SRCDIR_FULL/modules/scicos_blocks/src/scripts/GenBlocks.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/scicompile.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/compilerDetection.sh $SCI_SRCDIR_FULL/modules/dynamic_link/src/scripts/configure])
+
+ # Generate stack.h
+-if test "$IS_64_BITS_CPU" = true -o "$MACOSX" = "1"; then
+ stack_h_cpp_flags=-DUSE_DYNAMIC_STACK
+-else
+- stack_h_cpp_flags=
+-fi
+
+ AC_CONFIG_COMMANDS([modules/core/includes/stack.h],
+ [if ! $CPP $stack_h_cpp_flags - < $srcdir/modules/core/includes/stack.h.in |\
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch b/sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch
new file mode 100644
index 000000000..92ac45339
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-fix-random-runtime-failure.patch
@@ -0,0 +1,12 @@
+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
+@@ -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.0-followlinks.patch b/sci-mathematics/scilab/files/scilab-5.5.0-followlinks.patch
new file mode 100644
index 000000000..118df3b1a
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-followlinks.patch
@@ -0,0 +1,12 @@
+diff -urN scilab-orig/m4/java.m4 scilab/m4/java.m4
+--- scilab-orig/m4/java.m4 2012-07-07 18:39:39.036716695 -0400
++++ scilab/m4/java.m4 2012-07-07 18:40:54.479721514 -0400
+@@ -846,7 +846,7 @@
+ for jar in "$jardir/$1.jar" "$jardir/lib$1.jar" "$jardir/lib$1-java.jar" "$jardir/$1*.jar"; do
+
+ # TODO check the behaviour when spaces
+- jars_resolved=`ls $jar 2>/dev/null`
++ jars_resolved=$(realpath $(ls $jar 2>/dev/null) 2>/dev/null)
+ for jar_resolved in $jars_resolved; do # If several jars matches
+ if test -e "$jar_resolved"; then
+ export ac_java_classpath="$jar_resolved:$ac_java_classpath"
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch b/sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch
new file mode 100644
index 000000000..64717a75a
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-gluegen.patch
@@ -0,0 +1,12 @@
+diff -urN scilab-orig/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java
+--- scilab-orig/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java 2012-07-09 23:14:03.261245376 -0400
++++ scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/canvas/SwingScilabCanvas.java 2012-07-09 23:17:38.226239081 -0400
+@@ -73,7 +73,7 @@
+
+ static {
+ try {
+- System.loadLibrary("gluegen2-rt");
++ System.loadLibrary("gluegen-rt");
+ } catch (Exception e) {
+ System.err.println(e);
+ }
diff --git a/sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch b/sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch
new file mode 100644
index 000000000..990f967f4
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.5.0-java-heap.patch
@@ -0,0 +1,13 @@
+--- etc/jvm_options.xml.orig 2013-07-08 22:46:24.092981137 -0400
++++ etc/jvm_options.xml 2013-07-08 22:50:23.788974118 -0400
+@@ -21,8 +21,8 @@
+ <option value="-Djava.util.logging.config.file=$SCILAB/etc/logging.properties"/>
+ <!-- ENABLE Just In Time java compiler -->
+ <option value="-Djava.compiler=JIT"/>
+- <!-- Set Java Heap space to 256mb -->
+- <option value="-Xmx256m"/>
++ <!-- Set Java Heap space to 512mb -->
++ <option value="-Xmx512m"/>
+
+ <!-- Set Java space for direct buffer allocation -->
+ <!--
diff --git a/sci-mathematics/scilab/scilab-5.5.0.ebuild b/sci-mathematics/scilab/scilab-5.5.0.ebuild
new file mode 100644
index 000000000..7e6926185
--- /dev/null
+++ b/sci-mathematics/scilab/scilab-5.5.0.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+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 toolchain-funcs virtualx
+
+MY_PV="${PV}"-beta-1
+MY_P="$PN"-"$MY_PV"
+
+# Things that don't work:
+# - tests
+# - can't build without docs (-doc)
+
+DESCRIPTION="Scientific software package for numerical computations"
+HOMEPAGE="http://www.scilab.org/"
+SRC_URI="http://www.scilab.org/download/${MY_PV}/${MY_P}-src.tar.gz"
+
+LICENSE="CeCILL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion debug +doc fftw +gui +matio nls openmp
+ static-libs test tk +umfpack +xcos"
+REQUIRED_USE="xcos? ( gui ) doc? ( gui )"
+
+# ALL_LINGUAS variable defined in configure.ac
+LINGUAS="fr_FR zh_CN zh_TW ca_ES es_ES pt_BR"
+for l in ${LINGUAS}; do
+ IUSE="${IUSE} linguas_${l}"
+done
+LINGUASLONG="de_DE ja_JP it_IT uk_UA pl_PL ru_RU"
+for l in ${LINGUASLONG}; do
+ IUSE="${IUSE} linguas_${l%_*}"
+done
+
+CDEPEND="dev-libs/libpcre
+ dev-libs/libxml2:2
+ sci-libs/hdf5
+ >=sci-libs/arpack-3
+ sys-devel/gettext
+ sys-libs/ncurses
+ sys-libs/readline
+ virtual/lapack
+ fftw? ( sci-libs/fftw:3.0 )
+ gui? (
+ dev-java/avalon-framework:4.2
+ dev-java/batik:1.7
+ dev-java/commons-io:1
+ >=dev-java/flexdock-1.2.3:0
+ dev-java/fop:0
+ dev-java/gluegen:2
+ dev-java/javahelp:0
+ dev-java/jeuclid-core:0
+ dev-java/jgoodies-looks:2.0
+ dev-java/jgraphx:2.1
+ dev-java/jlatexmath:1
+ dev-java/jogl:2
+ >=dev-java/jrosetta-1.0.4:0
+ dev-java/skinlf:0
+ dev-java/xmlgraphics-commons:1.5
+ virtual/opengl
+ doc? ( dev-java/saxon:9 )
+ xcos? ( dev-java/commons-logging:0 ) )
+ matio? ( <sci-libs/matio-1.5 )
+ tk? ( dev-lang/tk )
+ umfpack? ( sci-libs/umfpack )"
+
+RDEPEND="${CDEPEND}
+ gui? ( >=virtual/jre-1.5 )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ debug? ( dev-util/lcov )
+ gui? (
+ >=virtual/jdk-1.5
+ doc? ( app-text/docbook-xsl-stylesheets
+ dev-java/xml-commons-external:1.4
+ dev-java/jlatexmath-fop:1 )
+ xcos? ( dev-lang/ocaml ) )
+ test? (
+ dev-java/junit:4
+ gui? ( ${VIRTUALX_DEPEND} ) )"
+
+DOCS=( "ACKNOWLEDGEMENTS" "README_Unix" "Readme_Visual.txt" )
+
+S="${WORKDIR}"/"${MY_P}"
+
+pkg_pretend() {
+ use doc && CHECKREQS_MEMORY="512M" check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC) == *gcc* ]] && ! tc-has-openmp; then
+ ewarn "You are using a gcc without OpenMP capabilities"
+ die "Need an OpenMP capable compiler"
+ fi
+ FORTRAN_NEED_OPENMP=1
+ fi
+ FORTRAN_STANDARD="77 90"
+ fortran-2_pkg_setup
+ java-pkg-opt-2_pkg_setup
+
+ ALL_LINGUAS="en_US"
+ for l in ${LINGUAS}; do
+ use linguas_${l} && ALL_LINGUAS="${ALL_LINGUAS} ${l}"
+ done
+ for l in ${LINGUASLONG}; do
+ use linguas_${l%_*} && ALL_LINGUAS="${ALL_LINGUAS} ${l}"
+ done
+ export ALL_LINGUAS ALL_LINGUAS_DOC=$ALL_LINGUAS
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-followlinks.patch" \
+ "${FILESDIR}/${P}-gluegen.patch" \
+ "${FILESDIR}/${P}-fix-random-runtime-failure.patch" \
+ "${FILESDIR}/${P}-always-use-dynamic-stack.patch"
+
+ 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 the LINGUAS 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
+ sed -i -e "s/xsl-stylesheets-\*/xsl-stylesheets/g" bin/scilab* || die
+
+ #add specific gentoo java directories
+ if use gui; then
+ sed -i -e "s|/usr/lib/jogl2|/usr/lib/jogl-2|" \
+ -e "s|/usr/lib64/jogl2|/usr/lib64/jogl-2|" configure.ac || die
+ sed -i -e "s|/usr/lib/gluegen2|/usr/lib/gluegen-2|" \
+ -e "s|/usr/lib64/gluegen2|/usr/lib64/gluegen-2|" \
+ -e "s|AC_CHECK_LIB(\[gluegen2-rt|AC_CHECK_LIB([gluegen-rt|" \
+ configure.ac || die
+
+ sed -i -e "s/jogl2/jogl-2/" -e "s/gluegen2/gluegen-2/" \
+ etc/librarypath.xml || die
+ fi
+
+ mkdir jar || die
+ pushd jar
+ java-pkg_jar-from jgraphx-2.1,jlatexmath-1,flexdock,skinlf
+ java-pkg_jar-from jgoodies-looks-2.0,jrosetta,scirenderer-1
+ java-pkg_jar-from avalon-framework-4.2,jeuclid-core
+ java-pkg_jar-from xmlgraphics-commons-1.5,commons-io-1
+ java-pkg_jar-from jogl-2 jogl-all.jar jogl2.jar
+ java-pkg_jar-from gluegen-2 gluegen-rt.jar gluegen2-rt.jar
+ java-pkg_jar-from batik-1.7 batik-all.jar
+ java-pkg_jar-from fop fop.jar
+ java-pkg_jar-from javahelp jhall.jar
+ if use xcos; then
+ java-pkg_jar-from commons-logging
+ fi
+ if use doc; then
+ java-pkg_jar-from saxon-9 saxon.jar saxon9he.jar
+ java-pkg_jar-from jlatexmath-fop-1
+ java-pkg_jar-from xml-commons-external-1.4 xml-apis-ext.jar
+ fi
+ if use test; then
+ java-pkg_jar-from junit-4 junit.jar junit4.jar
+ fi
+ popd
+
+ java-pkg-opt-2_src_prepare
+ eautoconf
+}
+
+src_configure() {
+ if use gui; then
+ export JAVA_HOME="$(java-config -O)"
+ else
+ unset JAVAC
+ fi
+
+ export BLAS_LIBS="$($(tc-getPKG_CONFIG) --libs blas)"
+ export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
+ export F77_LDFLAGS="${LDFLAGS}"
+ # gentoo bug #302621
+ has_version sci-libs/hdf5[mpi] && \
+ export CXX=mpicxx CC=mpicc
+
+ econf \
+ --enable-relocatable \
+ --disable-rpath \
+ --with-docbook="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets" \
+ --disable-static-system-lib \
+ $(use_enable debug) \
+ $(use_enable debug code-coverage) \
+ $(use_enable debug debug-C) \
+ $(use_enable debug debug-CXX) \
+ $(use_enable debug debug-fortran) \
+ $(use_enable debug debug-java) \
+ $(use_enable debug debug-linker) \
+ $(use_enable doc build-help) \
+ $(use_enable nls) \
+ $(use_enable nls build-localization) \
+ $(use_enable static-libs static) \
+ $(use_enable test compilation-tests) \
+ $(use_with fftw) \
+ $(use_with gui) \
+ $(use_with gui javasci) \
+ $(use_with matio) \
+ $(use_with openmp) \
+ $(use_with tk) \
+ $(use_with umfpack) \
+ $(use_with xcos) \
+ $(use_with xcos modelica)
+}
+
+src_compile() {
+ emake
+ use doc && emake doc
+}
+
+src_test() {
+ if use gui; then
+ Xemake check
+ else
+ emake check
+ fi
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+ rm -rf "${D}"/usr/share/scilab/modules/*/tests ||die
+ use bash-completion && dobashcomp "${FILESDIR}"/${PN}.bash_completion
+ echo "SEARCH_DIRS_MASK=${EPREFIX}/usr/$(get_libdir)/scilab" \
+ > 50-"${PN}"
+ insinto /etc/revdep-rebuild && doins "50-${PN}"
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}