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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jan 31 03:47:04 2006 UTC (8 years, 5 months ago) by markusle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Bump to latest revision. Removed obsolete versions. This fixes bug #120976.
(Portage version: 2.1_pre4-r1)

1 # Copyright 1999-2006 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.71-r1.ebuild,v 1.2 2006/01/29 19:41:01 cryos 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 LICENSE="GPL-2"
9 HOMEPAGE="http://www.octave.org/"
10 SRC_URI="ftp://ftp.octave.org/pub/octave/bleeding-edge/${P}.tar.bz2
11 ftp://ftp.math.uni-hamburg.de/pub/soft/math/octave/${P}.tar.bz2"
12
13 SLOT="0"
14 IUSE="emacs static readline zlib tetex hdf5 mpi ifc blas"
15 KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
16
17 DEPEND="virtual/libc
18 >=sys-libs/ncurses-5.2-r3
19 >=sci-visualization/gnuplot-3.7.1-r3
20 >=sci-libs/fftw-2.1.3
21 >=dev-util/gperf-2.7.2
22 zlib? ( sys-libs/zlib )
23 hdf5? ( sci-libs/hdf5 )
24 tetex? ( virtual/tetex )
25 x86? ( ifc? ( dev-lang/ifc ) )
26 blas? ( virtual/blas )
27 !=app-text/texi2html-1.70"
28
29 # NOTE: octave supports blas/lapack from intel but this is not open
30 # source nor is it free (as in beer OR speech) Check out...
31 # http://developer.intel.com/software/products/mkl/mkl52/index.htm for
32 # more information
33
34 src_compile() {
35 filter-flags -ffast-math
36
37 local myconf="--localstatedir=/var/state/octave --enable-rpath"
38 myconf="${myconf} --enable-lite-kernel"
39 use static || myconf="${myconf} --disable-static --enable-shared --enable-dl"
40 # Only add -lz to LDFLAGS if we have zlib in USE !
41 # BUG #52604
42 # Danny van Dyk 2004/08/26
43 use zlib && LDFLAGS="${LDFLAGS} -lz"
44
45 econf \
46 $(use_with hdf5) \
47 $(use_with mpi) \
48 $(use_enable readline) \
49 ${myconf} \
50 LDFLAGS="${LDFLAGS}" || die "econf failed"
51
52 emake || die "emake failed"
53 }
54
55 src_install() {
56 make install DESTDIR="${D}" || die "make install failed"
57 if use tetex; then
58 octave-install-doc || die "Octave doc install failed"
59 fi
60 if use emacs; then
61 cd emacs
62 exeinto /usr/bin
63 doexe otags || die
64 doman otags.1 || die
65 for emacsdir in /usr/share/emacs/site-lisp /usr/lib/xemacs/site-lisp; do
66 insinto ${emacsdir}
67 doins *.el || die
68 done
69 cd ..
70 fi
71 dodir /etc/env.d || die
72 echo "LDPATH=/usr/lib/octave-${PV}" > "${D}"/etc/env.d/99octave || die
73
74 # Fixes ls-R files to remove /var/tmp/portage references.
75 sed -i -e "s:${D}::g" "${D}"/usr/libexec/${PN}/ls-R || die
76 sed -i -e "s:${D}::g" "${D}"/usr/share/${PN}/ls-R || die
77 }
78
79 pkg_postinst() {
80 echo
81 einfo "Some users have reported failures at running simple tests if"
82 einfo "octave was built with agressive optimisations. You can check if"
83 einfo "your setup is affected by this bug by running the following test"
84 einfo "(inside the octave interpreter):"
85 einfo
86 einfo "octave:1> y = [1 3 4 2 1 5 3 5 6 7 4 5 7 10 11 3];"
87 einfo "octave:2> g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3];"
88 einfo "octave:3> anova(y, g)"
89 einfo
90 einfo "If these commands complete successfully with no error message,"
91 einfo "your installation should be ok. Otherwise, try recompiling"
92 einfo "octave using less agressive \"CFLAGS\" (combining \"-O3\" and"
93 einfo "\"-march=pentium4\" is known to cause problems)."
94 echo
95 }
96
97 octave-install-doc() {
98 echo "Installing documentation..."
99 insinto /usr/share/doc/${PF}
100 doins doc/faq/Octave-FAQ.dvi || die
101 doins doc/interpreter/octave.dvi || die
102 doins doc/liboctave/liboctave.dvi || die
103 doins doc/refcard/refcard-a4.dvi || die
104 doins doc/refcard/refcard-legal.dvi || die
105 doins doc/refcard/refcard-letter.dvi || die
106 }

  ViewVC Help
Powered by ViewVC 1.1.20