Skip to content
This repository
Browse code

Use new fails_with DSL syntax

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
commit 497b13ac9e088ef2bb9539f0a25ba944c87c6f26 1 parent b36f59d
Jack Nagel authored March 18, 2012

Showing 101 changed files with 402 additions and 180 deletions. Show diff stats Hide diff stats

  1. 5  Library/Formula/aspell.rb
  2. 10  Library/Formula/bali-phy.rb
  3. 10  Library/Formula/blast.rb
  4. 7  Library/Formula/boost.rb
  5. 9  Library/Formula/bwm-ng.rb
  6. 5  Library/Formula/cairo.rb
  7. 5  Library/Formula/cdargs.rb
  8. 7  Library/Formula/cdparanoia.rb
  9. 5  Library/Formula/cdrdao.rb
  10. 5  Library/Formula/celt.rb
  11. 4  Library/Formula/chicken.rb
  12. 5  Library/Formula/clisp.rb
  13. 6  Library/Formula/ctags.rb
  14. 4  Library/Formula/dcmtk.rb
  15. 4  Library/Formula/dirac.rb
  16. 10  Library/Formula/dpkg.rb
  17. 6  Library/Formula/elinks.rb
  18. 13  Library/Formula/emacs.rb
  19. 18  Library/Formula/erlang.rb
  20. 20  Library/Formula/ffmpeg.rb
  21. 5  Library/Formula/flac.rb
  22. 5  Library/Formula/fontforge.rb
  23. 4  Library/Formula/fox.rb
  24. 5  Library/Formula/gambit-scheme.rb
  25. 5  Library/Formula/gawk.rb
  26. 5  Library/Formula/gd.rb
  27. 8  Library/Formula/ghc.rb
  28. 5  Library/Formula/glib.rb
  29. 5  Library/Formula/gnome-doc-utils.rb
  30. 5  Library/Formula/gnu-smalltalk.rb
  31. 5  Library/Formula/gnutls.rb
  32. 5  Library/Formula/google-perftools.rb
  33. 4  Library/Formula/gpgme.rb
  34. 2  Library/Formula/graphicsmagick.rb
  35. 8  Library/Formula/graphviz.rb
  36. 5  Library/Formula/gtk+.rb
  37. 5  Library/Formula/guile.rb
  38. 5  Library/Formula/id3lib.rb
  39. 7  Library/Formula/jasper.rb
  40. 6  Library/Formula/john.rb
  41. 8  Library/Formula/kyoto-cabinet.rb
  42. 4  Library/Formula/libcaca.rb
  43. 5  Library/Formula/libevent.rb
  44. 5  Library/Formula/libexif.rb
  45. 9  Library/Formula/libkate.rb
  46. 7  Library/Formula/libsigsegv.rb
  47. 7  Library/Formula/libvirt.rb
  48. 5  Library/Formula/libxml2.rb
  49. 6  Library/Formula/log4cxx.rb
  50. 6  Library/Formula/lua.rb
  51. 4  Library/Formula/luarocks.rb
  52. 8  Library/Formula/minc.rb
  53. 10  Library/Formula/mkvtoolnix.rb
  54. 5  Library/Formula/monotone.rb
  55. 4  Library/Formula/mosh.rb
  56. 4  Library/Formula/mplayer.rb
  57. 4  Library/Formula/msgpack.rb
  58. 5  Library/Formula/mysql-connector-c.rb
  59. 5  Library/Formula/mysql.rb
  60. 4  Library/Formula/nload.rb
  61. 4  Library/Formula/nmap.rb
  62. 4  Library/Formula/node.rb
  63. 5  Library/Formula/pango.rb
  64. 10  Library/Formula/par2tbb.rb
  65. 4  Library/Formula/pbzip2.rb
  66. 5  Library/Formula/pcre.rb
  67. 6  Library/Formula/percona-server.rb
  68. 5  Library/Formula/pianobar.rb
  69. 9  Library/Formula/pixman.rb
  70. 4  Library/Formula/portaudio.rb
  71. 7  Library/Formula/povray.rb
  72. 4  Library/Formula/proj.rb
  73. 4  Library/Formula/protobuf.rb
  74. 4  Library/Formula/pv.rb
  75. 4  Library/Formula/qemu.rb
  76. 8  Library/Formula/qt.rb
  77. 5  Library/Formula/redis.rb
  78. 4  Library/Formula/redland.rb
  79. 6  Library/Formula/rtmpdump.rb
  80. 4  Library/Formula/rtorrent.rb
  81. 2  Library/Formula/ruby-enterprise-edition.rb
  82. 4  Library/Formula/ruby.rb
  83. 5  Library/Formula/rust.rb
  84. 5  Library/Formula/rxvt-unicode.rb
  85. 5  Library/Formula/sbcl.rb
  86. 4  Library/Formula/silk.rb
  87. 6  Library/Formula/sl.rb
  88. 6  Library/Formula/sphinx.rb
  89. 4  Library/Formula/spin.rb
  90. 5  Library/Formula/streamripper.rb
  91. 6  Library/Formula/swi-prolog.rb
  92. 4  Library/Formula/syck.rb
  93. 6  Library/Formula/tesseract.rb
  94. 4  Library/Formula/ufraw.rb
  95. 4  Library/Formula/unittest.rb
  96. 4  Library/Formula/vice.rb
  97. 4  Library/Formula/vpnc.rb
  98. 4  Library/Formula/w3m.rb
  99. 5  Library/Formula/wine.rb
  100. 4  Library/Formula/yaf.rb
  101. 8  Library/Formula/zeromq.rb
5  Library/Formula/aspell.rb
@@ -14,7 +14,10 @@ class Aspell < Formula
14 14
   homepage 'http://aspell.net/'
15 15
   md5 'e66a9c9af6a60dc46134fdacf6ce97d7'
16 16
 
17  
-  fails_with_llvm "Segmentation fault during linking.", :build => 2334
  17
