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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Jun 26 01:55:08 2005 UTC (9 years, 1 month ago) by ribosome
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Removed obsolete version and unused patches.
(Portage version: 2.0.51.19)

1 # Copyright 1999-2005 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.64.ebuild,v 1.7 2005/06/10 11:48:14 phosphan 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="~x86 ~ppc ~alpha ~sparc ~amd64"
15 IUSE="emacs static readline zlib tetex hdf5 mpi ifc blas"
16
17 DEPEND="virtual/libc
18 >=sys-libs/ncurses-5.2-r3
19 >=media-gfx/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` ]; 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
47
48 use static || myconf="--disable-static --enable-shared --enable-dl"
49 use readline || myconf="${myconf} --disable-readline"
50 use hdf5 || myconf="${myconf} --without-hdf5"
51 use mpi || myconf="${myconf} --without-mpi"
52
53 # Only add -lz to LDFLAGS if we have zlib in USE !
54 # BUG #52604
55 # Danny van Dyk 2004/08/26
56 use zlib && LDFLAGS="${LDFLAGS} -lz"
57
58 # NOTE: This version actually works with gcc-3.x
59 ./configure ${myconf} --prefix=/usr \
60 --sysconfdir=/etc \
61 --localstatedir=/var/state/octave \
62 --infodir=/usr/share/info \
63 --mandir=/usr/share/man \
64 --host=${CHOST} \
65 --build=${CHOST} \
66 --target=${CHOST} \
67 --enable-rpath \
68 --enable-lite-kernel \
69 LDFLAGS="${LDFLAGS}" || die "configure failed"
70
71 emake || die "emake failed"
72 }
73
74 src_install() {
75 make \
76 prefix=${D}/usr \
77 mandir=${D}/usr/share/man \
78 infodir=${D}/usr/share/info \
79 install || die "make install failed"
80 use tetex && octave-install-doc
81 if use emacs; then
82 cd emacs
83 exeinto /usr/bin
84 doexe otags
85 doman otags.1
86 for emacsdir in /usr/share/emacs/site-lisp /usr/lib/xemacs/site-lisp; do
87 insinto ${emacsdir}
88 doins *.el
89 done
90 cd ..
91 fi
92 dodir /etc/env.d
93 echo "LDPATH=/usr/lib/octave-${PV}" > ${D}/etc/env.d/99octave
94 }
95
96 pkg_postinst() {
97 echo
98 einfo "Some users have reported failures at running simple tests if"
99 einfo "octave was built with agressive optimisations. You can check if"
100 einfo "your setup is affected by this bug by running the following test"
101 einfo "(inside the octave interpreter):"
102 einfo
103 einfo "octave:1> y = [1 3 4 2 1 5 3 5 6 7 4 5 7 10 11 3];"
104 einfo "octave:2> g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3];"
105 einfo "octave:3> anova(y, g)"
106 einfo
107 einfo "If these commands complete successfully with no error message,"
108 einfo "your installation should be ok. Otherwise, try recompiling"
109 einfo "octave using less agressive \"CFLAGS\" (combining \"-O3\" and"
110 einfo "\"-march=pentium4\" is known to cause problems)."
111 echo
112 }
113
114 octave-install-doc() {
115 echo "Installing documentation..."
116 insinto /usr/share/doc/${PF}
117 doins doc/faq/Octave-FAQ.dvi
118 doins doc/interpreter/octave.dvi
119 doins doc/liboctave/liboctave.dvi
120 doins doc/refcard/refcard-a4.dvi
121 doins doc/refcard/refcard-legal.dvi
122 doins doc/refcard/refcard-letter.dvi
123 }

  ViewVC Help
Powered by ViewVC 1.1.20