/[gentoo-x86]/sci-libs/hypre/hypre-2.9.0b.ebuild
Gentoo

Contents of /sci-libs/hypre/hypre-2.9.0b.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Mon Jun 9 03:17:04 2014 UTC (6 years, 1 month ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +9 -24 lines
Fixed underlinking (bug #493222) and enabling MPI (bug #508030) thanks Matthias Maier

(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 bicatali 1.3 # Copyright 1999-2014 Gentoo Foundation
2 bicatali 1.1 # Distributed under the terms of the GNU General Public License v2
3 bicatali 1.4 # $Header: /var/cvsroot/gentoo-x86/sci-libs/hypre/hypre-2.9.0b.ebuild,v 1.3 2014/04/22 17:27:16 bicatali Exp $
4 bicatali 1.1
5     EAPI=5
6    
7     FORTRAN_NEEDED=fortran
8    
9     inherit eutils fortran-2 toolchain-funcs
10    
11     DESCRIPTION="Parallel matrix preconditioners library"
12     HOMEPAGE="http://acts.nersc.gov/hypre/"
13     SRC_URI="https://computation.llnl.gov/casc/hypre/download/${P}.tar.gz"
14    
15     LICENSE="LGPL-2.1"
16     SLOT="0/${PV}"
17     KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18 bicatali 1.4 IUSE="doc examples fortran mpi"
19 bicatali 1.3
20 bicatali 1.1 RDEPEND="
21 bicatali 1.3 sci-libs/superlu:0=
22 bicatali 1.4 virtual/blas
23     virtual/lapack
24 bicatali 1.1 mpi? ( virtual/mpi )"
25     DEPEND="${RDEPEND}
26     virtual/pkgconfig"
27    
28     DOCS=( "${WORKDIR}"/${P}/{CHANGELOG,COPYRIGHT,README} )
29    
30     S="${WORKDIR}/${P}/src"
31    
32     src_prepare() {
33     # link with system superlu and propagate LDFLAGS
34     sed -i \
35     -e 's:@LIBS@:@LIBS@ -lsuperlu:' \
36     -e 's:_SHARED@:_SHARED@ $(LDFLAGS):g' \
37     config/Makefile.config.in || die
38     sed -i \
39     -e '/HYPRE_ARCH/s: = :=:g' \
40     configure || die
41     # link with system blas and lapack
42     sed -i \
43     -e '/^BLASFILES/d' \
44     -e '/^LAPACKFILES/d' \
45     lib/Makefile || die
46 bicatali 1.3 use mpi && export CC=mpicc CXX=mpicxx FC=mpif77
47 jlec 1.2 tc-export CC CXX
48 bicatali 1.1 }
49    
50     src_configure() {
51 bicatali 1.4 local myeconfargs=(
52 bicatali 1.1 --enable-shared
53     --without-superlu
54 bicatali 1.4 --with-blas-libs="$($(tc-getPKG_CONFIG) --libs-only-l blas | sed -e 's/-l//g')"
55     --with-blas-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L blas | sed -e 's/-L//g')"
56     --with-lapack-libs="$($(tc-getPKG_CONFIG) --libs-only-l lapack | sed -e 's/-l//g')"
57     --with-lapack-lib-dirs="$($(tc-getPKG_CONFIG) --libs-only-L lapack | sed -e 's/-L//g')"
58 bicatali 1.1 $(use_enable fortran)
59     $(use_with mpi MPI)
60     )
61     econf "${myeconfargs[@]}"
62     }
63    
64     src_install() {
65     dolib.so hypre/lib/lib*
66     insinto /usr/include/hypre
67     doins -r hypre/include/*
68    
69     use doc && dodoc "${WORKDIR}"/${P}/docs/*.pdf
70     if use examples; then
71     insinto /usr/share/doc/${PF}
72     doins -r examples
73     fi
74     }

  ViewVC Help
Powered by ViewVC 1.1.20