aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/google-js-test.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/Library/Formula/google-js-test.rb b/Library/Formula/google-js-test.rb
index dae5fb691..af44f9b0c 100644
--- a/Library/Formula/google-js-test.rb
+++ b/Library/Formula/google-js-test.rb
@@ -1,10 +1,21 @@
require 'formula'
+class NeedsSnowLeopard < Requirement
+ def message
+ "Google JS Test requires Mac OS X 10.6 (Snow Leopard) or newer."
+ end
+
+ def satisfied?
+ MacOS.snow_leopard?
+ end
+end
+
class GoogleJsTest < Formula
- url 'http://google-js-test.googlecode.com/files/gjstest-1.0.7.tar.bz2'
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'
@@ -12,9 +23,7 @@ class GoogleJsTest < Formula
depends_on 'v8'
def install
- raise 'gjstest requires Snow Leopard or above.' if MacOS.leopard?
-
- system "make PREFIX=#{prefix}"
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}"
+ system "make", "PREFIX=#{prefix}", "install"
end
end