homebrew-core/Formula/google-js-test.rb
Jack Nagel 53473b6bf5 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00

29 lines
665 B
Ruby

require 'formula'
class NeedsSnowLeopard < Requirement
def message
"Google JS Test requires Mac OS X 10.6 (Snow Leopard) or newer."
end
def satisfied?
MacOS.version >= :snow_leopard
end
end
class GoogleJsTest < Formula
homepage 'http://code.google.com/p/google-js-test/'
url 'http://google-js-test.googlecode.com/files/gjstest-1.0.7.tar.bz2'
sha1 '8580cfe9c3ed2eca6e3c076bfc321048a6e4dd64'
depends_on NeedsSnowLeopard.new
depends_on 'gflags'
depends_on 'glog'
depends_on 'protobuf'
depends_on 're2'
depends_on 'v8'
def install
system "make", "PREFIX=#{prefix}"
system "make", "PREFIX=#{prefix}", "install"
end
end