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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Jan 31 03:47:04 2006 UTC (8 years, 10 months ago) by markusle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +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.ebuild,v 1.3 2006/01/29 19:40:02 cryos 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 ftp://ftp.math.uni-hamburg.de/pub/soft/math/octave/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
15 IUSE="emacs static readline zlib tetex hdf5 mpi ifc blas"
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 pkg_setup() {
35 use ifc || if [ -z `which g77` ] && [ -z `which gfortran` ]; then
36 #if ifc is defined then the dep was already checked
37 eerror "No fortran compiler found on the system!"
38 eerror "Please add fortran to your USE flags and reemerge gcc!"
39 die
40 fi
41 }
42
43 src_compile() {
44 filter-flags -ffast-math
45
46 local myconf="--localstatedir=/var/state/octave --enable-rpath"
47 myconf="${myconf} --enable-lite-kernel"
48 use static || myconf="${myconf} --disable-static --enable-shared --enable-dl"
49 # Only add -lz to LDFLAGS if we have zlib in USE !
50 # BUG #52604
51 # Danny van Dyk 2004/08/26
52 use zlib && LDFLAGS="${LDFLAGS} -lz"
53
54 econf \
55 $(use_with hdf5) \
56 $(use_with mpi) \
57 $(use_enable readline) \
58 ${myconf} \
59 LDFLAGS="${LDFLAGS}" || die "econf failed"
60
61 emake || die "emake failed"
62 }
63
64 src_install() {
65 make install DESTDIR=${D} || die "make install failed"
66 use tetex && octave-install-doc
67 if use emacs; then
68 cd emacs
69 exeinto /usr/bin
70 doexe otags
71 doman otags.1
72 for emacsdir in /usr/share/emacs/site-lisp /usr/lib/xemacs/site-lisp; do
73 insinto ${emacsdir}
74 doins *.el
75 done
76 cd ..
77 fi
78 dodir /etc/env.d
79 echo "LDPATH=/usr/lib/octave-${PV}" > ${D}/etc/env.d/99octave
80
81 # Fixes ls-R files to remove /var/tmp/portage references.
82 sed -i -e "s:${D}::g" ${D}/usr/libexec/${PN}/ls-R || die
83 sed -i -e "s:${D}::g" ${D}/usr/share/${PN}/ls-R || die
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