2010-04-07 16:26:37 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Valgrind < Formula
|
2010-04-07 16:26:37 +00:00
|
|
|
homepage 'http://www.valgrind.org/'
|
2010-08-12 04:08:44 +00:00
|
|
|
|
2011-11-09 20:31:04 +00:00
|
|
|
# Valgrind 3.7.0 drops support for OS X 10.5
|
|
|
|
if MACOS_VERSION >= 10.6
|
|
|
|
url 'http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2'
|
|
|
|
md5 'a855fda56edf05614f099dca316d1775'
|
|
|
|
else
|
|
|
|
url "http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2"
|
|
|
|
md5 "2c3aa122498baecc9d69194057ca88f5"
|
|
|
|
end
|
2011-03-21 21:24:22 +00:00
|
|
|
|
2010-10-13 13:25:33 +00:00
|
|
|
skip_clean 'lib'
|
|
|
|
|
2010-08-12 04:08:44 +00:00
|
|
|
def install
|
2010-08-24 17:28:40 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--mandir=#{man}"]
|
2011-11-09 23:26:43 +00:00
|
|
|
if MacOS.prefer_64_bit?
|
|
|
|
args << "--enable-only64bit" << "--build=amd64-darwin"
|
|
|
|
else
|
|
|
|
args << "--enable-only32bit"
|
|
|
|
end
|
2010-08-12 04:08:44 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2011-11-09 20:31:04 +00:00
|
|
|
system "make"
|
2010-08-12 04:08:44 +00:00
|
|
|
system "make install"
|
2010-04-07 16:26:37 +00:00
|
|
|
end
|
2011-05-08 11:56:49 +00:00
|
|
|
|
2011-11-09 20:31:04 +00:00
|
|
|
def test
|
|
|
|
system "valgrind ls -l"
|
|
|
|
end
|
2011-11-09 23:26:43 +00:00
|
|
|
end
|