dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / sci-libs / lis / lis-1.6.5.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools fortran-2 toolchain-funcs
7
8 DESCRIPTION="Library of Iterative Solvers for Linear Systems"
9 HOMEPAGE="https://www.ssisc.org/lis/index.en.html"
10 SRC_URI="https://www.ssisc.org/lis/dl/${P}.tar.gz"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
15 IUSE="cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse2 doc fortran mpi openmp quad saamg static-libs"
16
17 RDEPEND="mpi? ( virtual/mpi )"
18 DEPEND="${RDEPEND}"
19
20 PATCHES=( "${FILESDIR}"/${PN}-1.6.2-autotools.patch )
21
22 pkg_setup() {
23         if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
24                 if ! tc-has-openmp; then
25                         ewarn "OpenMP is not available in your current selected compiler"
26
27                         if tc-is-clang; then
28                                 ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp,"
29                                 ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\""
30                         fi
31
32                         die "need openmp capable compiler"
33                 fi
34                 FORTRAN_NEED_OPENMP=1
35         fi
36
37         use fortran && fortran-2_pkg_setup
38 }
39
40 src_prepare() {
41         default
42         eautoreconf
43 }
44
45 src_configure() {
46         econf \
47                 --enable-shared \
48                 $(use_enable static-libs static) \
49                 $(use_enable fortran) \
50                 $(use_enable openmp omp) \
51                 $(use_enable quad) \
52                 $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) \
53                 $(use_enable cpu_flags_x86_sse2 sse2) \
54                 $(use_enable saamg) \
55                 $(use_enable mpi)
56 }
57
58 src_install() {
59         use doc && DOCS+=( doc/*.pdf )
60         default
61
62         if ! use static-libs; then
63                 find "${D}" -name '*.la' -delete || die
64         fi
65 }