Lines 1-6
Link Here
|
1 |
# Copyright 1999-2008 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sci-physics/abinit/abinit-5.4.4.ebuild,v 1.1 2008/07/05 01:10:36 dberkholz Exp $ |
|
|
4 |
|
3 |
|
5 |
inherit fortran toolchain-funcs |
4 |
inherit fortran toolchain-funcs |
6 |
|
5 |
|
Lines 11-24
Link Here
|
11 |
LICENSE="GPL-2" |
10 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
11 |
SLOT="0" |
13 |
KEYWORDS="~amd64 ~ppc ~x86" |
12 |
KEYWORDS="~amd64 ~ppc ~x86" |
14 |
IUSE="mpi test" |
13 |
IUSE="mpi netcdf test" |
15 |
|
14 |
|
16 |
RDEPEND="virtual/blas |
15 |
RDEPEND="virtual/blas |
17 |
virtual/lapack" |
16 |
virtual/lapack |
|
|
17 |
mpi? ( virtual/mpi ) |
18 |
netcdf? ( sci-libs/netcdf )" |
18 |
DEPEND="${RDEPEND}" |
19 |
DEPEND="${RDEPEND}" |
19 |
|
20 |
|
20 |
# F90 code, g77 won't work |
21 |
# F90 code, g77 won't work |
21 |
FORTRAN="gfortran ifc" |
22 |
FORTRAN="gfortran ifc mpif90" |
22 |
|
23 |
|
23 |
pkg_setup() { |
24 |
pkg_setup() { |
24 |
fortran_pkg_setup |
25 |
fortran_pkg_setup |
Lines 37-54
Link Here
|
37 |
unpack ${A} |
38 |
unpack ${A} |
38 |
cd "${S}" |
39 |
cd "${S}" |
39 |
epatch "${FILESDIR}"/5.3.4-change-default-directories.patch |
40 |
epatch "${FILESDIR}"/5.3.4-change-default-directories.patch |
40 |
epatch "${FILESDIR}"/5.2.3-fix-64bit-detection.patch |
|
|
41 |
|
42 |
# bug #223111: Our eautoreconf directory detection breaks |
43 |
sed -i -e "s:@abinit_srcdir@/::" Makefile.am |
44 |
|
45 |
# bug #223111: libtool 2.2 fix (taken from bug #230271) |
46 |
if [ -f '/usr/share/aclocal/ltsugar.m4' ]; then |
47 |
cat "/usr/share/aclocal/ltsugar.m4" >> config/m4/libtool.m4 |
48 |
cat "/usr/share/aclocal/ltversion.m4" >> config/m4/libtool.m4 |
49 |
cat "/usr/share/aclocal/lt~obsolete.m4" >> config/m4/libtool.m4 |
50 |
cat "/usr/share/aclocal/ltoptions.m4" >> config/m4/libtool.m4 |
51 |
fi |
52 |
|
41 |
|
53 |
# Yea for breaking compatibility with no ChangeLog entry in 2.60 |
42 |
# Yea for breaking compatibility with no ChangeLog entry in 2.60 |
54 |
if has_version '>=sys-devel/autoconf-2.60'; then |
43 |
if has_version '>=sys-devel/autoconf-2.60'; then |
Lines 60-80
Link Here
|
60 |
|
49 |
|
61 |
src_compile() { |
50 |
src_compile() { |
62 |
econf \ |
51 |
econf \ |
63 |
--with-install-type=debian \ |
|
|
64 |
--disable-config-file \ |
65 |
--disable-library-search \ |
66 |
$(use_enable mpi) \ |
52 |
$(use_enable mpi) \ |
67 |
--with-blas-prefix=/usr \ |
53 |
$(use_enable netcdf) \ |
68 |
--with-lapack-prefix=/usr \ |
54 |
$(use_enable netcdf etsf-io) \ |
69 |
--with-c-optflags="${CFLAGS}" \ |
55 |
--with-netcdf-includes="-I/usr/include" \ |
70 |
--with-fortran-optflags="${FFLAGS}" \ |
56 |
--with-netcdf-libs="-L/usr/lib -lnetcdff" \ |
71 |
--with-fortran-ldflags='-lpthread' \ |
57 |
--with-etsf-io-includes="-I/usr/include" \ |
|
|
58 |
--with-etsf-io-libs="-L/usr/lib -letsf_io -letsf_io_low_level -letsf_io_utils" \ |
59 |
--with-linalg-libs="-L/usr/lib -lblas -llapack" \ |
60 |
--with-cc-optflags="${CFLAGS}" \ |
61 |
--with-fc-optflags="${FFLAGS}" \ |
62 |
--with-fc-ld-optlibs='-lpthread' \ |
72 |
FC="${FORTRANC}" \ |
63 |
FC="${FORTRANC}" \ |
73 |
CC="$(tc-getCC)" \ |
64 |
CC="$(tc-getCC)" \ |
74 |
LD="$(tc-getLD)" \ |
65 |
LD="$(tc-getLD)" \ |
75 |
|| die "configure failed" |
66 |
|| die "configure failed" |
76 |
|
67 |
|
77 |
emake || die "make failed" |
68 |
if use mpi; then |
|
|
69 |
emake multi || die "make multi failed" |
70 |
else |
71 |
emake || die "make failed" |
72 |
fi |
78 |
} |
73 |
} |
79 |
|
74 |
|
80 |
src_test() { |
75 |
src_test() { |