diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mad.rb | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Library/Formula/mad.rb b/Library/Formula/mad.rb index 4ece44750..dd92dbd20 100644 --- a/Library/Formula/mad.rb +++ b/Library/Formula/mad.rb @@ -5,6 +5,13 @@ class Mad < Formula url 'http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz' md5 '1be543bc30c56fb6bea1d7bf6a64e66c' + 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" + (lib+'pkgconfig/mad.pc').write mad_pc + end + def mad_pc return <<-EOS prefix=#{HOMEBREW_PREFIX} @@ -21,19 +28,4 @@ Libs: -L${libdir} -lmad -lm Cflags: -I${includedir} EOS end - - def install - fpm = MacOS.prefer_64_bit? ? '64bit': 'intel' - system "./configure", "--disable-debugging", "--enable-fpm=#{fpm}", "--prefix=#{prefix}" - - # See: https://github.com/mxcl/homebrew/issues/issue/1263 - inreplace "Makefile" do |s| - s.change_make_var! "CFLAGS", ENV.cflags - s.change_make_var! "LDFLAGS", ENV.ldflags - end - - system "make install" - - (lib+'pkgconfig/mad.pc').write mad_pc - end end |
