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 39-55
Link Here
|
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 |
epatch "${FILESDIR}"/5.2.3-fix-64bit-detection.patch |
41 |
|
42 |
|
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 |
|
53 |
# Yea for breaking compatibility with no ChangeLog entry in 2.60 |
43 |
# Yea for breaking compatibility with no ChangeLog entry in 2.60 |
54 |
if has_version '>=sys-devel/autoconf-2.60'; then |
44 |
if has_version '>=sys-devel/autoconf-2.60'; then |
55 |
sed -i -e "s:_AC_SRCPATHS:_AC_SRCDIRS:g" config/m4/init.m4 |
45 |
sed -i -e "s:_AC_SRCPATHS:_AC_SRCDIRS:g" config/m4/init.m4 |
Lines 59-76
Link Here
|
59 |
} |
49 |
} |
60 |
|
50 |
|
61 |
src_compile() { |
51 |
src_compile() { |
|
|
52 |
if use mpi; then |
53 |
MY_FC="mpif90" |
54 |
MY_CC="mpicc" |
55 |
else |
56 |
MY_FC="${FORTRANC}" |
57 |
MY_CC="$(tc-getCC)" |
58 |
fi |
62 |
econf \ |
59 |
econf \ |
63 |
--with-install-type=debian \ |
|
|
64 |
--disable-config-file \ |
65 |
--disable-library-search \ |
66 |
$(use_enable mpi) \ |
60 |
$(use_enable mpi) \ |
67 |
--with-blas-prefix=/usr \ |
61 |
$(use_enable netcdf) \ |
68 |
--with-lapack-prefix=/usr \ |
62 |
$(use_enable netcdf etsf-io) \ |
69 |
--with-c-optflags="${CFLAGS}" \ |
63 |
--with-netcdf-includes="-I/usr/include" \ |
70 |
--with-fortran-optflags="${FFLAGS}" \ |
64 |
--with-netcdf-libs="-L/usr/lib -lnetcdff" \ |
71 |
--with-fortran-ldflags='-lpthread' \ |
65 |
--with-linalg-libs="-L/usr/lib -lblas -llapack" \ |
72 |
FC="${FORTRANC}" \ |
66 |
--with-cc-optflags="${CFLAGS}" \ |
73 |
CC="$(tc-getCC)" \ |
67 |
--with-fc-optflags="${FFLAGS}" \ |
|
|
68 |
--with-fc-ld-optlibs='-lpthread' \ |
69 |
FC="${MY_FC}" \ |
70 |
CC="${MY_CC}" \ |
74 |
LD="$(tc-getLD)" \ |
71 |
LD="$(tc-getLD)" \ |
75 |
|| die "configure failed" |
72 |
|| die "configure failed" |
76 |
|
73 |
|