diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2006-06-05 06:56:08 +0000 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2006-06-05 06:56:08 +0000 |
commit | a613991dfb4ff67d272500105902f2cc38c0787c (patch) | |
tree | e950336324aa0ed7d431021ee5a91c8bcc260bb8 | |
parent | Added git overlay support to layman (contributed by genstef@gentoo.org). (diff) | |
download | historical-a613991dfb4ff67d272500105902f2cc38c0787c.tar.gz historical-a613991dfb4ff67d272500105902f2cc38c0787c.tar.bz2 historical-a613991dfb4ff67d272500105902f2cc38c0787c.zip |
Fix the case where neither gfortran nor g77 will compile a package -- fall back to the first valid compiler in AVAILABLE.
-rw-r--r-- | eclass/fortran.eclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/fortran.eclass b/eclass/fortran.eclass index 01e812038208..e883343ba864 100644 --- a/eclass/fortran.eclass +++ b/eclass/fortran.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/fortran.eclass,v 1.14 2006/04/28 01:20:27 spyderous Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/fortran.eclass,v 1.15 2006/06/05 06:56:08 spyderous Exp $ # # Author: Danny van Dyk <kugelfang@gentoo.org> # @@ -130,8 +130,14 @@ need_fortran() { use debug && echo "MY_FORTRAN: \"${MY_FORTRAN}\"" if hasq gfortran ${AVAILABLE}; then MY_FORTRAN=${MY_FORTRAN:=gfortran} - else + elif hasq g77 ${AVAILABLE}; then MY_FORTRAN=${MY_FORTRAN:=g77} + else + # Default to the first valid Fortran compiler + for i in ${AVAILABLE}; do + MY_FORTRAN=$i + break + done fi use debug && echo "MY_FORTRAN: \"${MY_FORTRAN}\"" |