diff options
| author | Jack Nagel | 2012-02-12 23:03:27 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-02-12 23:03:27 -0600 |
| commit | e118d8dfeddf540a44590c3ff2602d237a5e804b (patch) | |
| tree | 51b6baf0fc8aff02e92fa4087697dae3878a3862 /Library/Formula/mad.rb | |
| parent | b3fca51a413150fe6c086af6e7f1e3d86c3a8742 (diff) | |
| download | homebrew-e118d8dfeddf540a44590c3ff2602d237a5e804b.tar.bz2 | |
mad: avoid inreplace
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/mad.rb')
| -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 |
