Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 249493 | Differences between
and this patch

Collapse All | Expand All

(-)usr/portage/sci-physics/abinit/abinit-5.4.4.ebuild (-27 / +25 lines)
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 59-76 Link Here
59
}
48
}
60
49
61
src_compile() {
50
src_compile() {
51
	if use mpi; then
52
		MY_FC="mpif90"
53
		MY_CC="mpicc"
54
	else
55
		MY_FC="${FORTRANC}"
56
		MY_CC="$(tc-getCC)"
57
	fi
62
	econf \
58
	econf \
63
		--with-install-type=debian \
64
		--disable-config-file \
65
		--disable-library-search \
66
		$(use_enable mpi) \
59
		$(use_enable mpi) \
67
		--with-blas-prefix=/usr \
60
		$(use_enable netcdf) \
68
		--with-lapack-prefix=/usr \
61
		$(use_enable netcdf etsf-io) \
69
		--with-c-optflags="${CFLAGS}" \
62
		--with-netcdf-includes="-I/usr/include" \
70
		--with-fortran-optflags="${FFLAGS}" \
63
		--with-netcdf-libs="-L/usr/lib -lnetcdff" \
71
		--with-fortran-ldflags='-lpthread' \
64
		--with-etsf-io-includes="-I/usr/include" \
72
		FC="${FORTRANC}" \
65
		--with-etsf-io-libs="-L/usr/lib -letsf_io -letsf_io_low_level -letsf_io_utils" \
73
		CC="$(tc-getCC)" \
66
		--with-linalg-libs="-L/usr/lib -lblas -llapack" \
67
		--with-cc-optflags="${CFLAGS}" \
68
		--with-fc-optflags="${FFLAGS}" \
69
		--with-fc-ld-optlibs='-lpthread' \
70
		FC="${MY_FC}" \
71
		CC="${MY_CC}" \
74
		LD="$(tc-getLD)" \
72
		LD="$(tc-getLD)" \
75
		|| die "configure failed"
73
		|| die "configure failed"
76
74

Return to bug 249493