aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2010-02-12 06:11:05 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2010-02-12 06:11:05 +0000
commitc83206b892792fced87b4fb84d8d57763da10931 (patch)
tree99cd47362fa089620b3be9f9f2bc1d0b6c0ae9f4 /sci-mathematics/scilab/scilab-5.2.0-r2.ebuild
parentmpi goodness to hdf-java (diff)
downloadsci-c83206b892792fced87b4fb84d8d57763da10931.tar.gz
sci-c83206b892792fced87b4fb84d8d57763da10931.tar.bz2
sci-c83206b892792fced87b4fb84d8d57763da10931.zip
New patches for scilab
Diffstat (limited to 'sci-mathematics/scilab/scilab-5.2.0-r2.ebuild')
-rw-r--r--sci-mathematics/scilab/scilab-5.2.0-r2.ebuild134
1 files changed, 134 insertions, 0 deletions
diff --git a/sci-mathematics/scilab/scilab-5.2.0-r2.ebuild b/sci-mathematics/scilab/scilab-5.2.0-r2.ebuild
new file mode 100644
index 000000000..0cf45181d
--- /dev/null
+++ b/sci-mathematics/scilab/scilab-5.2.0-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+inherit eutils autotools java-pkg-2 check-reqs
+
+DESCRIPTION="Scientific software package for numerical computations"
+LICENSE="CeCILL-2"
+SRC_URI="http://www.scilab.org/download/${PV}/${P}-src.tar.gz"
+HOMEPAGE="http://www.scilab.org/"
+
+SLOT="0"
+IUSE="doc fftw +gui hdf5 +matio scicos tk +umfpack"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="virtual/lapack
+ tk? ( dev-lang/tk )
+ scicos? ( dev-lang/ocaml )
+ umfpack? ( sci-libs/umfpack )
+ gui? ( >=virtual/jre-1.5
+ dev-java/commons-logging
+ dev-java/flexdock
+ dev-java/gluegen
+ dev-java/jeuclid-core
+ dev-java/jlatexmath
+ dev-java/jgraphx
+ dev-java/jogl
+ dev-java/jgoodies-looks
+ dev-java/skinlf
+ dev-java/jrosetta
+ dev-java/javahelp
+ hdf5? ( dev-java/hdf-java ) )
+ fftw? ( sci-libs/fftw:3.0 )
+ matio? ( sci-libs/matio )
+ hdf5? ( sci-libs/hdf5 )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ doc? (
+ ~dev-java/batik-1.7
+ dev-java/fop
+ ~dev-java/saxon-6.5.5
+ app-text/docbook-xsl-stylesheets )"
+
+pkg_setup() {
+ CHECKREQS_MEMORY="512"
+ java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+ # fix jeuclid detection
+ epatch "${FILESDIR}"/${P}-jeuclid-detect.patch
+ # Increases java heap to 512M when available
+ check_reqs_conditional && epatch "${FILESDIR}"/${P}-java-heap.patch
+ # avoid redefinition of exp10
+ epatch "${FILESDIR}"/${P}-no-redef-exp10.patch
+ # debian patches
+ for i in "${FILESDIR}"/*.diff; do
+ epatch ${i}
+ done
+ # add the correct java directories to the config file
+ sed \
+ -i "/^.DEFAULT_JAR_DIR/{s|=.*|=\"$(echo $(ls -d /usr/share/*/lib))\"|}" \
+ m4/java.m4 || die
+
+ sed -i "s|-L\$SCI_SRCDIR/bin/|-L\$SCI_SRCDIR/bin/ \
+ -L$(java-config -i gluegen) \
+ -L$(java-config -i hdf-java) \
+ -L$(java-config -i jogl)|" \
+ configure.ac || die
+ sed -i \
+ -e "/<\/librarypaths>/i\<path value=\"$(java-config -i gluegen)\"\/>" \
+ -e "/<\/librarypaths>/i\<path value=\"$(java-config -i jogl)\"\/>" \
+ -e "/<\/librarypaths>/i\<path value=\"$(java-config -i hdf-java)\"\/>" \
+ etc/librarypath.xml || die
+ eautoreconf
+ java-pkg-2_src_prepare
+}
+
+src_configure() {
+ local myopts
+ use doc && myopts="--with-docbook=/usr/share/sgml/docbook/xsl-stylesheets"
+ export JAVA_HOME=$(java-config -O)
+ export BLAS_LIBS="$(pkg-config --libs blas)"
+ export LAPACK_LIBS="$(pkg-config --libs lapack)"
+ # mpi is only used for hdf5 i/o
+ if use hdf5 && has_version sci-libs/hdf5[mpi]; then
+ export CC=mpicc
+ export CXX=mpicxx
+ export FC=mpif90
+ export F77=mpif77
+ fi
+ econf \
+ --disable-rpath \
+ --without-pvm \
+ $(use_with scicos) \
+ $(use_with tk) \
+ $(use_with fftw) \
+ $(use_with gui)\
+ $(use_with gui javasci)\
+ $(use_with matio) \
+ $(use_with scicos) \
+ $(use_with umfpack) \
+ $(use_enable doc build-help) \
+ $(use_with hdf5) \
+ ${myopts}
+}
+
+src_compile() {
+ emake || die "emake failed"
+ if use doc; then
+ emake doc || die "emake failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # install docs
+ dodoc ACKNOWLEDGEMENTS CHANGES README_Unix RELEASE_NOTES \
+ Readme_Visual.txt || die "failed to install docs"
+
+ #install icon
+ newicon icons/scilab.xpm scilab.xpm
+ make_desktop_entry ${PN} "Scilab" ${PN}
+}
+
+pkg_postinst() {
+ einfo "To tell Scilab about your printers, set the environment"
+ einfo "variable PRINTERS in the form:"
+ einfo
+ einfo "PRINTERS=\"firstPrinter:secondPrinter:anotherPrinter\""
+}