2014-06-21 20:22:10 +00:00
|
|
|
require "formula"
|
2013-08-18 21:08:25 +00:00
|
|
|
|
|
|
|
class Clojurescript < Formula
|
2014-06-21 20:22:10 +00:00
|
|
|
homepage "https://github.com/clojure/clojurescript"
|
|
|
|
head "https://github.com/clojure/clojurescript.git"
|
2014-08-21 07:29:15 +00:00
|
|
|
url "https://github.com/clojure/clojurescript/archive/r2311.tar.gz"
|
|
|
|
sha1 "dfce06b02f8e89ab60cd87d02d7092c30ec1f362"
|
2013-08-18 21:08:25 +00:00
|
|
|
|
2014-08-21 08:13:25 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "4dc103c7f1e1216affa15c1ccc73eca82731df6c" => :mavericks
|
|
|
|
sha1 "9796fa561d4b13830a7a7384a24599c0a0219bb1" => :mountain_lion
|
|
|
|
sha1 "58c0a3d966e36819c85593b19c338886d71dd3cc" => :lion
|
|
|
|
end
|
|
|
|
|
2013-08-18 21:08:25 +00:00
|
|
|
def install
|
|
|
|
system "./script/bootstrap"
|
|
|
|
inreplace %w(bin/cljsc script/repl script/repljs script/browser-repl),
|
|
|
|
"#!/bin/sh", "#!/bin/sh\nCLOJURESCRIPT_HOME=#{libexec}"
|
2014-06-21 20:22:10 +00:00
|
|
|
libexec.install Dir["*"]
|
|
|
|
bin.write_exec_script libexec/"bin/cljsc"
|
2013-08-18 21:08:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
This formula is useful if you need to use the ClojureScript compiler directly.
|
|
|
|
For a more integrated workflow, Leiningen with lein-cljsbuild is recommended.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/cljsc"
|
|
|
|
end
|
|
|
|
end
|