summaryrefslogtreecommitdiff
path: root/sci-libs/qd/qd-2.3.24.ebuild
blob: 9b6609f0bd2456fde52af9460c581ac3f9964560 (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
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

FORTRAN_NEEDED=fortran

inherit autotools fortran-2

DESCRIPTION="Quad-double and double-double float arithmetics"
HOMEPAGE="https://www.davidhbailey.com/dhbsoftware/"
SRC_URI="https://www.davidhbailey.com/dhbsoftware/${P}.tar.gz"
LICENSE="LBNLBSD"
SLOT="0"
KEYWORDS="amd64 ~riscv ~x86"
IUSE="cpu_flags_x86_fma3 cpu_flags_x86_fma4 doc fortran"

PATCHES=(
	"${FILESDIR}"/${P}-pkgconfig.patch
)

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	econf \
		--disable-static \
		--enable-ieee-add \
		--disable-sloppy-mul \
		--disable-sloppy-div \
		--enable-inline \
		$(use_enable cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4) fma) \
		$(use_enable fortran)
	sed -i \
		-e '/FCLIBS/s| -L[^ ]*||g' \
		fortran/Makefile \
		|| die
}

src_install() {
	default

	dosym qd_real.h /usr/include/qd/qd.h
	dosym dd_real.h /usr/include/qd/dd.h

	if ! use doc; then
		rm "${ED}"/usr/share/doc/${PF}/*.pdf || die
	fi

	find "${D}" -name '*.la' -delete || die
}