diff options
| author | Jack Nagel | 2013-08-30 16:27:31 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-08-30 16:30:34 -0500 |
| commit | fd9bff9ac69dbcc1d267f6bba2befb12da67c09e (patch) | |
| tree | 78efbec25e816a2085933aaa9e2e489ad30aa7ad /Library | |
| parent | edee235587623f9c625362136812adcbb3a83c81 (diff) | |
| download | homebrew-fd9bff9ac69dbcc1d267f6bba2befb12da67c09e.tar.bz2 | |
Remove PATH hack from ENV.fortran
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/ENV/shared.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 46c9eb0ca..0480058b2 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -112,10 +112,6 @@ module SharedEnvExtension end def fortran - # superenv removes these PATHs, but this option needs them - # TODO fix better, probably by making a super-fc - self['PATH'] += ":#{HOMEBREW_PREFIX}/bin:/usr/local/bin" - if self['FC'] ohai "Building with an alternative Fortran compiler" puts "This is unsupported." @@ -138,11 +134,10 @@ module SharedEnvExtension EOS end - elsif which 'gfortran' + elsif (gfortran = which('gfortran', ORIGINAL_PATHS.join(File::PATH_SEPARATOR))) ohai "Using Homebrew-provided fortran compiler." puts "This may be changed by setting the FC environment variable." - self['FC'] = which 'gfortran' - self['F77'] = self['FC'] + self['FC'] = self['F77'] = gfortran FC_FLAG_VARS.each {|key| self[key] = cflags} set_cpu_flags(FC_FLAG_VARS) |
