2010-07-25 16:09:49 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Cmus < Formula
|
2011-04-26 11:09:36 +00:00
|
|
|
url 'http://downloads.sourceforge.net/cmus/cmus-v2.4.0.tar.bz2'
|
2010-07-25 16:09:49 +00:00
|
|
|
homepage 'http://cmus.sourceforge.net/'
|
2011-04-26 11:09:36 +00:00
|
|
|
md5 '0c5a9f4032e632e5f6b6a49f53df1e7e'
|
2010-07-25 16:09:49 +00:00
|
|
|
|
2011-03-05 23:26:51 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-07-25 16:09:49 +00:00
|
|
|
depends_on 'libao'
|
|
|
|
depends_on 'mad'
|
|
|
|
depends_on 'libogg'
|
|
|
|
depends_on 'libvorbis'
|
|
|
|
depends_on 'faad2'
|
|
|
|
depends_on 'flac'
|
2011-03-05 23:26:51 +00:00
|
|
|
depends_on 'mp4v2'
|
2010-07-25 16:09:49 +00:00
|
|
|
|
|
|
|
skip_clean 'bin/cmus'
|
|
|
|
skip_clean 'bin/cmus-remote'
|
|
|
|
|
2011-05-12 00:57:20 +00:00
|
|
|
def patches
|
|
|
|
# fix flac CFLAGS detection, already applied upstream:
|
|
|
|
# https://gitorious.org/cmus/cmus/commit/51f7aaccab09f30ff6a683eec3163904c7148cb3
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2010-07-25 16:09:49 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "prefix=#{prefix}", "mandir=#{man}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2011-05-12 00:57:20 +00:00
|
|
|
__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 $?
|
|
|
|
}
|