1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
9 inherit autotools fortran-2
11 DESCRIPTION="Arbitrary precision float arithmetics and functions"
12 HOMEPAGE="https://crd-legacy.lbl.gov/~dhbailey/mpdist/"
13 SRC_URI="https://crd.lbl.gov/~dhbailey/mpdist/${P}.tar.gz"
17 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18 IUSE="cpu_flags_x86_fma3 cpu_flags_x86_fma4 doc fortran qd static-libs"
20 DEPEND="qd? ( sci-libs/qd[fortran=] )"
24 "${FILESDIR}"/${P}-gold.patch
37 $(use_enable static-libs static) \
38 $(use_enable cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4) fma) \
39 $(use_enable fortran) \
49 ./mathinit || die "mathinit failed"
59 exeinto /usr/libexec/${PN}
62 exeinto /usr/libexec/${PN}/.libs
65 insinto /usr/libexec/${PN}
68 cat > mathtool.exe <<- _EOF_ || die
70 cd "${EPREFIX}/usr/libexec/${PN}" && exec ./mathtool
73 newbin mathtool.exe mathtool
74 newdoc README README.mathtool
78 rm "${ED%/}"/usr/share/doc/${PF}/*.pdf || die
81 if ! use static-libs; then
82 find "${D}" -name '*.la' -delete || die