From f99b4b2d3463a636ea49f2d2726c75051cffcfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Wei=C3=9Fl?= Date: Thu, 12 May 2011 02:57:20 +0200 Subject: [PATCH] cmus: add flac CFLAGS detection patch This could fix issue 5555: https://github.com/mxcl/homebrew/issues/5555 Signed-off-by: Adam Vandenberg --- Formula/cmus.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Formula/cmus.rb b/Formula/cmus.rb index d9bfebd4e5..cb062adc40 100644 --- a/Formula/cmus.rb +++ b/Formula/cmus.rb @@ -17,8 +17,33 @@ class Cmus < Formula skip_clean 'bin/cmus' skip_clean 'bin/cmus-remote' + def patches + # fix flac CFLAGS detection, already applied upstream: + # https://gitorious.org/cmus/cmus/commit/51f7aaccab09f30ff6a683eec3163904c7148cb3 + DATA + end + def install system "./configure", "prefix=#{prefix}", "mandir=#{man}" system "make install" end end +__END__ +diff --git a/configure b/configure +index 127f64a..e8fbece 100755 +--- a/configure ++++ b/configure +@@ -146,7 +146,12 @@ check_mpc() + + check_flac() + { +- pkg_config FLAC "flac" "" "-lFLAC -lm" && return 0 ++ if pkg_config FLAC "flac" "" "-lFLAC -lm" ++ then ++ # Make sure the FLAC_CFLAGS value is sane, strip trailing '/FLAC'. ++ FLAC_CFLAGS=`echo $FLAC_CFLAGS | sed "s/FLAC$//"` ++ return 0 ++ fi + check_library FLAC "" "-lFLAC -lvorbisfile -lm" + return $? + }