Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/hypre/
Date: Thu, 14 Nov 2019 21:45:53
Message-Id: 1573767846.07473712faf63411d744cadb7b4fc6c204110d78.tamiko@gentoo
1 commit: 07473712faf63411d744cadb7b4fc6c204110d78
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 14 21:36:09 2019 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 14 21:44:06 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07473712
7
8 sci-libs/hypre: version bump to 2.18.2
9
10 Package-Manager: Portage-2.3.79, Repoman-2.3.18
11 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
12
13 sci-libs/hypre/Manifest | 1 +
14 sci-libs/hypre/hypre-2.18.2.ebuild | 101 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 102 insertions(+)
16
17 diff --git a/sci-libs/hypre/Manifest b/sci-libs/hypre/Manifest
18 index 59f9da2a56e..73775a2eb87 100644
19 --- a/sci-libs/hypre/Manifest
20 +++ b/sci-libs/hypre/Manifest
21 @@ -1,2 +1,3 @@
22 DIST hypre-2.14.0.tar.gz 7312329 BLAKE2B 93de48bdd05c383c74fb1b3b25ddcd5830be099aa7557262547932e17eba524c25ff69ff94d10f29ffdabfef9c05281fd485a7c9b999141f2488ae4fc0238736 SHA512 c7b59fb7ab1cc906e339fcc00603898e44234a65aa74600f740bc825aa94aa66ff0cbd4bd4b7f339c0d28ff5bd9494f15b57f2017a22348fee14b4e8333f1e6c
23 DIST hypre-2.18.0.tar.gz 5698227 BLAKE2B e6562b78dcff6592a7df86d2162e3669c9ea3f71cc8926402038da319cb6c1b801a7ac5e44612ba86762ccdd63ae30cd2976451368309622b46e67a7a7dc1d83 SHA512 41292d590285703b5fb91c767fc9d064e36911f09583a81a3da9f2b5524143b23bb1beba3449d759e3f681760d9ad155072e1762d7d6bbe0e65660d5b16c472a
24 +DIST hypre-2.18.2.tar.gz 5699792 BLAKE2B 6adb343d23594adea60a4009f589285236365a5769b1d5cb66908ce83984dd48b3be929e6c7298c7b9cb1e2d67b1fe7ea641c8a160562d223edb9809977fb684 SHA512 7b343a5c8530d7f5e31cad6c940c2f154b2b954566d4fe8525d690fec41db23936a46fb642a994791de32984e696c624804fb1fde1f0c9ce026f1a6e46b9c0f4
25
26 diff --git a/sci-libs/hypre/hypre-2.18.2.ebuild b/sci-libs/hypre/hypre-2.18.2.ebuild
27 new file mode 100644
28 index 00000000000..e8e6dd2d154
29 --- /dev/null
30 +++ b/sci-libs/hypre/hypre-2.18.2.ebuild
31 @@ -0,0 +1,101 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +FORTRAN_NEEDED=fortran
38 +
39 +inherit cmake-utils fortran-2 toolchain-funcs flag-o-matic
40 +
41 +DESCRIPTION="Parallel matrix preconditioners library"
42 +HOMEPAGE="https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods"
43 +SRC_URI="https://github.com/${PN}-space/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
44 +
45 +LICENSE="LGPL-2.1"
46 +SLOT="0/${PV}"
47 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
48 +IUSE="debug examples fortran int64 openmp mpi"
49 +
50 +RDEPEND="
51 + sci-libs/superlu:=
52 + virtual/blas
53 + virtual/lapack
54 + mpi? ( virtual/mpi )"
55 +DEPEND="${RDEPEND}
56 + virtual/pkgconfig"
57 +
58 +DOCS=( CHANGELOG COPYRIGHT README )
59 +
60 +pkg_pretend() {
61 + [[ ${MERGE_TYPE} != binary ]] &&\
62 + use openmp && [[ $(tc-getCC)$ == *gcc* ]] && tc-check-openmp
63 +}
64 +
65 +pkg_setup() {
66 + if [[ ${MERGE_TYPE} != binary ]] && \
67 + use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp ; then
68 + ewarn "You are using a non capable gcc compiler ( < 4.2 ? )"
69 + die "Need an OpenMP capable compiler"
70 + fi
71 +}
72 +
73 +src_prepare() {
74 + default
75 + # link with system superlu and propagate LDFLAGS
76 + sed -e "s:@LIBS@:@LIBS@ $($(tc-getPKG_CONFIG) --libs superlu):" \
77 + -e 's:_SHARED@:_SHARED@ $(LDFLAGS):g' \
78 + -i src/config/Makefile.config.in || die
79 + sed -e '/HYPRE_ARCH/s: = :=:g' \
80 + -i src/configure || die
81 + # link with system blas and lapack
82 + sed -e '/^BLASFILES/d' \
83 + -e '/^LAPACKFILES/d' \
84 + -i src/lib/Makefile || die
85 +}
86 +
87 +src_configure() {
88 + tc-export CC CXX
89 + append-flags -Dhypre_dgesvd=dgesvd_
90 + use openmp && [[ $(tc-getCC)$ == *gcc* ]] && \
91 + append-flags -fopenmp && append-ldflags -fopenmp
92 + use mpi && CC=mpicc FC=mpif77 CXX=mpicxx
93 +
94 + cd src
95 +
96 + # without-superlu: means do not use bundled one
97 + econf \
98 + --enable-shared \
99 + --with-blas-libs="$($(tc-getPKG_CONFIG) --libs-only-l blas | sed -e 's/-l//g')" \
100 + --with-blas-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L blas | sed -e 's/-L//g')" \
101 + --with-lapack-libs="$($(tc-getPKG_CONFIG) --libs-only-l lapack | sed -e 's/-l//g')" \
102 + --with-lapack-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L lapack | sed -e 's/-L//g')" \
103 + --with-timing \
104 + --without-superlu \
105 + $(use_enable debug) \
106 + $(use_enable openmp hopscotch) \
107 + $(use_enable int64 bigint) \
108 + $(use_enable fortran) \
109 + $(use_with openmp) \
110 + $(use_with mpi MPI)
111 +}
112 +
113 +src_compile() {
114 + emake -C src
115 +}
116 +
117 +src_test() {
118 + LD_LIBRARY_PATH="${S}/src/lib:${LD_LIBRARY_PATH}" \
119 + PATH="${S}/src/test:${PATH}" \
120 + emake -C src check
121 +}
122 +
123 +src_install() {
124 + emake -C src install \
125 + HYPRE_INSTALL_DIR="${ED}" \
126 + HYPRE_LIB_INSTALL="${ED}/usr/$(get_libdir)" \
127 + HYPRE_INC_INSTALL="${ED}$/usr/include/hypre"
128 + if use examples; then
129 + insinto /usr/share/doc/${PF}
130 + doins -r src/examples
131 + fi
132 +}