aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat/fails_with_llvm.rb
diff options
context:
space:
mode:
authorJack Nagel2013-05-09 23:53:26 -0500
committerJack Nagel2013-05-10 23:27:28 -0500
commit3be67f72523b55486cad2bd2fa0f6c79b23c82a4 (patch)
tree7a8b3ea8b9cdfe3f735821a73438c713be31af8b /Library/Homebrew/compat/fails_with_llvm.rb
parent290a93ea758488486e02ff063a28b57117501c07 (diff)
downloadbrew-3be67f72523b55486cad2bd2fa0f6c79b23c82a4.tar.bz2
Reorganize compat
Diffstat (limited to 'Library/Homebrew/compat/fails_with_llvm.rb')
-rw-r--r--Library/Homebrew/compat/fails_with_llvm.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/fails_with_llvm.rb b/Library/Homebrew/compat/fails_with_llvm.rb
new file mode 100644
index 000000000..19338ceb5
--- /dev/null
+++ b/Library/Homebrew/compat/fails_with_llvm.rb
@@ -0,0 +1,17 @@
+class Formula
+ def fails_with_llvm msg=nil, data=nil
+ opoo "Calling fails_with_llvm in the install method is deprecated"
+ puts "Use the fails_with DSL instead"
+ end
+
+ def fails_with_llvm?
+ fails_with? :llvm
+ end
+
+ def self.fails_with_llvm msg=nil, data={}
+ case msg when Hash then data = msg end
+ failure = CompilerFailure.new(:llvm) { build(data.delete(:build).to_i) }
+ @cc_failures ||= Set.new
+ @cc_failures << failure
+ end
+end