/[gentoo-x86]/sci-mathematics/octave/octave-2.1.57-r1.ebuild
Gentoo

Contents of /sci-mathematics/octave/octave-2.1.57-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Tue May 4 23:40:04 2010 UTC (4 years, 7 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Fixed some fltk automagic
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.57-r1.ebuild,v 1.13 2009/09/23 20:11:50 patrick Exp $
4
5 inherit flag-o-matic fortran
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 ftp://ftp.math.uni-hamburg.de/pub/soft/math/octave/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="x86 ppc alpha ~sparc amd64"
15 IUSE="emacs static readline zlib latex hdf5 mpi blas"
16
17 DEPEND=">=sys-libs/ncurses-5.2-r3
18 >=sci-visualization/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 latex? ( virtual/latex-base )
24 blas? ( virtual/blas )"
25 RDEPEND="${DEPEND}"
26
27 # NOTE: octave supports blas/lapack from intel but this is not open
28 # source nor is it free (as in beer OR speech) Check out...
29 # http://developer.intel.com/software/products/mkl/mkl52/index.htm for
30 # more information
31 FORTRAN="gfortran g77 ifc"
32
33 src_compile() {
34 filter-flags -ffast-math
35
36 local myconf
37
38 use static || myconf="--disable-static --enable-shared --enable-dl"
39 use readline || myconf="${myconf} --disable-readline"
40 use hdf5 || myconf="${myconf} --without-hdf5"
41 use mpi || myconf="${myconf} --without-mpi"
42
43 # Only add -lz to LDFLAGS if we have zlib in USE !
44 # BUG #52604
45 # Danny van Dyk 2004/08/26
46 use zlib && LDFLAGS="${LDFLAGS} -lz"
47
48 # NOTE: This version actually works with gcc-3.x
49 ./configure ${myconf} --prefix=/usr \
50 --sysconfdir=/etc \
51 --localstatedir=/var/state/octave \
52 --infodir=/usr/share/info \
53 --mandir=/usr/share/man \
54 --host=${CHOST} \
55 --build=${CHOST} \
56 --target=${CHOST} \
57 --enable-rpath \
58 --enable-lite-kernel \
59 LDFLAGS="${LDFLAGS}" || die "configure failed"
60
61 emake || die "emake failed"
62 }
63
64 src_install() {
65 make \
66 prefix=${D}/usr \
67 mandir=${D}/usr/share/man \
68 infodir=${D}/usr/share/info \
69 install || die "make install failed"
70 use latex && octave-install-doc
71 if use emacs; then
72 cd emacs
73 exeinto /usr/bin
74 doexe otags
75 doman otags.1
76 for emacsdir in /usr/share/emacs/site-lisp /usr/lib/xemacs/site-lisp; do
77 insinto ${emacsdir}
78 doins *.el
79 done
80 cd ..
81 fi
82 dodir /etc/env.d
83 echo "LDPATH=/usr/lib/octave-${PV}" > "${D}"/etc/env.d/99octave
84 }
85
86 pkg_postinst() {
87 echo
88 einfo "Some users have reported failures at running simple tests if"
89 einfo "octave was built with agressive optimisations. You can check if"
90 einfo "your setup is affected by this bug by running the following test"
91 einfo "(inside the octave interpreter):"
92 einfo
93 einfo "octave:1> y = [1 3 4 2 1 5 3 5 6 7 4 5 7 10 11 3];"
94 einfo "octave:2> g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3];"
95 einfo "octave:3> anova(y, g)"
96 einfo
97 einfo "If these commands complete successfully with no error message,"
98 einfo "your installation should be ok. Otherwise, try recompiling"
99 einfo "octave using less agressive \"CFLAGS\" (combining \"-O3\" and"
100 einfo "\"-march=pentium4\" is known to cause problems)."
101 echo
102 }
103
104 octave-install-doc() {
105 echo "Installing documentation..."
106 insinto /usr/share/doc/${PF}
107 doins doc/faq/Octave-FAQ.dvi
108 doins doc/interpreter/octave.dvi
109 doins doc/liboctave/liboctave.dvi
110 doins doc/refcard/refcard-a4.dvi
111 doins doc/refcard/refcard-legal.dvi
112 doins doc/refcard/refcard-letter.dvi
113 }

  ViewVC Help
Powered by ViewVC 1.1.20