require 'formula' class Mad = 10.6 and Hardware.is_64_bit? fpm = '64bit' else fpm = 'intel' end # See: http://github.com/mxcl/homebrew/issues/issue/1263 if Hardware.intel_family == 'arrandale' inreplace "Makefile" do |s| s.remove_make_var! %w{CFLAGS LDFLAGS} end end system "./configure", "--disable-debugging", "--enable-fpm=#{fpm}", "--prefix=#{prefix}" system "make install" (lib+'pkgconfig/mad.pc').write mad_pc end end