2010-02-21 21:04:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Gtest < Formula
|
2010-08-02 18:09:54 +00:00
|
|
|
url 'http://googletest.googlecode.com/files/gtest-1.5.0.tar.gz'
|
2010-02-21 21:04:52 +00:00
|
|
|
homepage 'http://code.google.com/p/googletest/'
|
2010-08-02 18:09:54 +00:00
|
|
|
md5 '7e27f5f3b79dd1ce9092e159cdbd0635'
|
2010-02-21 21:04:52 +00:00
|
|
|
|
2011-09-05 02:51:36 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
["--universal", "Build for both 32 & 64 bit Intel."],
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2010-02-21 21:04:52 +00:00
|
|
|
def install
|
2011-09-05 02:51:36 +00:00
|
|
|
ENV.universal_binary if ARGV.build_universal?
|
|
|
|
|
2010-02-21 21:04:52 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
|
2011-09-05 01:43:17 +00:00
|
|
|
# gtest-config tries to be clever in locating libraries, but Homebrew's
|
|
|
|
# Cellar confuses it. This lets `gtest-config --libs` work correctly
|
|
|
|
inreplace 'scripts/gtest-config', '`dirname $0`', '$bindir'
|
2010-02-21 21:04:52 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|