diff options
author | Jakov Smolic <jakov.smolic@sartura.hr> | 2021-05-27 23:05:38 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-05-27 23:05:38 +0200 |
commit | 15b25c82e83b4cd387dd8ab89a72eb74f3879a71 (patch) | |
tree | 7512ad89e73a9bfea520fd25d546d6356cfbd0d2 /sci-libs | |
parent | sci-libs/hypre: Remove old 2.18.2-r1 (diff) | |
download | gentoo-15b25c82e83b4cd387dd8ab89a72eb74f3879a71.tar.gz gentoo-15b25c82e83b4cd387dd8ab89a72eb74f3879a71.tar.bz2 gentoo-15b25c82e83b4cd387dd8ab89a72eb74f3879a71.zip |
sci-libs/hypre: Bump to 2.21.0
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/hypre/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/hypre/hypre-2.21.0.ebuild | 112 |
2 files changed, 113 insertions, 0 deletions
diff --git a/sci-libs/hypre/Manifest b/sci-libs/hypre/Manifest index 587ef05e97cf..98ad73cf0d12 100644 --- a/sci-libs/hypre/Manifest +++ b/sci-libs/hypre/Manifest @@ -1 +1,2 @@ DIST hypre-2.20.0.tar.gz 5971556 BLAKE2B 63cef33913f1f4c569c396dd18227ae4346807e659306521e9340789944e22dc70be3b9baec7fb1385f562b53045e5c87fcad604aa242a941199ff9fe0a0c21d SHA512 842868b494960506fa3df4e72abb42084d701ec14305f9b040b9dcb578b4bbdaa8afb079057a7e53ad721b440c72ee804775c3b8319f2d01a2f281920a9cd350 +DIST hypre-2.21.0.tar.gz 6017038 BLAKE2B 500885cbd9f2b79c8740d1031a3dd9e5fd141dccfe2101ceed555cb7cbef77989b6af2c80f9b08e8efd6e2401269415532614d40512f93371397389e0fb15595 SHA512 20f860b0c25190608b50d577e03ab241d8caa1dbf7a7e56484e984710a586b1f4b63c72135488a756f42aa6a58d0a26b0c4e6e1680c3f7faabdf68e2559293b0 diff --git a/sci-libs/hypre/hypre-2.21.0.ebuild b/sci-libs/hypre/hypre-2.21.0.ebuild new file mode 100644 index 000000000000..ba8ee592057c --- /dev/null +++ b/sci-libs/hypre/hypre-2.21.0.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +FORTRAN_NEEDED=fortran + +inherit fortran-2 toolchain-funcs flag-o-matic + +DESCRIPTION="Parallel matrix preconditioners library" +HOMEPAGE="https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods" +SRC_URI="https://github.com/hypre-space/hypre/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="debug examples fortran int64 openmp mpi" + +BDEPEND="virtual/pkgconfig" +RDEPEND=" + sci-libs/superlu:= + virtual/blas + virtual/lapack + mpi? ( virtual/mpi ) +" +DEPEND="${RDEPEND}" + +DOCS=( CHANGELOG COPYRIGHT README ) + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc* ]] ; then + tc-check-openmp + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc* ]] && ! tc-has-openmp ; then + ewarn "You are using a non capable gcc compiler ( < 4.2 ? )" + die "Need an OpenMP capable compiler" + fi +} + +src_prepare() { + default + + # link with system superlu and propagate LDFLAGS + sed -e "s:@LIBS@:@LIBS@ $($(tc-getPKG_CONFIG) --libs superlu):" \ + -e 's:_SHARED@:_SHARED@ $(LDFLAGS):g' \ + -i src/config/Makefile.config.in || die + + sed -e '/HYPRE_ARCH/s: = :=:g' \ + -i src/configure || die + + # link with system blas and lapack + sed -e '/^BLASFILES/d' \ + -e '/^LAPACKFILES/d' \ + -i src/lib/Makefile || die +} + +src_configure() { + tc-export CC CXX + append-flags -Dhypre_dgesvd=dgesvd_ + + if use openmp && [[ $(tc-getCC) == *gcc* ]] ; then + append-flags -fopenmp && append-ldflags -fopenmp + fi + + if use mpi ; then + CC=mpicc + FC=mpif77 + CXX=mpicxx + fi + + cd src || die + + # without-superlu: means do not use bundled one + econf \ + --enable-shared \ + --with-blas-libs="$($(tc-getPKG_CONFIG) --libs-only-l blas | sed -e 's/-l//g')" \ + --with-blas-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L blas | sed -e 's/-L//g')" \ + --with-lapack-libs="$($(tc-getPKG_CONFIG) --libs-only-l lapack | sed -e 's/-l//g')" \ + --with-lapack-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L lapack | sed -e 's/-L//g')" \ + --with-timing \ + --without-superlu \ + $(use_enable debug) \ + $(use_enable openmp hopscotch) \ + $(use_enable int64 bigint) \ + $(use_enable fortran) \ + $(use_with openmp) \ + $(use_with mpi MPI) +} + +src_compile() { + emake -C src +} + +src_test() { + LD_LIBRARY_PATH="${S}/src/lib:${LD_LIBRARY_PATH}" \ + PATH="${S}/src/test:${PATH}" \ + emake -C src check +} + +src_install() { + emake -C src install \ + HYPRE_INSTALL_DIR="${ED}" \ + HYPRE_LIB_INSTALL="${ED}/usr/$(get_libdir)" \ + HYPRE_INC_INSTALL="${ED}/usr/include/hypre" + + if use examples; then + dodoc -r src/examples + fi +} |