homebrew-core/Formula/pianobar.rb
Charlie Sharpsteen 928199a07f Pianobar: Builds with LLVM >= 2335
At least, using XCode 2.3.6 on 10.6.x and 4.1 on 10.7. 4.0 may still be
hosed for some odd reason... we'll see.

Closes Homebrew/homebrew#7668.
2011-09-22 09:11:01 -07:00

35 lines
1 KiB
Ruby

require 'formula'
class Pianobar < Formula
url 'https://github.com/PromyLOPh/pianobar/zipball/2011.09.22'
version '2011.09.22'
homepage 'https://github.com/PromyLOPh/pianobar/'
md5 '61f84526b42381204678165825f0d4a5'
head 'https://github.com/PromyLOPh/pianobar.git'
depends_on 'libao'
depends_on 'mad'
depends_on 'faad2'
skip_clean 'bin'
fails_with_llvm "Reports of this not compiling on Xcode 4", :build => 2334
def install
# we discard Homebrew's CFLAGS as Pianobar reportdely doesn't like them
ENV['CFLAGS'] = "-O2 -DNDEBUG " +
# fixes a segfault: https://github.com/PromyLOPh/pianobar/issues/138
"-D_DARWIN_C_SOURCE " +
# Or it doesn't build at all
"-std=c99 " +
# build if we aren't /usr/local'
"#{ENV["CPPFLAGS"]} #{ENV["LDFLAGS"]}"
system "make", "PREFIX=#{prefix}"
system "make", "install", "PREFIX=#{prefix}"
# Install contrib folder too, why not.
prefix.install Dir['contrib']
end
end