aboutsummaryrefslogtreecommitdiff
blob: e38ab87ef21db3f185c3b8c5648f36a15c33b77a (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

DESCRIPTION="C++ wrapper for LAPACK libraries"
HOMEPAGE="http://lapackpp.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"

SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

RDEPEND="virtual/blas
	virtual/lapack"
DEPEND="${RDEPEND}
	dev-util/pkgconfig
	doc? ( app-doc/doxygen[latex] )"

src_prepare() {
	# Parallel build issues
	sed -i 's/\bmake\b/$(MAKE)/' Makefile.in || die
}

src_configure() {
	econf \
		--disable-atlas \
		--enable-static \
		--with-blas="$(pkg-config --libs blas)" \
		--with-lapack="$(pkg-config --libs lapack)"
}

src_compile() {
	default_src_compile
	if use doc; then
		emake srcdoc || die "emake srcdoc failed"
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc NEWS MAINTAINER RELEASE.NOTES README ChangeLog AUTHORS
	if use doc; then
		dohtml -r api-doc/html/* || die "dohtml failed"
	fi
}