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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Jul 24 21:59:51 2008 UTC (6 years, 1 month ago) by markusle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Version bump (fixes bug #153462). Removed old ebuild.
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-SENTINEL-5 i686)

1 # Copyright 1999-2007 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-r2.ebuild,v 1.5 2007/11/20 14:46:56 markusle 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 latex hdf5 mpi 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 latex? ( virtual/latex-base )
25 blas? ( virtual/blas )
26 mpi? ( virtual/mpi )
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 # MPI requires the use of gcc/g++ wrappers
46 # mpicc/mpic++
47 # octave links agains -lmpi by default
48 # mpich needs -lmpich instead
49 if use mpi; then
50 CC="mpicc" && CXX="mpiCC"
51 if has_version 'sys-cluster/mpich'; then
52 myconf="${myconf} --with-mpi=mpich"
53 else
54 myconf="${myconf} --with-mpi=mpi"
55 fi
56 else
57 myconf="${myconf} --without-mpi"
58 fi
59
60 econf \
61 $(use_with hdf5) \
62 $(use_enable readline) \
63 ${myconf} \
64 LDFLAGS="${LDFLAGS}" \
65 CC="${CC}" CXX="${CXX}" || die "econf failed"
66
67 emake || die "emake failed"
68 }
69
70 src_install() {
71 make install DESTDIR="${D}" || die "make install failed"
72 if use latex; then
73 octave-install-doc || die "Octave doc install failed"
74 fi
75 if use emacs; then
76 cd emacs
77 exeinto /usr/bin
78 doexe otags || die
79 doman otags.1 || die
80 for emacsdir in /usr/share/emacs/site-lisp /usr/lib/xemacs/site-lisp; do
81 insinto ${emacsdir}
82 doins *.el || die
83 done
84 cd ..
85 fi
86 dodir /etc/env.d || die
87 echo "LDPATH=/usr/lib/octave-${PV}" > "${D}"/etc/env.d/99octave || die
88
89 # Fixes ls-R files to remove /var/tmp/portage references.
90 sed -i -e "s:${D}::g" "${D}"/usr/libexec/${PN}/ls-R || die
91 sed -i -e "s:${D}::g" "${D}"/usr/share/${PN}/ls-R || die
92 }
93
94 pkg_postinst() {
95 echo
96 einfo "Some users have reported failures at running simple tests if"
97 einfo "octave was built with agressive optimisations. You can check if"
98 einfo "your setup is affected by this bug by running the following test"
99 einfo "(inside the octave interpreter):"
100 einfo
101 einfo "octave:1> y = [1 3 4 2 1 5 3 5 6 7 4 5 7 10 11 3];"
102 einfo "octave:2> g = [1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3];"
103 einfo "octave:3> anova(y, g)"
104 einfo
105 einfo "If these commands complete successfully with no error message,"
106 einfo "your installation should be ok. Otherwise, try recompiling"
107 einfo "octave using less agressive \"CFLAGS\" (combining \"-O3\" and"
108 einfo "\"-march=pentium4\" is known to cause problems)."
109 echo
110 }
111
112 octave-install-doc() {
113 echo "Installing documentation..."
114 insinto /usr/share/doc/${PF}
115 doins doc/faq/Octave-FAQ.dvi || die
116 doins doc/interpreter/octave.dvi || die
117 doins doc/liboctave/liboctave.dvi || die
118 doins doc/refcard/refcard-a4.dvi || die
119 doins doc/refcard/refcard-legal.dvi || die
120 doins doc/refcard/refcard-letter.dvi || die
121 }

  ViewVC Help
Powered by ViewVC 1.1.20