summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2018-04-22 20:50:51 -0500
committerMatthias Maier <tamiko@gentoo.org>2018-04-22 20:51:53 -0500
commitc400acdf8b6c42f1ae19f224f3dbe3c5ca5663f6 (patch)
tree80e0c80e71b069cac77ef140603431901b15e9d5 /sci-libs/hypre/hypre-2.14.0.ebuild
parentdev-lang/python-3.6.5: ppc64 stable, bug 653440 (diff)
downloadgentoo-c400acdf8b6c42f1ae19f224f3dbe3c5ca5663f6.tar.gz
gentoo-c400acdf8b6c42f1ae19f224f3dbe3c5ca5663f6.tar.bz2
gentoo-c400acdf8b6c42f1ae19f224f3dbe3c5ca5663f6.zip
sci-libs/hypre: version bump to 2.14.0
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'sci-libs/hypre/hypre-2.14.0.ebuild')
-rw-r--r--sci-libs/hypre/hypre-2.14.0.ebuild107
1 files changed, 107 insertions, 0 deletions
diff --git a/sci-libs/hypre/hypre-2.14.0.ebuild b/sci-libs/hypre/hypre-2.14.0.ebuild
new file mode 100644
index 000000000000..a7d775a6c575
--- /dev/null
+++ b/sci-libs/hypre/hypre-2.14.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+
+inherit cmake-utils 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/LLNL/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc examples fei fortran int64 openmp mpi"
+
+RDEPEND="
+ sci-libs/superlu:=
+ virtual/blas
+ virtual/lapack
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( CHANGELOG COPYRIGHT README )
+
+# 2.11.1: fei and mli wrappers still buggy with big integers
+REQUIRED_USE="int64? ( !fei )"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] &&\
+ use openmp && [[ $(tc-getCC)$ == *gcc* ]] && tc-check-openmp
+}
+
+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_
+ use openmp && [[ $(tc-getCC)$ == *gcc* ]] && \
+ append-flags -fopenmp && append-ldflags -fopenmp
+ use mpi && CC=mpicc FC=mpif77 CXX=mpicxx
+
+ cd src
+
+ # 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 fei) \
+ $(use_with fei mli) \
+ $(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"
+ use doc && dodoc docs/*.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r src/examples
+ fi
+}