1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 AUTOTOOLS_IN_SOURCE_BUILD=1
11 inherit eutils fortran-2 autotools-utils
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"
19 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
20 IUSE="doc cpu_flags_x86_fma3 cpu_flags_x86_fma4 fortran qd static-libs"
22 DEPEND="qd? ( sci-libs/qd[fortran=] )"
27 --docdir="${EPREFIX}/usr/share/doc/${PF}"
28 $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma)
32 autotools-utils_src_configure
36 autotools-utils_src_compile
37 use fortran && autotools-utils_src_compile toolkit
41 autotools-utils_src_install
44 ./mathinit || die "mathinit failed"
45 exeinto /usr/libexec/${PN}
47 insinto /usr/libexec/${PN}
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
54 use doc || rm "${ED}"/usr/share/doc/${PF}/*.pdf