aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@gmail.com>2012-07-11 00:52:05 -0400
committerGuillaume Horel <guillaume.horel@gmail.com>2012-07-11 00:54:39 -0400
commitaa1b836b8796a1cdb25583ded94133771f59b7d2 (patch)
tree87329e05225e9cfd7532f7459a044b15f04b98dd
parent[dev-java/jrosetta] version bump (diff)
downloadsci-aa1b836b8796a1cdb25583ded94133771f59b7d2.tar.gz
sci-aa1b836b8796a1cdb25583ded94133771f59b7d2.tar.bz2
sci-aa1b836b8796a1cdb25583ded94133771f59b7d2.zip
[sci-mathematics/scilab-5.3.999] test ebuild for 5.4 branch
-rw-r--r--sci-mathematics/scilab/ChangeLog9
-rw-r--r--sci-mathematics/scilab/Manifest1
-rw-r--r--sci-mathematics/scilab/files/scilab-5.3.999-blas-libs.patch12
-rw-r--r--sci-mathematics/scilab/files/scilab-5.3.999-followlinks.patch12
-rw-r--r--sci-mathematics/scilab/files/scilab-5.3.999-fortran-link.patch22
-rw-r--r--sci-mathematics/scilab/files/scilab-5.3.999-gluegen.patch12
-rw-r--r--sci-mathematics/scilab/files/scilab-5.3.999-java-heap.patch11
-rw-r--r--sci-mathematics/scilab/scilab-5.3.999.ebuild244
8 files changed, 323 insertions, 0 deletions
diff --git a/sci-mathematics/scilab/ChangeLog b/sci-mathematics/scilab/ChangeLog
index 10428af4a..a47ca9861 100644
--- a/sci-mathematics/scilab/ChangeLog
+++ b/sci-mathematics/scilab/ChangeLog
@@ -2,6 +2,15 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*scilab-5.3.999 (11 Jul 2012)
+
+ 11 Jul 2012; Guillaume Horel <guillaume.horel@gmail.com>
+ +scilab-5.3.999.ebuild, +files/scilab-5.3.999-blas-libs.patch,
+ +files/scilab-5.3.999-followlinks.patch,
+ +files/scilab-5.3.999-fortran-link.patch,
+ +files/scilab-5.3.999-gluegen.patch, +files/scilab-5.3.999-java-heap.patch:
+ new ebuild for the 5.4 branch
+
30 May 2012; Guillaume Horel <guillaume.horel@gmail.com>
scilab-5.3.3-r1.ebuild:
force exact version of jgraphx
diff --git a/sci-mathematics/scilab/Manifest b/sci-mathematics/scilab/Manifest
index ee6bad85e..c3ee2093d 100644
--- a/sci-mathematics/scilab/Manifest
+++ b/sci-mathematics/scilab/Manifest
@@ -1 +1,2 @@
DIST scilab-5.3.3-src.tar.gz 47253497 SHA256 e6edd7d241f2a09bd2dadaaafff5c152509db240220933b87305875302401335 SHA512 334ff05239efa2c9c378a86521a979aa5578f5a79324dc4f16805a995c673d5bd9656567de127939bf30409e2ba6f5904b75508046adfcfa4a5d6390f53d8ffa WHIRLPOOL 635666dbc52280fd797f01402c42429acd3e55c1bcdd9a2af584e349838e1bb935cef97f0f9f061d7b1c44f6078a0d84fb44f2c4cb17fcf9d3ba59e79c45493e
+DIST scilab-5.3.999.tar.gz 46460032 SHA256 8d0cd7829bf798a44d17b4c4ffb6a87173e3dafe76bbc677077573d8642f3285 SHA512 f9099de092da5d964383026589be081f78702767a71175529b6a4252c49fbb5d84de282bdab05d399a5afc298a0ac9af0e19bd4c165d452f40a5784367637d61 WHIRLPOOL ed030521dcf37cd64815f64143b7765f4e0d0f1496576b7358040e03fc6851c4f72be998b6a67f5c45434923b8759febffb95bbf93637755364974da7a518a79
diff --git a/sci-mathematics/scilab/files/scilab-5.3.999-blas-libs.patch b/sci-mathematics/scilab/files/scilab-5.3.999-blas-libs.patch
new file mode 100644
index 000000000..b2921f708
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.3.999-blas-libs.patch
@@ -0,0 +1,12 @@
+ upstream http://bugzilla.scilab.org/show_bug.cgi?id=9824
+
+--- scilab-5.3.2-orig/m4/libsmath.m4 2011-09-19 14:08:11.167292730 -0400
++++ scilab-5.3.2/m4/libsmath.m4 2011-09-19 14:08:26.477292283 -0400
+@@ -37,7 +37,6 @@
+ AC_PREREQ(2.50)
+ AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
+ acx_blas_ok=no
+-BLAS_LIBS=
+ acx_blas_save_LIBS="$LIBS"
+
+ AC_ARG_WITH(blas-library,
diff --git a/sci-mathematics/scilab/files/scilab-5.3.999-followlinks.patch b/sci-mathematics/scilab/files/scilab-5.3.999-followlinks.patch
new file mode 100644
index 000000000..118df3b1a
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.3.999-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.3.999-fortran-link.patch b/sci-mathematics/scilab/files/scilab-5.3.999-fortran-link.patch
new file mode 100644
index 000000000..53277783c
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.3.999-fortran-link.patch
@@ -0,0 +1,22 @@
+diff -urN scilab-orig/configure.ac scilab/configure.ac
+--- scilab-orig/configure.ac 2012-06-14 22:30:33.438115959 -0400
++++ scilab/configure.ac 2012-06-14 22:37:57.229102963 -0400
+@@ -200,16 +200,14 @@
+ if test -z "$F77"; then
+ AC_MSG_ERROR([You asked me to use gfortran but i haven't been able to find it])
+ fi
+-fi
+
+-if test "$with_intelcompilers" = yes; then
++elif test "$with_intelcompilers" = yes; then
+ AC_PROG_F77(ifc ifort)
+ if test -z "$F77"; then
+ AC_MSG_ERROR([You asked me to use ifc (intel fortran compiler) but i haven't been able to find it])
+ fi
+-fi
+
+-if test -z "$F77"; then
++elif test -z "$F77"; then
+ ## No Fortran compiler specified... Prefer gfortran and intel compilers
+ AC_PROG_F77([gfortran ifc ifort])
+ if test -z "$F77"; then
diff --git a/sci-mathematics/scilab/files/scilab-5.3.999-gluegen.patch b/sci-mathematics/scilab/files/scilab-5.3.999-gluegen.patch
new file mode 100644
index 000000000..64717a75a
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.3.999-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.3.999-java-heap.patch b/sci-mathematics/scilab/files/scilab-5.3.999-java-heap.patch
new file mode 100644
index 000000000..e493a3bd1
--- /dev/null
+++ b/sci-mathematics/scilab/files/scilab-5.3.999-java-heap.patch
@@ -0,0 +1,11 @@
+--- scilab-5.3.3.orig//etc/jvm_options.xml 2011-05-25 23:20:12.145833420 -0400
++++ scilab-5.3.3/etc/jvm_options.xml 2011-05-25 23:20:58.760833451 -0400
+@@ -22,7 +22,7 @@
+ <!-- ENABLE Just In Time java compiler -->
+ <option value="-Djava.compiler=JIT"/>
+ <!-- Set Java Heap space to 256mb -->
+- <option value="-Xmx256m"/>
++ <option value="-Xmx512m"/>
+ <option value="-Dapple.laf.useScreenMenuBar=true" os="macosx"/>
+ <!-- DISABLE Just In Time java compiler -->
+ <!--
diff --git a/sci-mathematics/scilab/scilab-5.3.999.ebuild b/sci-mathematics/scilab/scilab-5.3.999.ebuild
new file mode 100644
index 000000000..83f751844
--- /dev/null
+++ b/sci-mathematics/scilab/scilab-5.3.999.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+JAVA_PKG_OPT_USE="gui"
+VIRTUALX_REQUIRED="manual"
+
+inherit eutils autotools check-reqs eutils fdo-mime flag-o-matic \
+ java-pkg-opt-2 fortran-2 flag-o-matic toolchain-funcs virtualx
+
+# Comments:
+# - we don't rely on the configure script to find the right version of java
+# packages. This should fix bug #41821
+# Things that don't work:
+# - tests
+# - libxml2 needs -icu otherwise fails during compilation of xml module
+# (upstream is aware of it)
+# - can't build without help
+# - has to call eautoconf, and not eautoreconf, libtool fails otherwise
+# - --as-needed still doesn't work
+# - needs to remove scilab-5.3.x before installing otherwise gets a DOCBOOK_ROOT
+# error
+
+DESCRIPTION="Scientific software package for numerical computations"
+LICENSE="CeCILL-2"
+HOMEPAGE="http://www.scilab.org/"
+SRC_URI="http://guillaume.horel.free.fr/${P}.tar.gz"
+
+SLOT="0"
+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
+
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="dev-libs/libpcre
+ dev-libs/libxml2:2[-icu]
+ sys-devel/gettext
+ sys-libs/ncurses
+ sys-libs/readline
+ virtual/lapack
+ dev-java/hdf-java
+ 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: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/jlatexmath-0.9.4:0
+ dev-java/jogl:2
+ >=dev-java/jrosetta-1.0.4:0
+ dev-java/scirenderer:0
+ dev-java/skinlf:0
+ dev-java/xmlgraphics-commons:1.3
+ virtual/opengl
+ doc? ( dev-java/saxon:6.5 )
+ xcos? ( dev-java/jgraphx:1.8 ) )
+ matio? ( <sci-libs/matio-1.5 )
+ tk? ( dev-lang/tk )
+ umfpack? ( sci-libs/umfpack )"
+
+RDEPEND="${CDEPEND}
+ gui? ( >=virtual/jre-1.5 )"
+
+DEPEND="${CDEPEND}
+ virtual/fortran
+ virtual/pkgconfig
+ debug? ( dev-util/lcov )
+ gui? (
+ >=virtual/jdk-1.5
+ doc? ( app-text/docbook-xsl-stylesheets
+ >=dev-java/jlatexmath-fop-0.9.4
+ dev-java/xml-commons-external )
+ xcos? ( dev-lang/ocaml ) )
+ test? (
+ dev-java/junit
+ gui? ( ${VIRTUALX_DEPEND} ) )"
+
+S="${WORKDIR}/${PN}"
+DOCS=( "ACKNOWLEDGEMENTS" "README_Unix" "Readme_Visual.txt" )
+
+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=
+ 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
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-fortran-link.patch \
+ "${FILESDIR}"/${P}-blas-libs.patch \
+ "${FILESDIR}"/${P}-followlinks.patch \
+ "${FILESDIR}"/${P}-gluegen.patch
+
+ # need serious as-needed work (inter-dependencies among modules)
+ # "${FILESDIR}"/${P}-as-needed.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
+
+ # make sure library path are preloaded in binaries
+ sed -i \
+ -e "s|^LD_LIBRARY_PATH=|LD_LIBRARY_PATH=${EPREFIX}/usr/$(get_libdir)/scilab:|g" \
+ bin/scilab* || die
+
+ #add specific gentoo java directories
+ if use gui; then
+ sed -i -e "s|/usr/lib/jogl|/usr/lib/jogl-2|" \
+ -e "s|/usr/lib64/jogl|/usr/lib64/jogl-2|" configure.ac || die
+ sed -i -e "s|/usr/lib/gluegen|/usr/lib/gluegen-2|" \
+ -e "s|/usr/lib64/gluegen|/usr/lib64/gluegen-2|" \
+ -e "s|AC_CHECK_LIB(\[gluegen2-rt|AC_CHECK_LIB([gluegen-rt|" \
+ configure.ac || die
+
+ sed -i -e "s/jogl/jogl-2/" -e "s/gluegen/gluegen-2/" \
+ -e "s/jhdf5/hdf-java/" etc/librarypath.xml || die
+ sed -i -e "s|/jhdf5|/hdf-java|g" m4/hdf5.m4
+ fi
+ mkdir jar; cd jar
+ java-pkg_jar-from jgraphx-1.8,jlatexmath,hdf-java,flexdock,skinlf
+ java-pkg_jar-from jgoodies-looks-2.0,jrosetta,scirenderer
+ java-pkg_jar-from avalon-framework-4.2,saxon-6.5,jeuclid-core
+ java-pkg_jar-from xmlgraphics-commons-1.3,commons-io-1,jlatexmath-fop
+ 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 xml-commons-external-1.4 xml-apis-ext.jar
+ java-pkg_jar-from commons-logging commons-logging.jar
+ java-pkg_jar-from fop fop.jar
+ java-pkg_jar-from javahelp jhall.jar
+ if use test; then
+ java-pkg_jar-from junit-4 junit.jar junit4.jar
+ fi
+ cd ..
+
+ 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="$(pkg-config --libs blas)"
+ export LAPACK_LIBS="$(pkg-config --libs lapack)"
+ export F77_LDFLAGS="${LDFLAGS}"
+ # gentoo bug #302621
+ has_version sci-libs/hdf5[mpi] && \
+ export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77
+
+ econf \
+ --enable-relocatable \
+ --disable-rpath \
+ -with-docbook="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets" \
+ $(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
+ use bash-completion && dobashcomp "${FILESDIR}"/${PN}.bash_completion
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+}