+  fails_with :llvm do
  18
+    build 2334
  19
+    cause "Segmentation fault during linking."
  20
+  end
18 21
 
19 22
   def options
20 23
     [
10  Library/Formula/bali-phy.rb
@@ -7,9 +7,13 @@ class BaliPhy < Formula
7 7
 
8 8
   depends_on 'gsl'
9 9
 
10  
-# fails_with_clang
11  
-#     io.H:25:31: error: use of undeclared identifier 'push_back'
12  
-#       void operator()(const T& t){push_back(t);}
  10
+  fails_with :clang do
  11
+    build 318
  12
+    cause <<-EOS.undent
  13
+      io.H:25:31: error: use of undeclared identifier 'push_back'
  14
+      void operator()(const T& t){push_back(t);}
  15
+      EOS
  16
+  end
13 17
 
14 18
   def install
15 19
     mkdir 'macbuild' do
10  Library/Formula/blast.rb
@@ -6,6 +6,10 @@ class Blast < Formula
6 6
   version '2.2.25'
7 7
   md5 '01256b808e3af49a5087945b6a8c8293'
8 8
 
  9
+  fails_with :clang do
  10
+    build 318
  11
+  end
  12
+
9 13
   def options
10 14
     [['--with-dll', "Create dynamic binaries instead of static"]]
11 15
   end
@@ -17,12 +21,6 @@ def patches
17 21
   end
18 22
 
19 23
   def install
20  
-    # FIXME This should be replaced with fails_with_clang once available
21  
-    if ENV.compiler == :clang
22  
-      opoo "Formula will not build with Clang, using LLVM."
23  
-      ENV.llvm
24  
-    end
25  
-
26 24
     args = ["--prefix=#{prefix}"]
27 25
     args << "--with-dll" if ARGV.include? '--with-dll'
28 26
 
7  Library/Formula/boost.rb
@@ -14,9 +14,10 @@ class Boost < Formula
14 14
 
15 15
   depends_on "icu4c" if ARGV.include? "--with-icu"
16 16
 
17  
-  # Both clang and llvm-gcc provided by XCode 4.1 compile Boost 1.47.0 properly.
18  
-  # Moreover, Apple LLVM compiler 2.1 is now among primary test compilers.
19  
-  fails_with_llvm "Dropped arguments to functions when linking with boost", :build => 2335
  17
+  fails_with :llvm do
  18
+    build 2335
  19
+    cause "Dropped arguments to functions when linking with boost"
  20
+  end
20 21
 
21 22
   def options
22 23
     [
9  Library/Formula/bwm-ng.rb
@@ -5,12 +5,11 @@ class BwmNg < Formula
5 5
   homepage 'http://www.gropp.org/?id=projects&sub=bwm-ng'
6 6
   md5 'd3a02484fb7946371bfb4e10927cebfb'
7 7
 
8  
-  def install
9  
-    if MacOS.default_compiler == :clang
10  
-      # auto-retest next clang version, submit patch if fails!
11  
-      ENV.llvm if MacOS.clang_version.to_f <= 3.1
12  
-    end
  8
+  fails_with :clang do
  9
+    build 318
  10
+  end
13 11
 
  12
+  def install
14 13
     system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
15 14
     system "make install"
16 15
   end
5  Library/Formula/cairo.rb
@@ -11,7 +11,10 @@ class Cairo < Formula
11 11
   keg_only :provided_by_osx,
12 12
             "The Cairo provided by Leopard is too old for newer software to link against."
13 13
 
14  
-  fails_with_llvm "Throws an 'lto could not merge' error during build.", :build => 2336
  14
+  fails_with :llvm do
  15
+    build 2336
  16
+    cause "Throws an 'lto could not merge' error during build."
  17
+  end
15 18
 
16 19
   def install
17 20
     args = %W[
5  Library/Formula/cdargs.rb
@@ -5,7 +5,10 @@ class Cdargs < Formula
5 5
   url 'http://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz'
6 6
   md5 '50be618d67f0b9f2439526193c69c567'
7 7
 
8  
-  fails_with_llvm "Bus error in ld on SL 10.6.4", :build => 2334
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+    cause "Bus error in ld on SL 10.6.4"
  11
+  end
9 12
 
10 13
   # fixes zsh usage using the patch provided at the cdargs homepage
11 14
   # (See http://www.skamphausen.de/cgi-bin/ska/CDargs)
7  Library/Formula/cdparanoia.rb
@@ -5,6 +5,11 @@ class Cdparanoia < Formula
5 5
   homepage 'http://www.xiph.org/paranoia/'
6 6
   md5 'b304bbe8ab63373924a744eac9ebc652'
7 7
 
  8
+  fails_with :llvm do
  9
+    build 2326
  10
+    cause '"File too small" error while linking'
  11
+  end
  12
+
8 13
   def patches
9 14
     [
10 15
      "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch",
@@ -12,8 +17,6 @@ def patches
12 17
     ]
13 18
   end
14 19
 
15  
-  fails_with_llvm '"File too small" error while linking', :build => 2326
16  
-
17 20
   def install
18 21
     system "autoconf"
19 22
     # Libs are installed as keg-only because most software that searches for cdparanoia
5  Library/Formula/cdrdao.rb
@@ -11,7 +11,10 @@ class Cdrdao < Formula
11 11
   depends_on 'mad'
12 12
   depends_on 'lame'
13 13
 
14  
-  fails_with_llvm "Segfault while linking", :build => 2326
  14
+  fails_with :llvm do
  15
+    build 2326
  16
+    cause "Segfault while linking"
  17
+  end
15 18
 
16 19
   # first patch fixes build problems under 10.6
17 20
   # see http://sourceforge.net/tracker/index.php?func=detail&aid=2981804&group_id=2171&atid=302171
5  Library/Formula/celt.rb
@@ -7,7 +7,10 @@ class Celt < Formula
7 7
 
8 8
   depends_on 'libogg' => :optional
9 9
 
10  
-  fails_with_llvm "'make check' fails", :build => 2335
  10
+  fails_with :llvm do
  11
+    build 2335
  12
+    cause "'make check' fails"
  13
+  end
11 14
 
12 15
   def install
13 16
     system "./configure", "--disable-dependency-tracking",
4  Library/Formula/chicken.rb
@@ -6,7 +6,9 @@ class Chicken < Formula
6 6
   homepage 'http://www.call-cc.org/'
7 7
   head 'git://code.call-cc.org/chicken-core'
8 8
 
9  
-  fails_with_llvm "Compilation hangs. See http://lists.gnu.org/archive/html/chicken-users/2010-12/msg00158.html"
  9
+  fails_with :llvm do
  10
+    cause "Compilation hangs; see http://lists.gnu.org/archive/html/chicken-users/2010-12/msg00158.html"
  11
+  end
10 12
 
11 13
   def install
12 14
     ENV.deparallelize
5  Library/Formula/clisp.rb
@@ -11,7 +11,10 @@ class Clisp < Formula
11 11
 
12 12
   skip_clean :all # otherwise abort trap
13 13
 
14  
-  fails_with_llvm "Configure fails on XCode 4/Snow Leopard.", :build => 2334
  14
+  fails_with :llvm do
  15
+    build 2334
  16
+    cause "Configure fails on XCode 4/Snow Leopard."
  17
+  end
15 18
 
16 19
   def patches
17 20
     { :p0 => "https://trac.macports.org/export/89054/trunk/dports/lang/clisp/files/patch-src_lispbibl_d.diff",
6  Library/Formula/ctags.rb
@@ -7,8 +7,10 @@ class Ctags < Formula
7 7
 
8 8
   head 'https://ctags.svn.sourceforge.net/svnroot/ctags/trunk'
9 9
 
10  
-  # true for both 5.8 and head
11  
-  fails_with_llvm "Resulting executable generates erroneous tag files", :build => 2335
  10
+  fails_with :llvm do
  11
+    build 2335
  12
+    cause "Resulting executable generates erroneous tag files"
  13
+  end
12 14
 
13 15
   def install
14 16
     if ARGV.build_head?
4  Library/Formula/dcmtk.rb
@@ -12,7 +12,9 @@ def options
12 12
     [['--with-docs', 'Install development libraries/headers and HTML docs']]
13 13
   end
14 14
 
15  
-  # fails_with_clang: https://github.com/mxcl/homebrew/issues/10884#issuecomment-4467514
  15
+  fails_with :clang do
  16
+    build 318
  17
+  end
16 18
 
17 19
   def install
18 20
     ENV.m64 if MacOS.prefer_64_bit?
4  Library/Formula/dirac.rb
@@ -5,7 +5,9 @@ class Dirac < Formula
5 5
   md5 'a57c2c5e58062d437d9ab13dffb28f0f'
6 6
   homepage 'http://diracvideo.org/'
7 7
 
8  
-  fails_with_llvm :build => 2334
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+  end
9 11
 
10 12
   def install
11 13
     # BSD cp doesn't have '-d'
10  Library/Formula/dpkg.rb
@@ -8,17 +8,15 @@ class Dpkg < Formula
8 8
   depends_on 'pkg-config' => :build
9 9
   depends_on 'gnu-tar'
10 10
 
  11
+  fails_with :clang do
  12
+    build 318
  13
+  end
  14
+
11 15
   # Fixes the PERL_LIBDIR.
12 16
   # Uses Homebrew-install gnu-tar instead of bsd tar.
13 17
   def patches; DATA; end
14 18
 
15 19
   def install
16  
-    # FIXME This should be replaced with fails_with_clang once available
17  
-    if ENV.compiler == :clang
18  
-      opoo "Formula will not build with Clang, using LLVM."
19  
-      ENV.llvm
20  
-    end
21  
-
22 20
     system "./configure", "--disable-dependency-tracking",
23 21
                           "--prefix=#{prefix}",
24 22
                           "--disable-compiler-warnings",
6  Library/Formula/elinks.rb
@@ -13,13 +13,15 @@ class Elinks < Formula
13  Library/Formula/emacs.rb
@@ -6,16 +6,19 @@ class Emacs < Formula
6 6
   mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.4.tar.bz2'
7 7
   md5 '070c68ad8e3c31fb3cb2414feaf5e6f0'
8 8
 
9  
-  fails_with_llvm "Duplicate symbol errors while linking.", :build => 2334
  9
+  if ARGV.include? "--use-git-head"
  10
+    head 'git://git.sv.gnu.org/emacs.git'
  11
+  else
  12
+    head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk'
  13
+  end
10 14
 
11 15
   # Stripping on Xcode 4 causes malformed object errors.
12 16
   # Just skip everything.
13 17
   skip_clean :all
14 18
 
15  
-  if ARGV.include? "--use-git-head"
16  
-    head 'git://git.sv.gnu.org/emacs.git'
17  
-  else
18  
-    head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk'
  19
+  fails_with :llvm do
  20
+    build 2334
  21
+    cause "Duplicate symbol errors while linking."
19 22
   end
20 23
 
21 24
   def options
18  Library/Formula/erlang.rb
@@ -43,6 +43,16 @@ class Erlang < Formula
43 43
   # may as well skip bin too, everything is just shell scripts
44 44
   skip_clean ['lib', 'bin']
45 45
 
  46
+  if MacOS.xcode_version >= "4.3"
  47
+    # remove the autoreconf if possible
  48
+    depends_on "automake" => :build
  49
+    depends_on "libtool" => :build
  50
+  end
  51
+
  52
+  fails_with :llvm do
  53
+    build 2334
  54
+  end
  55
+
46 56
   def options
47 57
     [
48 58
       ['--disable-hipe', "Disable building hipe; fails on various OS X systems."],
@@ -52,14 +62,6 @@ def options
52 62
     ]
53 63
   end
54 64
 
55  
-  fails_with_llvm :build => 2334
56  
-
57  
-  if MacOS.xcode_version >= "4.3"
58  
-    # remove the autoreconf if possible
59  
-    depends_on "automake" => :build
60  
-    depends_on "libtool" => :build
61  
-  end
62  
-
63 65
   def install
64 66
     ohai "Compilation takes a long time; use `brew install -v erlang` to see progress" unless ARGV.verbose?
65 67
 
20  Library/Formula/ffmpeg.rb
@@ -11,15 +11,6 @@ class Ffmpeg < Formula
11 11
 
12 12
   head 'git://git.videolan.org/ffmpeg.git'
13 13
 
14  
-  fails_with_llvm 'Undefined symbols when linking libavfilter'
15  
-
16  
-  def options
17  
-    [
18  
-      ["--with-tools", "Install additional FFmpeg tools."],
19  
-      ["--with-ffplay", "Build ffplay."]
20  
-    ]
21  
-  end
22  
-
23 14
   depends_on 'yasm' => :build
24 15
   depends_on 'x264' => :optional
25 16
   depends_on 'faac' => :optional
@@ -35,6 +26,17 @@ def options
35 26
 
36 27
   depends_on 'sdl' if ffplay?
37 28
 
  29
+  fails_with :llvm do
  30
+    cause 'Undefined symbols when linking libavfilter'
  31
+  end
  32
+
  33
+  def options
  34
+    [
  35
+      ["--with-tools", "Install additional FFmpeg tools."],
  36
+      ["--with-ffplay", "Build ffplay."]
  37
+    ]
  38
+  end
  39
+
38 40
   def install
39 41
     ENV.x11
40 42
     args = ["--prefix=#{prefix}",
5  Library/Formula/flac.rb
@@ -13,7 +13,10 @@ class Flac < Formula
13 13
   depends_on 'lame'
14 14
   depends_on 'libogg' => :optional
15 15
 
16  
-  fails_with_llvm "Undefined symbols when linking", :build => 2326
  16
+  fails_with :llvm do
  17
+    build 2326
  18
+    cause "Undefined symbols when linking"
  19
+  end
17 20
 
18 21
   def install
19 22
     # sadly the asm optimisations won't compile since Leopard, and nobody
5  Library/Formula/fontforge.rb
@@ -15,7 +15,10 @@ def options
15 15
     [['--without-python', 'Build without Python.']]
16 16
   end
17 17
 
18  
-  fails_with_llvm "Compiling cvexportdlg.c fails with error: initializer element is not constant", :build => 2336
  18
+  fails_with :llvm do
  19
+    build 2336
  20
+    cause "Compiling cvexportdlg.c fails with error: initializer element is not constant"
  21
+  end
19 22
 
20 23
   def install
21 24
     args = ["--prefix=#{prefix}", "--enable-double", "--without-freetype-bytecode"]
4  Library/Formula/fox.rb
@@ -11,7 +11,9 @@ class Fox < Formula
11 11
     md5 '1cf2607d15ffad5b664cf65bfcd249bc'
12 12
   end
13 13
 
14  
-  fails_with_llvm "Inline asm errors during build" if ARGV.build_devel?
  14
+  fails_with :llvm do
  15
+    cause "Inline asm errors during build"
  16
+  end if ARGV.build_devel?
15 17
 
16 18
   def install
17 19
     ENV.x11
5  Library/Formula/gambit-scheme.rb
@@ -14,7 +14,10 @@ def options
14 14
 
15 15
   skip_clean :all
16 16
 
17  
-  fails_with_llvm "ld crashes during the build process or segfault at runtime", :build => 2335
  17
+  fails_with :llvm do
  18
+    build 2335
  19
+    cause "ld crashes during the build process or segfault at runtime"
  20
+  end
18 21
 
19 22
   def install
20 23
     args = ["--disable-debug",
5  Library/Formula/gawk.rb
@@ -8,7 +8,10 @@ class Gawk < Formula
8 8
 
9 9
   depends_on 'xz' => :build
10 10
 
11  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
  11
+  fails_with :llvm do
  12
+    build 2326
  13
+    cause "Undefined symbols when linking"
  14
+  end
12 15
 
13 16
   def install
14 17
     system "./configure", "--prefix=#{prefix}"
5  Library/Formula/gd.rb
@@ -10,7 +10,10 @@ class Gd < Formula
10 10
 
11 11
   depends_on 'jpeg' => :recommended
12 12
 
13  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
  13
+  fails_with :llvm do
  14
+    build 2326
  15
+    cause "Undefined symbols when linking"
  16
+  end
14 17
 
15 18
   def install
16 19
     ENV.x11
8  Library/Formula/ghc.rb
@@ -26,6 +26,14 @@ class Ghc < Formula
26 26
   # See: http://hackage.haskell.org/trac/ghc/ticket/2458
27 27
   skip_clean ['bin', 'lib']
28 28
 
  29
+  fails_with :clang do
  30
+    build 318
  31
+    cause <<-EOS.undent
  32
+      Building with Clang configures GHC to use Clang as its preprocessor,
  33
+      which causes subsequent GHC-based builds to fail.
  34
+      EOS
  35
+  end
  36
+
29 37
   def options
30 38
     [['--64bit', 'Install 64-bit version of GHC (experimental).']]
31 39
   end
5  Library/Formula/glib.rb
@@ -11,7 +11,10 @@ class Glib < Formula
11 11
   depends_on 'gettext'
12 12
   depends_on 'libffi'
13 13
 
14  
-  fails_with_llvm "Undefined symbol errors while linking", :build => 2334
  14
+  fails_with :llvm do
  15
+    build 2334
  16
+    cause "Undefined symbol errors while linking"
  17
+  end
15 18
 
16 19
   def patches
17 20
     { :p0 => %W[
5  Library/Formula/gnome-doc-utils.rb
@@ -15,7 +15,10 @@ class GnomeDocUtils < Formula
15 15
   # PYTHONPATH.
16 16
   depends_on 'libxml2'
17 17
 
18  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
  18
+  fails_with :llvm do
  19
+    build 2326
  20
+    cause "Undefined symbols when linking"
  21
+  end
19 22
 
20 23
   def install
21 24
     # TODO this should possibly be moved up into build.rb
5  Library/Formula/gnu-smalltalk.rb
@@ -27,7 +27,10 @@ class GnuSmalltalk < Formula
27 27
     depends_on "libtool" => :build
28 28
   end
29 29
 
30  
-  fails_with_llvm "Codegen problems with LLVM", :build => 2334
  30
+  fails_with :llvm do
  31
+    build 2334
  32
+    cause "Codegen problems with LLVM"
  33
+  end
31 34
 
32 35
   def patches
33 36
     # Builds GNU Smalltalk clean in 64-bit mode with SDL and Cairo support
5  Library/Formula/gnutls.rb
@@ -10,7 +10,10 @@ class Gnutls < Formula
10 10
   depends_on 'libgcrypt'
11 11
   depends_on 'libtasn1' => :optional
12 12
 
13  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
  13
+  fails_with :llvm do
  14
+    build 2326
  15
+    cause "Undefined symbols when linking"
  16
+  end
14 17
 
15 18
   def install
16 19
     ENV.universal_binary # build fat so wine can use it
5  Library/Formula/google-perftools.rb
@@ -5,7 +5,10 @@ class GooglePerftools < Formula
5 5
   homepage 'http://code.google.com/p/google-perftools/'
6 6
   sha1 '9490214967913bd579201a60a25320e316d731a5'
7 7
 
8  
-  fails_with_llvm "Segfault during linking", :build => 2326
  8
+  fails_with :llvm do
  9
+    build 2326
  10
+    cause "Segfault during linking"
  11
+  end
9 12
 
10 13
   def install
11 14
     ENV.append_to_cflags '-D_XOPEN_SOURCE'
4  Library/Formula/gpgme.rb
@@ -10,7 +10,9 @@ class Gpgme < Formula
10 10
   depends_on 'libassuan'
11 11
   depends_on 'pth'
12 12
 
13  
-  fails_with_llvm :build => 2334
  13
+  fails_with :llvm do
  14
+    build 2334
  15
+  end
14 16
 
15 17
   def install
16 18
     system "./configure", "--disable-dependency-tracking",
2  Library/Formula/graphicsmagick.rb
@@ -36,7 +36,7 @@ class Graphicsmagick < Formula
36 36
   depends_on 'ghostscript' => :recommended if ghostscript_srsly?
37 37
   depends_on 'xz' => :optional
38 38
 
39  
-  fails_with_llvm
  39
+  fails_with :llvm
40 40
 
41 41
   def skip_clean? path
42 42
     path.extname == '.la'
8  Library/Formula/graphviz.rb
@@ -13,7 +13,9 @@ class Graphviz < Formula
13 13
   depends_on 'pango' if ARGV.include? '--with-pangocairo'
14 14
   depends_on 'swig' if build_bindings?
15 15
 
16  
-  # fails_with_clang
  16
+  fails_with :clang do
  17
+    build 318
  18
+  end
17 19
 
18 20
   def options
19 21
     [["--with-pangocairo", "Build with Pango/Cairo for alternate PDF output"],
@@ -35,10 +37,6 @@ def install
35 37
     args << "--disable-swig" unless build_bindings?
36 38
     args << "--without-pangocairo" unless ARGV.include? '--with-pangocairo'
37 39
 
38  
-    # Compilation currently fails with the newer versions of clang
39  
-    # shipped with Xcode 4.3+
40  
-    ENV.llvm if MacOS.clang_version.to_f <= 3.1
41  
-
42 40
     system "./configure", *args
43 41
     system "make install"
44 42
 
5  Library/Formula/gtk+.rb
@@ -15,7 +15,10 @@ class Gtkx < Formula
15 15
   depends_on 'jasper' => :optional
16 16
   depends_on 'atk' => :optional
17 17
 
18  
-  fails_with_llvm "Undefined symbols when linking", :build => 2326
  18
+  fails_with :llvm do
  19
+    build 2326
  20
+    cause "Undefined symbols when linking"
  21
+  end
19 22
 
20 23
   def install
21 24
     system "./configure", "--disable-debug",
5  Library/Formula/guile.rb
@@ -21,7 +21,10 @@ class Guile < Formula
21 21
   # GNU Readline is required; libedit won't work.
22 22
   depends_on 'readline'
23 23
 
24  
-  fails_with_llvm "Segfaults during compilation.", :build => 2336
  24
+  fails_with :llvm do
  25
+    build 2336
  26
+    cause "Segfaults during compilation"
  27
+  end
25 28
 
26 29
   def install
27 30
     system "./configure", "--disable-dependency-tracking",
5  Library/Formula/id3lib.rb
@@ -13,7 +13,10 @@ def patches
13 13
     p << "https://trac.macports.org/export/90780/trunk/dports/audio/id3lib/files/id3lib-main.patch"
14 14
   end
15 15
 
16  
-  fails_with_llvm "Segfault during linking", :build => 2326
  16
+  fails_with :llvm do
  17
+    build 2326
  18
+    cause "Segfault during linking"
  19
+  end
17 20
 
18 21
   def install
19 22
     system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
7  Library/Formula/jasper.rb
@@ -7,6 +7,11 @@ class Jasper < Formula
7 7
 
8 8
   depends_on 'jpeg'
9 9
 
  10
+  fails_with :llvm do
  11
+    build 2326
  12
+    cause "Undefined symbols when linking"
  13
+  end
  14
+
10 15
   def options
11 16
     [["--universal", "Build a universal binary."]]
12 17
   end
@@ -17,8 +22,6 @@ def options
17 22
   # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469786
18 23
   def patches; DATA; end
19 24
 
20  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
21  
-
22 25
   def install
23 26
     ENV.universal_binary if ARGV.build_universal?
24 27
     system "./configure", "--disable-debug",
6  Library/Formula/john.rb
@@ -5,9 +5,11 @@ class John < Formula
5 5
   url 'http://www.openwall.com/john/g/john-1.7.9.tar.bz2'
6 6
   md5 '45f54fc59386ecd67daaef9f19781d93'
7 7
 
8  
-  def patches; DATA; end
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+  end
9 11
 
10  
-  fails_with_llvm :build => 2334
  12
+  def patches; DATA; end
11 13
 
12 14
   def install
13 15
     ENV.deparallelize
8  Library/Formula/kyoto-cabinet.rb
@@ -5,6 +5,14 @@ class KyotoCabinet < Formula
5 5
   url 'http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.74.tar.gz'
6 6
   sha1 '345358259ec4e58b5986b5d6fa8f82dfe2816c37'
7 7
 
  8
+  fails_with :clang do
  9
+    build 318
  10
+    cause <<-EOS.undent
  11
+      Kyoto-cabinet relies on GCC atomic intrinsics, but Clang does not
  12
+      implement them for non-integer types.
  13
+      EOS
  14
+  end
  15
+
8 16
   def install
9 17
     system "./configure", "--disable-debug", "--prefix=#{prefix}"
10 18
     system "make" # Separate steps required
4  Library/Formula/libcaca.rb
@@ -9,7 +9,9 @@ class Libcaca < Formula
9 9
   depends_on 'pkg-config' => :build
10 10
   depends_on 'gettext'
11 11
 
12  
-  fails_with_llvm "unsupported inline asm: input constraint with a matching output constraint of incompatible type!"
  12
+  fails_with :llvm do
  13
+    cause "Unsupported inline asm: input constraint with a matching output constraint of incompatible type"
  14
+  end
13 15
 
14 16
   # Make libcaca build with clang; see http://caca.zoy.org/ticket/90
15 17
   def patches; DATA; end
5  Library/Formula/libevent.rb
@@ -7,7 +7,10 @@ class Libevent < Formula
7 7
 
8 8
   head 'git://levent.git.sourceforge.net/gitroot/levent/levent'
9 9
 
10  
-  fails_with_llvm "Undefined symbol '_current_base' reported during linking.", :build => 2326
  10
+  fails_with :llvm do
  11
+    build 2326
  12
+    cause "Undefined symbol '_current_base' reported during linking."
  13
+  end
11 14
 
12 15
   if ARGV.build_head? and MacOS.xcode_version >= "4.3"
13 16
     depends_on "automake" => :build
5  Library/Formula/libexif.rb
@@ -5,7 +5,10 @@ class Libexif < Formula
5 5
   homepage 'http://libexif.sourceforge.net/'
6 6
   md5 '19844ce6b5d075af16f0d45de1e8a6a3'
7 7
 
8  
-  fails_with_llvm "segfault with llvm", :build => 2334
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+    cause "segfault with llvm"
  11
+  end
9 12
 
10 13
   def install
11 14
     system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
9  Library/Formula/libkate.rb
@@ -7,12 +7,13 @@ class Libkate < Formula
7 7
 
8 8
   depends_on 'libogg' => :recommended
9 9
 
  10
+  fails_with :gcc do
  11
+    build 5666
  12
+    cause "Segfault during compilation"
  13
+  end
  14
+
10 15
   def install
11 16
     ENV.libpng
12  
-    # GCC 4.2 segfaults during compilation
13  
-    # FIXME when we can do fails_with :gcc
14  
-    ENV.llvm if ENV.compiler == :gcc
15  
-
16 17
     system "./configure", "--disable-debug",
17 18
                           "--disable-dependency-tracking",
18 19
                           "--prefix=#{prefix}"
7  Library/Formula/libsigsegv.rb
... ...
@@ -1,12 +1,15 @@
1 1
 require 'formula'
2 2
 
3 3
 class Libsigsegv < Formula
  4
+  homepage 'http://www.gnu.org/software/libsigsegv/'
4 5
   url 'http://ftpmirror.gnu.org/libsigsegv/libsigsegv-2.10.tar.gz'
5 6
   mirror 'http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz'
6  
-  homepage 'http://www.gnu.org/software/libsigsegv/'
7 7
   sha256 '8460a4a3dd4954c3d96d7a4f5dd5bc4d9b76f5754196aa245287553b26d2199a'
8 8
 
9  
-  fails_with_llvm "Fails make check with LLVM GCC from XCode 4 on Snow Leopard", :build => 2336
  9
+  fails_with :llvm do
  10
+    build 2336
  11
+    cause "Fails make check with LLVM GCC from XCode 4 on Snow Leopard"
  12
+  end
10 13
 
11 14
   def install
12 15
     system "./configure", "--disable-dependency-tracking",
7  Library/Formula/libvirt.rb
@@ -14,6 +14,11 @@ class Libvirt < Formula
14 14
     depends_on "libxml2"
15 15
   end
16 16
 
  17
+  fails_with :llvm do
  18
+    build 2326
  19
+    cause "Undefined symbols when linking"
  20
+  end
  21
+
17 22
   # Includes a patch by Lincoln Myers <lincoln_myers@yahoo.com>,
18 23
   # fixing a recently introduced compilation bug on OSX.
19 24
   # Patch is already included upstream, and will be in libvirt 0.9.11.
@@ -21,8 +26,6 @@ def patches
21 26
     DATA
22 27
   end
23 28
 
24  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
25  
-
26 29
   def options
27 30
     [['--without-libvirtd', 'Build only the virsh client and development libraries.']]
28 31
   end
5  Library/Formula/libxml2.rb
@@ -7,7 +7,10 @@ class Libxml2 < Formula
7 7
 
8 8
   keg_only :provided_by_osx
9 9
 
10  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
  10
+  fails_with :llvm do
  11
+    build 2326
  12
+    cause "Undefined symbols when linking"
  13
+  end
11 14
 
12 15
   def options
13 16
     [
6  Library/Formula/log4cxx.rb
@@ -5,8 +5,10 @@ class Log4cxx < Formula
5 5
   homepage 'http://logging.apache.org/log4cxx/index.html'
6 6
   md5 'b30ffb8da3665178e68940ff7a61084c'
7 7
 
8  
-  fails_with_llvm "Fails with \"collect2: ld terminated with signal 11 [Segmentation fault]\".",
9  
-    :build => 2334
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+    cause "Fails with 'collect2: ld terminated with signal 11 [Segmentation fault]'"
  11
+  end
10 12
 
11 13
   def options
12 14
     [
6  Library/Formula/lua.rb
@@ -5,8 +5,10 @@ class Lua < Formula
5 5
   url 'http://www.lua.org/ftp/lua-5.1.4.tar.gz'
6 6
   md5 'd0870f2de55d59c1c8419f36e8fac150'
7 7
 
8  
-  fails_with_llvm "Lua itself compiles with LLVM, but may fail when other software tries to link.",
9  
-                  :build => 2326
  8
+  fails_with :llvm do
  9
+    build 2326
  10
+    cause "Lua itself compiles with LLVM, but may fail when other software tries to link."
  11
+  end
10 12
 
11 13
   # Skip cleaning both empty folders and bin/libs so external symbols still work.
12 14
   skip_clean :all
4  Library/Formula/luarocks.rb
@@ -9,7 +9,9 @@ class Luarocks < Formula
9 9
 
10 10
   depends_on use_luajit? ? 'luajit' : 'lua'
11 11
 
12  
-  fails_with_llvm "Lua itself compiles with llvm, but may fail when other software tries to link."
  12
+  fails_with :llvm do
  13
+    cause "Lua itself compiles with llvm, but may fail when other software tries to link."
  14
+  end
13 15
 
14 16
   def patches
15 17
     p = []
8  Library/Formula/minc.rb
@@ -7,8 +7,6 @@ class Minc < Formula
7 7
 
8 8
   head 'https://github.com/BIC-MNI/minc.git'
9 9
 
10  
-  #fails_with_clang "Throws 'non-void function 'miget_real_value_hyperslab' should return a value' error during build.", :build => 318
11  
-
12 10
   depends_on 'netcdf'
13 11
 
14 12
   if MacOS.xcode_version >= "4.3"
@@ -16,6 +14,12 @@ class Minc < Formula
16 14
     depends_on "libtool" => :build
17 15
   end
18 16
 
  17
+  fails_with :clang do
  18
+    # TODO This is an easy fix, someone send it upstream!
  19
+    build 318
  20
+    cause "Throws 'non-void function 'miget_real_value_hyperslab' should return a value'"
  21
+  end
  22
+
19 23
   def install
20 24
     system "autoreconf", "--force", "--instal"
21 25
     system "./configure", "--disable-dependency-tracking",
10  Library/Formula/mkvtoolnix.rb
@@ -12,13 +12,11 @@ class Mkvtoolnix < Formula
12 12
   depends_on 'flac' => :optional
13 13
   depends_on 'lzo' => :optional
14 14
 
  15
+  fails_with :clang do
  16
+    build 318
  17
+  end
  18
+
15 19
   def install
16  
-    # FIXME This should be replaced with fails_with_clang once available
17  
-    # build 318
18  
-    if ENV.compiler == :clang
19  
-      opoo "Formula will not build with Clang, using LLVM."
20  
-      ENV.llvm
21  
-    end
22 20
     system "./configure", "--disable-debug",
23 21
                           "--prefix=#{prefix}",
24 22
                           "--with-boost-libdir=#{HOMEBREW_PREFIX}/lib", # For non-/usr/local prefix
5  Library/Formula/monotone.rb
@@ -17,7 +17,10 @@ class Monotone < Formula
17 17
   depends_on 'lua'
18 18
   depends_on 'pcre'
19 19
 
20  
-  fails_with_llvm "linker fails", :build => 2334
  20
+  fails_with :llvm do
  21
+    build 2334
  22
+    cause "linker fails"
  23
+  end
21 24
 
22 25
   def install
23 26
     botan18_prefix = libexec+'botan18'
4  Library/Formula/mosh.rb
@@ -8,7 +8,9 @@ class Mosh < Formula
8 8
   depends_on 'gmp'
9 9
   depends_on 'oniguruma'
10 10
 
11  
-  fails_with_llvm "Inline asm errors"
  11
+  fails_with :llvm do
  12
+    cause "Inline asm errors"
  13
+  end
12 14
 
13 15
   def install
14 16
     system "./configure", "--disable-debug", "--disable-dependency-tracking",
4  Library/Formula/mplayer.rb
@@ -10,7 +10,9 @@ class Mplayer < Formula
10 10
   depends_on 'pkg-config' => :build
11 11
   depends_on 'yasm' => :build
12 12
 
13  
-  fails_with_llvm "Missing symbols error while linking"
  13
+  fails_with :llvm do
  14
+    cause "Missing symbols error while linking"
  15
+  end
14 16
 
15 17
   def patches
16 18
     # When building from SVN HEAD, configure prompts the user to pull FFmpeg
4  Library/Formula/msgpack.rb
@@ -6,7 +6,9 @@ class Msgpack < Formula
6 6
   sha256 '7c203265cf14a4723820e0fc7ac14bf4bad5578f7bc525e9835c70cd36e7d1b8'
7 7
 
8 8
   # fails with the latest LLVM, but only on Lion?
9  
-  fails_with_llvm "Compilation fails" if MacOS.lion?
  9
+  fails_with :llvm do
  10
+    cause "compilation fails"
  11
+  end if MacOS.lion?
10 12
 
11 13
   def install
12 14
     system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
5  Library/Formula/mysql-connector-c.rb
@@ -7,7 +7,10 @@ class MysqlConnectorC < Formula
7 7
 
8 8
   depends_on 'cmake' => :build
9 9
 
10  
-  fails_with_llvm "Error: unsupported inline asm.", :build => 2334
  10
+  fails_with :llvm do
  11
+    build 2334
  12
+    cause "Unsupported inline asm"
  13
+  end
11 14
 
12 15
   def install
13 16
     system "cmake #{std_cmake_parameters} ."
5  Library/Formula/mysql.rb
@@ -9,7 +9,10 @@ class Mysql < Formula
9 9
   depends_on 'readline'
10 10
   depends_on 'pidof'
11 11
 
12  
-  fails_with_llvm "https://github.com/mxcl/homebrew/issues/issue/144", :build => 2326
  12
+  fails_with :llvm do
  13
+    build 2326
  14
+    cause "https://github.com/mxcl/homebrew/issues/issue/144"
  15
+  end
13 16
 
14 17
   skip_clean :all # So "INSTALL PLUGIN" can work.
15 18
 
4  Library/Formula/nload.rb
@@ -5,7 +5,9 @@ class Nload < Formula
5 5
   homepage 'http://www.roland-riegel.de/nload/'
6 6
   md5 '9b97c37fe1474f1da42f265fead24081'
7 7
 
8  
-  fails_with_llvm :build => 2334
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+  end
9 11
 
10 12
   # Patching configure.in file to make configure compile on Mac OS.
11 13
   # Patch taken from MacPorts.
4  Library/Formula/nmap.rb
@@ -9,7 +9,9 @@ class Nmap < Formula
9 9
   # Leopard's version of OpenSSL isn't new enough
10 10
   depends_on "openssl" if MacOS.leopard?
11 11
 
12  
-  fails_with_llvm :build => 2334
  12
+  fails_with :llvm do
  13
+    build 2334
  14
+  end
13 15
 
14 16
   # The configure script has a C file to test for some functionality that uses
15 17
   # void main(void). This does not compile with clang but does compile with
4  Library/Formula/node.rb
@@ -15,7 +15,9 @@ class Node < Formula
15 15
   # Leopard OpenSSL is not new enough, so use our keg-only one
16 16
   depends_on 'openssl' if MacOS.leopard?
17 17
 
18  
-  fails_with_llvm :build => 2326
  18
+  fails_with :llvm do
  19
+    build 2326
  20
+  end
19 21
 
20 22
   # Stripping breaks dynamic loading
21 23
   skip_clean :all
5  Library/Formula/pango.rb
@@ -24,7 +24,10 @@ class Pango < Formula
24 24
     depends_on 'cairo'
25 25
   end
26 26
 
27  
-  fails_with_llvm "Undefined symbols when linking", :build => "2326"
  27
+  fails_with :llvm do
  28
+    build 2326
  29
+    cause "Undefined symbols when linking"
  30
+  end
28 31
 
29 32
   def patches
30 33
     p = {}
10  Library/Formula/par2tbb.rb
@@ -7,6 +7,10 @@ class Par2tbb < Formula
7 7
 
8 8
   depends_on 'tbb'
9 9
 
  10
+  fails_with :clang do
  11
+    build 318
  12
+  end
  13
+
10 14
   def install
11 15
     # par2tbb ships with bad timestamps and
12 16
     # doesn't respect --disable-maintainer-mode
@@ -17,12 +21,6 @@ def install
17 21
     # but only 10.6+ are available on Xcode4
18 22
     inreplace 'Makefile.am', /^.*-mmacosx-version.*$/, ''
19 23
 
20  
-    # FIXME This should be replaced with fails_with_clang once available
21  
-    if ENV.compiler == :clang
22  
-      opoo "Formula will not build with Clang, using LLVM."
23  
-      ENV.llvm
24  
-    end
25  
-
26 24
     if Formula.factory('par2').installed?
27 25
       opoo "par2tbb conflicts with par2. Your par2 binaries will be overwritten.
28 26
          If this bothers you, you can restore par2 with `brew link par2`."
4  Library/Formula/pbzip2.rb
@@ -5,7 +5,9 @@ class Pbzip2 < Formula
5 5
   url 'http://compression.ca/pbzip2/pbzip2-1.1.6.tar.gz'
6 6
   md5 '26cc5a0d882198f106e75101ff0544a3'
7 7
 
8  
-  fails_with_llvm :build => 2334
  8
+  fails_with :llvm do
  9
+    build 2334
  10
+  end
9 11
 
10 12
   def install
11 13
     inreplace "Makefile", "$(PREFIX)/man", "$(PREFIX)/share/man"
5  Library/Formula/pcre.rb
@@ -6,7 +6,10 @@ class Pcre < Formula
6 6
   mirror 'http://downloads.sourceforge.net/project/pcre/pcre/8.30/pcre-8.30.tar.bz2'
7 7
   md5 '98e8928cccc945d04279581e778fbdff'
8 8
 
9  
-  fails_with_llvm "Bus error in ld on SL 10.6.4", :build => 2326
  9
+  fails_with :llvm do
  10
+    build 2326
  11
+    cause "Bus error in ld on SL 10.6.4"
  12
+  end
10 13
 
11 14
   def options
12 15
     [["--universal", "Build a universal binary."]]
6  Library/Formula/percona-server.rb
@@ -12,10 +12,12 @@ class PerconaServer < Formula
12 12
   depends_on 'readline'
13 13
   depends_on 'pidof'
14 14
 
15  
-  fails_with_llvm "https://github.com/mxcl/homebrew/issues/issue/144"
16  
-
17 15
   skip_clean :all # So "INSTALL PLUGIN" can work.
18 16
 
  17
+  fails_with :llvm do
  18
+    cause "https://github.com/mxcl/homebrew/issues/issue/144"
  19
+  end
  20
+