aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pianobar.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Formula/pianobar.rb b/Library/Formula/pianobar.rb
index cfe8b23c7..ea5f6b010 100644
--- a/Library/Formula/pianobar.rb
+++ b/Library/Formula/pianobar.rb
@@ -17,8 +17,14 @@ class Pianobar < Formula
fails_with_llvm "Reports of this not compiling on Xcode 4"
def install
- # Force GCC into c99 mode
- ENV.append 'CFLAGS', "-std=c99"
+ # 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}"