From e118d8dfeddf540a44590c3ff2602d237a5e804b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 12 Feb 2012 23:03:27 -0600 Subject: mad: avoid inreplace Signed-off-by: Jack Nagel --- Library/Formula/mad.rb | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'Library/Formula') 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 -- cgit v1.2.3