aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSamuel John2013-01-09 19:13:54 +0100
committerJack Nagel2013-01-10 16:02:07 -0600
commite13842ac4764ec424dd52eec23108ff626a4a98c (patch)
treeb2f484d7ebc4d9c3e40bfd1b31da25dd5b424e25 /Library
parentb2d94692f682e4cca50f9bf4825ee0c509f79ed8 (diff)
downloadhomebrew-e13842ac4764ec424dd52eec23108ff626a4a98c.tar.bz2
Make MPIRequirement satisfied on Xcode-only Macs
Closes #16409. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/requirements.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb
index a7bc9c45d..d452ae452 100644
--- a/Library/Homebrew/requirements.rb
+++ b/Library/Homebrew/requirements.rb
@@ -124,6 +124,11 @@ class MPIDependency < Requirement
end
def satisfied?
+ # we have to assure the ENV is (almost) as during the build
+ orig_PATH = ENV['PATH']
+ require 'superenv'
+ ENV.setup_build_environment
+ ENV.userpaths!
@lang_list.each do |lang|
case lang
when :cc, :cxx, :f90, :f77
@@ -134,6 +139,9 @@ class MPIDependency < Requirement
end
end
+ # Restore the original paths
+ ENV['PATH'] = orig_PATH
+
@unknown_langs.empty? and @non_functional.empty?
end