commit:     0211137c71019d8ad5da06197055acb99a56a699
Author:     Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 19 21:12:31 2016 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Mon Dec 19 23:51:12 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0211137c

sci-libs/hypre: version bump

Package-Manager: portage-2.3.3

 sci-libs/hypre/Manifest            |   1 +
 sci-libs/hypre/hypre-2.11.1.ebuild | 108 +++++++++++++++++++++++++++++++++++++
 sci-libs/hypre/metadata.xml        |  13 +++--
 3 files changed, 119 insertions(+), 3 deletions(-)

diff --git a/sci-libs/hypre/Manifest b/sci-libs/hypre/Manifest
index 9cd5ec9..12f94de 100644
--- a/sci-libs/hypre/Manifest
+++ b/sci-libs/hypre/Manifest
@@ -1 +1,2 @@
+DIST hypre-2.11.1.tar.gz 8054149 SHA256 
6bb2ff565ff694596d0e94d0a75f0c3a2cd6715b8b7652bc71feb8698554db93 SHA512 
4266c1b5225bcc97781246475100382f4929d7c918c854570a36b90602e8f111a4893cd1c93b95c68305c851898b970dd92ac173efe9211be5bb914d3c3c5d83
 WHIRLPOOL 
b650b51b983d1af9bcec797c4160fc4161936d09534e0b21212b52d34f225fd91bd917eb97d7a92cbd544f9391b00f17337518be9b284e57b04eac80b81b4d59
 DIST hypre-2.9.0b.tar.gz 9053035 SHA256 
6568f65e7c3c11531a00c300a059f0b81dcab3b2d038cd1154e1458a73edbe5d SHA512 
6856f2c80eaf669258d73a36a59c0fd0f43e20a5b2e633b6aefbccf41f5217ea821a6201dadc0de2b17a039ba9f53d98031f0b091e3db552cc5251a4f766acb8
 WHIRLPOOL 
acc84dec19fca2908170286adc582adb7c6b06d058a5518d87ccb4093a301046f978fea3ede6f854f9fcdf482993612b420bb0391474421b95721a91122b72dd

diff --git a/sci-libs/hypre/hypre-2.11.1.ebuild 
b/sci-libs/hypre/hypre-2.11.1.ebuild
new file mode 100644
index 00000000..8819e27
--- /dev/null
+++ b/sci-libs/hypre/hypre-2.11.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+FORTRAN_NEEDED=fortran
+
+inherit cmake-utils fortran-2 toolchain-funcs flag-o-matic
+
+DESCRIPTION="Parallel matrix preconditioners library"
+HOMEPAGE="http://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods";
+SRC_URI="${HOMEPAGE}/download/${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
+}

diff --git a/sci-libs/hypre/metadata.xml b/sci-libs/hypre/metadata.xml
index 3b6be146..48b9bd6 100644
--- a/sci-libs/hypre/metadata.xml
+++ b/sci-libs/hypre/metadata.xml
@@ -6,7 +6,14 @@
     <name>Gentoo Mathematics Project</name>
   </maintainer>
   <longdescription lang="en">
-  Hypre is a set of matrix preconditioning libraries to aid in the
-  solution of large systems of linear equations.
-</longdescription>
+    Hypre is a set of matrix preconditioning libraries to aid in the
+    solution of large systems of linear equations.
+  </longdescription>
+    <upstream>
+    <remote-id type="github">LLNL/hypre</remote-id>
+  </upstream>
+  <use>
+    <flag name="int64">Build the 64 bits integer library</flag>
+    <flag name="fei">Build the internal Finite Element Interface 
routines</flag>
+  </use>
 </pkgmetadata>

Reply via email to