summaryrefslogtreecommitdiff
blob: 02744f2ceeb76113d68d6ac0aab155598e7fb5b3 (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
60
61
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=4

AUTOTOOLS_AUTORECONF=1

inherit autotools-utils multilib

DESCRIPTION="High-performance C++ numeric library"
HOMEPAGE="http://blitz.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

SLOT="0"
LICENSE="|| ( LGPL-3 Artistic-2 BSD )"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~ppc-macos ~x86-linux ~x86-macos"
IUSE="boost debug doc examples static-libs"

RDEPEND="boost? ( >=dev-libs/boost-1.40 )"
DEPEND="${RDEPEND}
	doc? ( app-doc/doxygen[dot] )"

PATCHES=( "${FILESDIR}"/${P}-{docs,gcc47,set-default-arg-value}.patch )

src_configure() {
	# blas / fortran only needed for benchmarks
	use doc && doxygen -u doc/doxygen/Doxyfile.in
	local myeconfargs=(
		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
		--enable-shared
		--disable-cxx-flags-preset
		--disable-fortran
		--without-blas
		$(use_enable boost serialization)
		$(use_enable debug)
		$(use_enable doc doxygen)
		$(use_enable doc html-docs)
		$(use_with boost boost "${EPREFIX}/usr")
		$(use_with boost boost-serialization)
	)
	autotools-utils_src_configure
}

src_compile() {
	autotools-utils_src_compile lib
	use doc && autotools-utils_src_compile info html pdf
}

src_test() {
	pushd ${AUTOTOOLS_BUILD_DIR} > /dev/null
	emake check-testsuite check-examples
	popd > /dev/null
}

src_install () {
	autotools-utils_src_install $(use doc&& echo install-html install-pdf)
	if use examples; then
		insinto /usr/share/doc/${PF}/examples
		doins examples/*.{cpp,f}
	fi
}