require 'formula' class Mad = 10.6 and Hardware.is_64_bit? fpm = '64bit' else fpm = 'intel' end system "./configure", "--disable-debugging", "--enable-fpm=#{fpm}", "--prefix=#{prefix}" # See: http://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