| 1 |
# Copyright 1999-2004 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/octave/octave-2.1.50.ebuild,v 1.4 2005/03/08 18:34:55 vapier Exp $ |
| 4 |
|
| 5 |
inherit flag-o-matic |
| 6 |
|
| 7 |
DESCRIPTION="GNU Octave is a high-level language (MatLab compatible) intended for numerical computations" |
| 8 |
HOMEPAGE="http://www.octave.org/" |
| 9 |
SRC_URI="ftp://ftp.octave.org/pub/octave/bleeding-edge/${P}.tar.bz2" |
| 10 |
|
| 11 |
LICENSE="GPL-2" |
| 12 |
SLOT="0" |
| 13 |
KEYWORDS="x86 ~ppc ~alpha ~sparc amd64" |
| 14 |
IUSE="static readline zlib tetex hdf5 mpi" |
| 15 |
|
| 16 |
DEPEND="virtual/libc |
| 17 |
>=sys-libs/ncurses-5.2-r3 |
| 18 |
>=media-gfx/gnuplot-3.7.1-r3 |
| 19 |
>=sci-libs/fftw-2.1.3 |
| 20 |
>=dev-util/gperf-2.7.2 |
| 21 |
zlib? ( sys-libs/zlib ) |
| 22 |
hdf5? ( sci-libs/hdf5 ) |
| 23 |
tetex? ( virtual/tetex )" |
| 24 |
|
| 25 |
# NOTE: octave supports blas/lapack from intel but this is not open |
| 26 |
# source nor is it free (as in beer OR speech) Check out... |
| 27 |
# http://developer.intel.com/software/products/mkl/mkl52/index.htm for |
| 28 |
# more information |
| 29 |
|
| 30 |
pkg_setup() { |
| 31 |
use ifc || if [ -z `which g77` ]; then |
| 32 |
#if ifc is defined then the dep was already checked |
| 33 |
eerror "No fortran compiler found on the system!" |
| 34 |
eerror "Please add fortran to your USE flags and reemerge gcc!" |
| 35 |
die |
| 36 |
fi |
| 37 |
} |
| 38 |
|
| 39 |
src_compile() { |
| 40 |
filter-flags -ffast-math |
| 41 |
|
| 42 |
local myconf |
| 43 |
|
| 44 |
use static || myconf="--disable-static --enable-shared --enable-dl" |
| 45 |
use readline || myconf="${myconf} --disable-readline" |
| 46 |
use hdf5 || myconf="${myconf} --without-hdf5" |
| 47 |
use mpi || myconf="${myconf} --without-mpi" |
| 48 |
|
| 49 |
# NOTE: This version actually works with gcc-3.x |
| 50 |
./configure ${myconf} --prefix=/usr \ |
| 51 |
--sysconfdir=/etc \ |
| 52 |
--localstatedir=/var/state/octave \ |
| 53 |
--infodir=/usr/share/info \ |
| 54 |
--mandir=/usr/share/man \ |
| 55 |
--host=${CHOST} \ |
| 56 |
--build=${CHOST} \ |
| 57 |
--target=${CHOST} \ |
| 58 |
--enable-rpath \ |
| 59 |
--enable-lite-kernel \ |
| 60 |
LDFLAGS=-lz || die "configure failed" |
| 61 |
|
| 62 |
emake || die "emake failed" |
| 63 |
} |
| 64 |
|
| 65 |
src_install() { |
| 66 |
make \ |
| 67 |
prefix=${D}/usr \ |
| 68 |
mandir=${D}/usr/share/man \ |
| 69 |
infodir=${D}/usr/share/info \ |
| 70 |
install || die "make install failed" |
| 71 |
use tetex && octave-install-doc |
| 72 |
} |
| 73 |
|
| 74 |
octave-install-doc() { |
| 75 |
echo "Installing documentation..." |
| 76 |
insinto /usr/share/doc/${PF} |
| 77 |
doins doc/faq/Octave-FAQ.dvi |
| 78 |
doins doc/interpreter/octave.dvi |
| 79 |
doins doc/liboctave/liboctave.dvi |
| 80 |
doins doc/refcard/refcard-a4.dvi |
| 81 |
doins doc/refcard/refcard-legal.dvi |
| 82 |
doins doc/refcard/refcard-letter.dvi |
| 83 |
} |