summaryrefslogtreecommitdiff
blob: 16e7468a49fb780f25772461985ef85ee31142aa (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
56
57
58
59
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

ECVS_SERVER="blitz.cvs.sourceforge.net:/cvsroot/blitz"
ECVS_MODULE="blitz"

inherit eutils cvs autotools

DESCRIPTION="High-performance C++ numeric library"
HOMEPAGE="http://www.oonumerics.org/blitz/"
SRC_URI=""

IUSE="doc examples static-libs"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
LICENSE="|| ( GPL-2 Blitz-Artistic )"

DEPEND="doc? ( app-doc/doxygen )"
RDEPEND=""

S="${WORKDIR}"/${PN}

src_prepare() {
	eautoreconf
}

src_configure() {
	econf \
		--enable-shared \
		--disable-cxx-flags-preset \
		--disable-fortran \
		--without-blas \
		$(use_enable static-libs static) \
		$(use_enable doc doxygen) \
		$(use_enable doc html-docs)
}

src_compile() {
	emake lib
}

src_test() {
	# exprctor fails if BZ_DEBUG flag is not set
	# CXXFLAGS gets overwritten
	emake AM_CXXFLAGS="-DBZ_DEBUG" check-testsuite
}

src_install () {
	default
	dodoc ChangeLog.1 README.binutils
	use doc && dohtml -r html
	if use examples; then
		insinto /usr/share/doc/${PF}/examples
		doins examples/*.cpp || die
	fi
}