homebrew-core/Formula/pianobar.rb
Juan C. Müller 9aa691fe56 pianobar 2012.05.06
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-05-08 06:59:48 -07:00

39 lines
1 KiB
Ruby

require 'formula'
class Pianobar < Formula
homepage 'https://github.com/PromyLOPh/pianobar/'
url 'https://github.com/PromyLOPh/pianobar/tarball/2012.05.06'
md5 '1bbfd129f66b5bf37a84cf7794f2eaf2'
head 'https://github.com/PromyLOPh/pianobar.git'
depends_on 'libao'
depends_on 'mad'
depends_on 'faad2'
depends_on 'gnutls'
depends_on 'json-c'
skip_clean 'bin'
fails_with :llvm do
build 2334
cause "Reports of this not compiling on Xcode 4"
end
def install
# Discard Homebrew's CFLAGS as Pianobar reportedly 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