summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <spyderous@gentoo.org>2006-06-05 06:56:08 +0000
committerDonnie Berkholz <spyderous@gentoo.org>2006-06-05 06:56:08 +0000
commit0226b804d6756227150ec8ba8be93e8fdd0c704d (patch)
treed401342bc4fb09d32c605f250f51f9b94663af51 /eclass/fortran.eclass
parentAdded git overlay support to layman (contributed by genstef@gentoo.org). (diff)
downloadgentoo-2-0226b804d6756227150ec8ba8be93e8fdd0c704d.tar.gz
gentoo-2-0226b804d6756227150ec8ba8be93e8fdd0c704d.tar.bz2
gentoo-2-0226b804d6756227150ec8ba8be93e8fdd0c704d.zip
Fix the case where neither gfortran nor g77 will compile a package -- fall back to the first valid compiler in AVAILABLE.
Diffstat (limited to 'eclass/fortran.eclass')
-rw-r--r--eclass/fortran.eclass10
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}\""