From 2712dd6bccea139f722ac113b2f8e85913a34d6a Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 5 Nov 2010 07:01:00 -0700 Subject: [PATCH] brew-doctor - check for another stray ENV var Having $MACOSX_DEPLOYMENT_TARGET (for Fink) to something other than the current system SDK will cause Git to fail to compile (when building the Python bindings). --- Library/Homebrew/brew_doctor.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb index ef89fa7e84..b26cd4f5d5 100644 --- a/Library/Homebrew/brew_doctor.rb +++ b/Library/Homebrew/brew_doctor.rb @@ -568,6 +568,21 @@ def check_for_linked_kegonly_brews end end +def check_for_other_vars + target_var = ENV['MACOSX_DEPLOYMENT_TARGET'] + return if target_var.nil? or target_var.empty? + + unless target_var == MACOS_VERSION.to_s + puts <<-EOS.undent + $MACOSX_DEPLOYMENT_TARGET was set to #{target_var} + This is used by Fink, but having it set to a value different from the + current system version (#{MACOS_VERSION}) can cause problems, compiling + Git for instance, and should probably be removed. + + EOS + end +end + def brew_doctor read, write = IO.pipe @@ -595,6 +610,7 @@ def brew_doctor check_for_gettext check_for_config_scripts check_for_dyld_vars + check_for_other_vars check_for_symlinked_cellar check_for_multiple_volumes check_for_git