aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements.rb
diff options
context:
space:
mode:
authorJack Nagel2013-01-19 20:45:57 -0600
committerJack Nagel2013-01-21 17:24:10 -0600
commit3270fd2cd94e6ca637bbae5f2acfc9c1824d76e2 (patch)
tree6bcf99f0ffd48e0563e74b0e67665a7df47c6a7d /Library/Homebrew/requirements.rb
parent05fedd5c98f687b6cf95935a06d4660821d2ad2b (diff)
downloadhomebrew-3270fd2cd94e6ca637bbae5f2acfc9c1824d76e2.tar.bz2
ENV.with_build_environment
Diffstat (limited to 'Library/Homebrew/requirements.rb')
-rw-r--r--Library/Homebrew/requirements.rb25
1 files changed, 11 insertions, 14 deletions
diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb
index ffb03cb37..b5d920bab 100644
--- a/Library/Homebrew/requirements.rb
+++ b/Library/Homebrew/requirements.rb
@@ -125,23 +125,20 @@ class MPIDependency < Requirement
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
- compiler = 'mpi' + lang.to_s
- @non_functional << compiler unless mpi_wrapper_works? compiler
- else
- @unknown_langs << lang.to_s
+ ENV.with_build_environment do
+ ENV.userpaths!
+
+ @lang_list.each do |lang|
+ case lang
+ when :cc, :cxx, :f90, :f77
+ compiler = 'mpi' + lang.to_s
+ @non_functional << compiler unless mpi_wrapper_works? compiler
+ else
+ @unknown_langs << lang.to_s
+ end
end
end
-
- # Restore the original paths
- ENV['PATH'] = orig_PATH
-
@unknown_langs.empty? and @non_functional.empty?
end