2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mad < Formula
|
2009-10-08 22:43:50 +00:00
|
|
|
homepage 'http://www.underbit.com/products/mad/'
|
2014-02-27 14:19:55 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'cac19cd00e1a907f3150cc040ccc077783496d76'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2014-02-22 19:21:32 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "553ab873bc524e334ccc3adeb5d643cf2fac8892" => :mavericks
|
|
|
|
sha1 "3b7653b4ccd90ad69faa8deb82eb7b9881797443" => :mountain_lion
|
|
|
|
sha1 "f20398331482b492ab879597794624ce1ab351d7" => :lion
|
|
|
|
end
|
|
|
|
|
2012-02-13 05:03:27 +00:00
|
|
|
def install
|
|
|
|
fpm = MacOS.prefer_64_bit? ? '64bit': 'intel'
|
|
|
|
system "./configure", "--disable-debugging", "--enable-fpm=#{fpm}", "--prefix=#{prefix}"
|
|
|
|
system "make", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}", "install"
|
2013-03-25 02:09:38 +00:00
|
|
|
(lib+'pkgconfig/mad.pc').write pc_file
|
2012-02-13 05:03:27 +00:00
|
|
|
end
|
|
|
|
|
2013-03-25 02:09:38 +00:00
|
|
|
def pc_file; <<-EOS.undent
|
|
|
|
prefix=#{opt_prefix}
|
|
|
|
exec_prefix=${prefix}
|
|
|
|
libdir=${exec_prefix}/lib
|
|
|
|
includedir=${prefix}/include
|
2009-10-12 20:45:40 +00:00
|
|
|
|
2013-03-25 02:09:38 +00:00
|
|
|
Name: mad
|
|
|
|
Description: MPEG Audio Decoder
|
|
|
|
Version: #{version}
|
|
|
|
Requires:
|
|
|
|
Conflicts:
|
|
|
|
Libs: -L${libdir} -lmad -lm
|
|
|
|
Cflags: -I${includedir}
|
2009-10-12 20:45:40 +00:00
|
|
|
EOS
|
|
|
|
end
|
2010-07-09 16:02:56 +00:00
|
|
|
end
|