aboutsummaryrefslogtreecommitdiff
blob: eeeaaae5df60de3a3cf56c9c9ba96bbc953dea30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit autotools eutils fortran-2

DESCRIPTION="High-level interpreted language for numerical analysis"
HOMEPAGE="http://algae.sourceforge.net/"
SRC_URI="mirror://sourceforge/algae/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="blas intel lapack"

DEPEND="
	sci-libs/fftw \
	intel? ( dev-lang/icc dev-lang/ifc )
	blas? ( virtual/blas )
	lapack? ( virtual/lapack )"
RDEPEND="${DEPEND}"

src_prepare() {
	epatch \
		"${FILESDIR}"/configure.in.patch
		"${FILESDIR}"/Makefile.in-src.patch
		"${FILESDIR}"/Makefile.in-doc.patch
	eautoreconf
}

src_configure() {
	if use intel; then
		F77="ifort" \
		CC="icc" \
		LDFLAGS="-L/opt/intel/compiler80/lib" LIBS="-latlas" \
		econf \
			--with-readline --with-fftw \
			$(use-enable blas ) $(use-enable lapack ) \
			--with-fortran-libs="-limf -lifcore -lifport"
	else
		FLAGS="${FCFLAGS}" econf --with-readline --with-fftw \
			$(use-enable blas ) $(use-enable lapack )
	fi
}

src_compile() {
	emake htmldir="/usr/share/doc/${P}/html"
}

src_install() {
	emake install prefix="${D}usr" htmldir="${D}usr/share/doc/${P}/html"
	dodoc INSTALL NEWS PROBLEMS README VERSION doc/FAQ doc/*ps
}