aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorAdam Vandenberg2010-09-22 08:12:03 -0700
committerAdam Vandenberg2010-09-29 21:53:05 -0700
commit18f9969b65d3a9a39ae721c1d967d596b7aef898 (patch)
tree10be5f44488632c99824eb3c743d06c9665d50f0 /Library/Homebrew
parent76dcc1929b0e651ef4807695457a355d74c77840 (diff)
downloadbrew-18f9969b65d3a9a39ae721c1d967d596b7aef898.tar.bz2
Add formula name to LLVM warning
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formula.rb42
1 files changed, 21 insertions, 21 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 8eac1fc27..f8298624c 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -217,6 +217,27 @@ class Formula
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -Wno-dev"
end
+ def fails_with_llvm msg="", data=nil
+ return unless (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
+
+ build = data.delete :build rescue nil
+ msg = "(No specific reason was given)" if msg.empty?
+
+ opoo "LLVM was requested, but this formula is reported as not working with LLVM:"
+ puts msg
+ puts "Tested with LLVM build #{build}" unless build == nil
+ puts
+
+ if ARGV.force?
+ puts "Continuing anyway. If this works, let us know so we can update the\n"+
+ "formula to remove the warning."
+ else
+ puts "Continuing with GCC 4.2 instead.\n"+
+ "(Use `brew install --force #{name}` to force use of LLVM.)"
+ ENV.gcc_4_2
+ end
+ end
+
def self.class_s name
#remove invalid characters and then camelcase it
name.capitalize.gsub(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase } \
@@ -281,27 +302,6 @@ class Formula
self.class.external_deps
end
- def fails_with_llvm msg="", data=nil
- return unless (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
-
- build = data.delete :build rescue nil
- msg = "(No specific reason was given)" if msg.empty?
-
- opoo "LLVM was requested, but this formula is reported as not working with LLVM:"
- puts msg
- puts "Tested with LLVM build #{build}" unless build == nil
- puts
-
- if ARGV.force?
- puts "Continuing anyway. If this works, let us know so we can update the\n"+
- "formula to remove the warning."
- else
- puts "Continuing with GCC 4.2 instead.\n"+
- "(Use `brew install --force ...` to force use of LLVM.)"
- ENV.gcc_4_2
- end
- end
-
protected
# Pretty titles the command and buffers stdout/stderr
# Throws if there's an error