Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Use new fails_with DSL syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
jacknagel committed Apr 1, 2012
1 parent b36f59d commit 497b13a
Show file tree
Hide file tree
Showing 101 changed files with 402 additions and 180 deletions.
5 changes: 4 additions & 1 deletion Library/Formula/aspell.rb
Expand Up @@ -14,7 +14,10 @@ class Aspell < Formula
homepage 'http://aspell.net/'
md5 'e66a9c9af6a60dc46134fdacf6ce97d7'

fails_with_llvm "Segmentation fault during linking.", :build => 2334
fails_with :llvm do
build 2334
cause "Segmentation fault during linking."
end

def options
[
Expand Down
10 changes: 7 additions & 3 deletions Library/Formula/bali-phy.rb
Expand Up @@ -7,9 +7,13 @@ class BaliPhy < Formula

depends_on 'gsl'

# fails_with_clang
# io.H:25:31: error: use of undeclared identifier 'push_back'
# void operator()(const T& t){push_back(t);}
fails_with :clang do
build 318
cause <<-EOS.undent
io.H:25:31: error: use of undeclared identifier 'push_back'
void operator()(const T& t){push_back(t);}
EOS
end

def install
mkdir 'macbuild' do
Expand Down
10 changes: 4 additions & 6 deletions Library/Formula/blast.rb
Expand Up @@ -6,6 +6,10 @@ class Blast < Formula
version '2.2.25'
md5 '01256b808e3af49a5087945b6a8c8293'

fails_with :clang do
build 318
end

def options
[['--with-dll', "Create dynamic binaries instead of static"]]
end
Expand All @@ -17,12 +21,6 @@ def patches
end

def install
# FIXME This should be replaced with fails_with_clang once available
if ENV.compiler == :clang
opoo "Formula will not build with Clang, using LLVM."
ENV.llvm
end

args = ["--prefix=#{prefix}"]
args << "--with-dll" if ARGV.include? '--with-dll'

Expand Down
7 changes: 4 additions & 3 deletions Library/Formula/boost.rb
Expand Up @@ -14,9 +14,10 @@ class Boost < Formula

depends_on "icu4c" if ARGV.include? "--with-icu"

# Both clang and llvm-gcc provided by XCode 4.1 compile Boost 1.47.0 properly.
# Moreover, Apple LLVM compiler 2.1 is now among primary test compilers.
fails_with_llvm "Dropped arguments to functions when linking with boost", :build => 2335
fails_with :llvm do
build 2335
cause "Dropped arguments to functions when linking with boost"
end

def options
[
Expand Down
9 changes: 4 additions & 5 deletions Library/Formula/bwm-ng.rb
Expand Up @@ -5,12 +5,11 @@ class BwmNg < Formula
homepage 'http://www.gropp.org/?id=projects&sub=bwm-ng'
md5 'd3a02484fb7946371bfb4e10927cebfb'

def install
if MacOS.default_compiler == :clang
# auto-retest next clang version, submit patch if fails!
ENV.llvm if MacOS.clang_version.to_f <= 3.1
end
fails_with :clang do
build 318
end

def install
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/cairo.rb
Expand Up @@ -11,7 +11,10 @@ class Cairo < Formula
keg_only :provided_by_osx,
"The Cairo provided by Leopard is too old for newer software to link against."

fails_with_llvm "Throws an 'lto could not merge' error during build.", :build => 2336
fails_with :llvm do
build 2336
cause "Throws an 'lto could not merge' error during build."
end

def install
args = %W[
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/cdargs.rb
Expand Up @@ -5,7 +5,10 @@ class Cdargs < Formula
url 'http://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz'
md5 '50be618d67f0b9f2439526193c69c567'

fails_with_llvm "Bus error in ld on SL 10.6.4", :build => 2334
fails_with :llvm do
build 2334
cause "Bus error in ld on SL 10.6.4"
end

# fixes zsh usage using the patch provided at the cdargs homepage
# (See http://www.skamphausen.de/cgi-bin/ska/CDargs)
Expand Down
7 changes: 5 additions & 2 deletions Library/Formula/cdparanoia.rb
Expand Up @@ -5,15 +5,18 @@ class Cdparanoia < Formula
homepage 'http://www.xiph.org/paranoia/'
md5 'b304bbe8ab63373924a744eac9ebc652'

fails_with :llvm do
build 2326
cause '"File too small" error while linking'
end

def patches
[
"https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch",
"https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff"
]
end

fails_with_llvm '"File too small" error while linking', :build => 2326

def install
system "autoconf"
# Libs are installed as keg-only because most software that searches for cdparanoia
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/cdrdao.rb
Expand Up @@ -11,7 +11,10 @@ class Cdrdao < Formula
depends_on 'mad'
depends_on 'lame'

fails_with_llvm "Segfault while linking", :build => 2326
fails_with :llvm do
build 2326
cause "Segfault while linking"
end

# first patch fixes build problems under 10.6
# see http://sourceforge.net/tracker/index.php?func=detail&aid=2981804&group_id=2171&atid=302171
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/celt.rb
Expand Up @@ -7,7 +7,10 @@ class Celt < Formula

depends_on 'libogg' => :optional

fails_with_llvm "'make check' fails", :build => 2335
fails_with :llvm do
build 2335
cause "'make check' fails"
end

def install
system "./configure", "--disable-dependency-tracking",
Expand Down
4 changes: 3 additions & 1 deletion Library/Formula/chicken.rb
Expand Up @@ -6,7 +6,9 @@ class Chicken < Formula
homepage 'http://www.call-cc.org/'
head 'git://code.call-cc.org/chicken-core'

fails_with_llvm "Compilation hangs. See http://lists.gnu.org/archive/html/chicken-users/2010-12/msg00158.html"
fails_with :llvm do
cause "Compilation hangs; see http://lists.gnu.org/archive/html/chicken-users/2010-12/msg00158.html"
end

def install
ENV.deparallelize
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/clisp.rb
Expand Up @@ -11,7 +11,10 @@ class Clisp < Formula

skip_clean :all # otherwise abort trap

fails_with_llvm "Configure fails on XCode 4/Snow Leopard.", :build => 2334
fails_with :llvm do
build 2334
cause "Configure fails on XCode 4/Snow Leopard."
end

def patches
{ :p0 => "https://trac.macports.org/export/89054/trunk/dports/lang/clisp/files/patch-src_lispbibl_d.diff",
Expand Down
6 changes: 4 additions & 2 deletions Library/Formula/ctags.rb
Expand Up @@ -7,8 +7,10 @@ class Ctags < Formula

head 'https://ctags.svn.sourceforge.net/svnroot/ctags/trunk'

# true for both 5.8 and head
fails_with_llvm "Resulting executable generates erroneous tag files", :build => 2335
fails_with :llvm do
build 2335
cause "Resulting executable generates erroneous tag files"
end

def install
if ARGV.build_head?
Expand Down
4 changes: 3 additions & 1 deletion Library/Formula/dcmtk.rb
Expand Up @@ -12,7 +12,9 @@ def options
[['--with-docs', 'Install development libraries/headers and HTML docs']]
end

# fails_with_clang: https://github.com/mxcl/homebrew/issues/10884#issuecomment-4467514
fails_with :clang do
build 318
end

def install
ENV.m64 if MacOS.prefer_64_bit?
Expand Down
4 changes: 3 additions & 1 deletion Library/Formula/dirac.rb
Expand Up @@ -5,7 +5,9 @@ class Dirac < Formula
md5 'a57c2c5e58062d437d9ab13dffb28f0f'
homepage 'http://diracvideo.org/'

fails_with_llvm :build => 2334
fails_with :llvm do
build 2334
end

def install
# BSD cp doesn't have '-d'
Expand Down
10 changes: 4 additions & 6 deletions Library/Formula/dpkg.rb
Expand Up @@ -8,17 +8,15 @@ class Dpkg < Formula
depends_on 'pkg-config' => :build
depends_on 'gnu-tar'

fails_with :clang do
build 318
end

# Fixes the PERL_LIBDIR.
# Uses Homebrew-install gnu-tar instead of bsd tar.
def patches; DATA; end

def install
# FIXME This should be replaced with fails_with_clang once available
if ENV.compiler == :clang
opoo "Formula will not build with Clang, using LLVM."
ENV.llvm
end

system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-compiler-warnings",
Expand Down
6 changes: 4 additions & 2 deletions Library/Formula/elinks.rb
Expand Up @@ -13,13 +13,15 @@ class Elinks < Formula
md5 '92790144290131ac5e63b44548b45e08'
end

fails_with_llvm :build => 2326

if ARGV.build_head? and MacOS.xcode_version >= "4.3"
depends_on "automake" => :build
depends_on "libtool" => :build
end

fails_with :llvm do
build 2326
end

# enables 256 colors, per the manual
def patches
DATA
Expand Down
13 changes: 8 additions & 5 deletions Library/Formula/emacs.rb
Expand Up @@ -6,16 +6,19 @@ class Emacs < Formula
mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.4.tar.bz2'
md5 '070c68ad8e3c31fb3cb2414feaf5e6f0'

fails_with_llvm "Duplicate symbol errors while linking.", :build => 2334
if ARGV.include? "--use-git-head"
head 'git://git.sv.gnu.org/emacs.git'
else
head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk'
end

# Stripping on Xcode 4 causes malformed object errors.
# Just skip everything.
skip_clean :all

if ARGV.include? "--use-git-head"
head 'git://git.sv.gnu.org/emacs.git'
else
head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk'
fails_with :llvm do
build 2334
cause "Duplicate symbol errors while linking."
end

def options
Expand Down
18 changes: 10 additions & 8 deletions Library/Formula/erlang.rb
Expand Up @@ -43,6 +43,16 @@ class Erlang < Formula
# may as well skip bin too, everything is just shell scripts
skip_clean ['lib', 'bin']

if MacOS.xcode_version >= "4.3"
# remove the autoreconf if possible
depends_on "automake" => :build
depends_on "libtool" => :build
end

fails_with :llvm do
build 2334
end

def options
[
['--disable-hipe', "Disable building hipe; fails on various OS X systems."],
Expand All @@ -52,14 +62,6 @@ def options
]
end

fails_with_llvm :build => 2334

if MacOS.xcode_version >= "4.3"
# remove the autoreconf if possible
depends_on "automake" => :build
depends_on "libtool" => :build
end

def install
ohai "Compilation takes a long time; use `brew install -v erlang` to see progress" unless ARGV.verbose?

Expand Down
20 changes: 11 additions & 9 deletions Library/Formula/ffmpeg.rb
Expand Up @@ -11,15 +11,6 @@ class Ffmpeg < Formula

head 'git://git.videolan.org/ffmpeg.git'

fails_with_llvm 'Undefined symbols when linking libavfilter'

def options
[
["--with-tools", "Install additional FFmpeg tools."],
["--with-ffplay", "Build ffplay."]
]
end

depends_on 'yasm' => :build
depends_on 'x264' => :optional
depends_on 'faac' => :optional
Expand All @@ -35,6 +26,17 @@ def options

depends_on 'sdl' if ffplay?

fails_with :llvm do
cause 'Undefined symbols when linking libavfilter'
end

def options
[
["--with-tools", "Install additional FFmpeg tools."],
["--with-ffplay", "Build ffplay."]
]
end

def install
ENV.x11
args = ["--prefix=#{prefix}",
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/flac.rb
Expand Up @@ -13,7 +13,10 @@ class Flac < Formula
depends_on 'lame'
depends_on 'libogg' => :optional

fails_with_llvm "Undefined symbols when linking", :build => 2326
fails_with :llvm do
build 2326
cause "Undefined symbols when linking"
end

def install
# sadly the asm optimisations won't compile since Leopard, and nobody
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/fontforge.rb
Expand Up @@ -15,7 +15,10 @@ def options
[['--without-python', 'Build without Python.']]
end

fails_with_llvm "Compiling cvexportdlg.c fails with error: initializer element is not constant", :build => 2336
fails_with :llvm do
build 2336
cause "Compiling cvexportdlg.c fails with error: initializer element is not constant"
end

def install
args = ["--prefix=#{prefix}", "--enable-double", "--without-freetype-bytecode"]
Expand Down
4 changes: 3 additions & 1 deletion Library/Formula/fox.rb
Expand Up @@ -11,7 +11,9 @@ class Fox < Formula
md5 '1cf2607d15ffad5b664cf65bfcd249bc'
end

fails_with_llvm "Inline asm errors during build" if ARGV.build_devel?
fails_with :llvm do
cause "Inline asm errors during build"
end if ARGV.build_devel?

def install
ENV.x11
Expand Down
5 changes: 4 additions & 1 deletion Library/Formula/gambit-scheme.rb
Expand Up @@ -14,7 +14,10 @@ def options

skip_clean :all

fails_with_llvm "ld crashes during the build process or segfault at runtime", :build => 2335
fails_with :llvm do
build 2335
cause "ld crashes during the build process or segfault at runtime"
end

def install
args = ["--disable-debug",
Expand Down

0 comments on commit 497b13a

Please sign in to comment.