sci-libs/clipper: Add ~ppc keyword
[gentoo.git] / sci-libs / arprec / arprec-2.2.16.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6
7 FORTRAN_NEEDED=fortran
8 AUTOTOOLS_AUTORECONF=1
9 AUTOTOOLS_IN_SOURCE_BUILD=1
10
11 inherit eutils fortran-2 autotools-utils
12
13 DESCRIPTION="Arbitrary precision float arithmetics and functions"
14 HOMEPAGE="http://crd.lbl.gov/~dhbailey/mpdist/"
15 SRC_URI="http://crd.lbl.gov/~dhbailey/mpdist/${P}.tar.gz"
16
17 SLOT="0"
18 LICENSE="BSD"
19 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
20 IUSE="doc cpu_flags_x86_fma3 cpu_flags_x86_fma4 fortran qd static-libs"
21
22 DEPEND="qd? ( sci-libs/qd[fortran=] )"
23 RDEPEND="${DEPEND}"
24
25 src_configure() {
26         local myeconfargs=(
27                 --docdir="${EPREFIX}/usr/share/doc/${PF}"
28                 $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma)
29                 $(use_enable fortran)
30                 $(use_enable qd)
31         )
32         autotools-utils_src_configure
33 }
34
35 src_compile() {
36         autotools-utils_src_compile
37         use fortran && autotools-utils_src_compile toolkit
38 }
39
40 src_install() {
41         autotools-utils_src_install
42         if use fortran; then
43                 cd toolkit
44                 ./mathinit || die "mathinit failed"
45                 exeinto /usr/libexec/${PN}
46                 doexe .libs/mathtool
47                 insinto /usr/libexec/${PN}
48                 doins *.dat
49                 echo > mathtool.exe "#!${EROOT}/bin/sh"
50                 echo >> mathtool.exe "cd ${EROOT}/usr/libexec/arprec && exec ./mathtool"
51                 newbin mathtool.exe mathtool
52                 newdoc README README.mathtool
53         fi
54         use doc || rm "${ED}"/usr/share/doc/${PF}/*.pdf
55 }