2011-12-18 04:19:38 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Dart < Formula
|
2014-08-05 15:41:42 +00:00
|
|
|
homepage 'https://www.dartlang.org/'
|
2012-08-15 19:56:23 +00:00
|
|
|
|
|
|
|
if MacOS.prefer_64_bit?
|
2014-08-27 17:23:10 +00:00
|
|
|
url 'https://storage.googleapis.com/dart-archive/channels/stable/release/39553/sdk/dartsdk-macos-x64-release.zip'
|
|
|
|
sha256 '98fba491b86e70d7fc44ed69977b365b96f9d7d79a3a95a89553df9aafaf7f81'
|
2012-08-15 19:56:23 +00:00
|
|
|
else
|
2014-08-27 17:23:10 +00:00
|
|
|
url 'https://storage.googleapis.com/dart-archive/channels/stable/release/39553/sdk/dartsdk-macos-ia32-release.zip'
|
|
|
|
sha256 '2ad33e57098fb567c6b627d149899ad301de88f03edc92c74611956642eca382'
|
2012-08-15 19:56:23 +00:00
|
|
|
end
|
|
|
|
|
2014-08-27 17:23:10 +00:00
|
|
|
version '1.6.0'
|
2011-12-18 04:19:38 +00:00
|
|
|
|
2014-08-11 01:42:15 +00:00
|
|
|
devel do
|
|
|
|
if MacOS.prefer_64_bit?
|
2014-08-27 17:23:10 +00:00
|
|
|
url 'https://storage.googleapis.com/dart-archive/channels/dev/release/39537/sdk/dartsdk-macos-x64-release.zip'
|
|
|
|
sha256 '5042082e881e3d074728045e01e6adc4a351e76945fdec0f3a9164e76475308b'
|
2014-08-11 01:42:15 +00:00
|
|
|
else
|
2014-08-27 17:23:10 +00:00
|
|
|
url 'https://storage.googleapis.com/dart-archive/channels/dev/release/39537/sdk/dartsdk-macos-ia32-release.zip'
|
|
|
|
sha256 '87b98b2e0be44930ad2aaa09c5042aa9b15618e37c6e7df1739f6a786b464d51'
|
2014-08-11 01:42:15 +00:00
|
|
|
end
|
|
|
|
|
2014-08-27 17:23:10 +00:00
|
|
|
version '1.6.0-dev.9.7'
|
2014-08-11 01:42:15 +00:00
|
|
|
end
|
|
|
|
|
2011-12-18 04:19:38 +00:00
|
|
|
def install
|
|
|
|
libexec.install Dir['*']
|
2012-12-07 12:14:40 +00:00
|
|
|
bin.install_symlink "#{libexec}/bin/dart"
|
2014-08-20 23:34:17 +00:00
|
|
|
bin.write_exec_script Dir["#{libexec}/bin/{pub,docgen,dart?*}"]
|
2011-12-18 04:19:38 +00:00
|
|
|
end
|
|
|
|
|
2013-11-02 11:25:16 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To use with IntelliJ, set the Dart home to:
|
2014-03-06 05:28:31 +00:00
|
|
|
#{opt_libexec}
|
2013-11-02 11:25:16 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2013-02-02 05:12:32 +00:00
|
|
|
test do
|
|
|
|
(testpath/'sample.dart').write <<-EOS.undent
|
2012-04-20 05:01:38 +00:00
|
|
|
void main() {
|
2013-11-08 20:43:13 +00:00
|
|
|
print(r"test message");
|
2012-04-20 05:01:38 +00:00
|
|
|
}
|
2013-02-02 05:12:32 +00:00
|
|
|
EOS
|
2012-04-20 05:01:38 +00:00
|
|
|
|
2014-05-04 19:12:41 +00:00
|
|
|
assert_equal "test message\n", shell_output("#{bin}/dart sample.dart")
|
2011-12-18 04:19:38 +00:00
|
|
|
end
|
|
|
|
end
|