avidemux: adjust merged patch, use fails_with

Avidemux-2.5.6 had its one patch merged upstream the day this
formula was accepted.  That was hoped for but unexpected.  This
commit adjusts the conditional for def patches so that it only
gets applied to stable.  Fixes a patch failure for 32bit + HEAD.

Also in this commit, remove the hardcoded `ENV.llvm` and switch
to using `fails_with :clang`, surrounded by a conditional so it
can still be built with clang if `--with-debug`.

Closes Homebrew/homebrew#11959.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
master
nibbles 2bits 2012-04-29 23:05:58 -07:00 committed by Jack Nagel
parent 1b09685315
commit 79245634ed
1 changed files with 9 additions and 3 deletions

View File

@ -26,12 +26,20 @@ class Avidemux < Formula
depends_on 'xvid'
depends_on 'x264'
# Check if this still exists @ XCode-4.3.4 or 4.4.0. I think it's fixed then
# by llvm in clang svn. So this will have to persist for older clang.
fails_with :clang do
build 318
cause "error in backend: Couldn't allocate input reg for constraint"
end unless ARGV.include? '--with-debug'
def options
[[ '--with-debug', 'Enable debug build.' ]]
end
def patches
DATA if Hardware.is_32_bit?
# Symbols undefined due to optimization. Fixed in head. Remove @ 2.5.7.
DATA if Hardware.is_32_bit? and not ARGV.build_head?
end
def install
@ -63,8 +71,6 @@ class Avidemux < Formula
end
# Force llvm if clang on a normal build, fails_with_clang (being sovled).
ENV.llvm if ENV.compiler == :clang and not ARGV.include? '--with-debug'
# Build the core.
gettext = Formula.factory('gettext')
mkdir 'corebuild' do