From 3825535310233ffe75eff39839d4f391940731e3 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 16 Mar 2010 20:58:12 -0700 Subject: [PATCH] Move recommended compiler versions into constants. --- Library/Homebrew/global.rb | 5 +++++ bin/brew | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 4e8ae28109..c1c4df8075 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -38,6 +38,11 @@ MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_ HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})" +RECOMMENDED_LLVM = 2206 +RECOMMENDED_GCC_40 = 5493 +RECOMMENDED_GCC_42 = (MACOS_VERSION >= 10.6) ? 5646 : 5577 + + class ExecutionError = 10.6 - opoo "You should upgrade to Xcode 3.2.1" if llvm_build < 2206 + opoo "You should upgrade to Xcode 3.2.1" if llvm_build < RECOMMENDED_LLVM else - opoo "You should upgrade to Xcode 3.1.4" if (gcc_40_build < 5493) or (gcc_42_build < 5577) + opoo "You should upgrade to Xcode 3.1.4" if (gcc_40_build < RECOMMENDED_GCC_40) or (gcc_42_build < RECOMMENDED_GCC_42) end rescue # the reason we don't abort is some formula don't require Xcode