blob: e7d67e797edd79b23239dd5a10997ec8ea605d2d (
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
62
63
64
65
66
67
68
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/blitz/blitz-0.9-r3.ebuild,v 1.6 2011/06/21 16:12:43 jlec Exp $
EAPI=3
inherit eutils fortran-2
DESCRIPTION="High-performance C++ numeric library"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
HOMEPAGE="http://www.oonumerics.org/blitz"
SLOT="0"
LICENSE="|| ( GPL-2 Blitz-Artistic )"
KEYWORDS="~amd64 ~ppc ~x86 ~ppc-macos ~x86-macos"
IUSE="debug doc examples"
DEPEND="
virtual/fortran
doc? ( app-doc/doxygen )"
RDEPEND=""
src_prepare() {
# remove examples compiling
sed -i \
-e 's/blitz-uninstalled.pc//' \
-e 's/examples//g' \
Makefile.in || die "sed failed"
epatch "${FILESDIR}"/${P}-gcc-4.3-missing-includes.patch
}
src_configure() {
# blas and fortran are only useful for benchmarks
econf \
--enable-shared \
--disable-cxx-flags-preset \
--disable-fortran \
--without-blas \
$(use_enable doc doxygen) \
$(use_enable doc html-docs) \
$(use_enable debug)
}
src_compile() {
emake \
LDFLAGS="${LDFLAGS}" \
lib || die "emake lib failed"
}
src_test() {
# exprctor fails if BZ_DEBUG flag is not set
# CXXFLAGS gets overwritten
emake AM_CXXFLAGS="-DBZ_DEBUG" check-testsuite || die "selftest failed"
}
src_install () {
dodir /usr/share/doc/${PF}/html
emake \
DESTDIR="${D}" \
docdir="${EPREFIX}"/usr/share/doc/${PF}/html \
install || die "emake install failed"
dodoc ChangeLog ChangeLog.1 README README.binutils TODO AUTHORS NEWS || die
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins examples/*.cpp || die
fi
}
|