2014-10-27 16:29:01 +00:00
|
|
|
class Fibjs < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "JavaScript on Fiber"
|
2016-01-30 00:01:49 +00:00
|
|
|
homepage "http://fibjs.org/en/index.html"
|
2016-08-02 07:46:06 +00:00
|
|
|
url "https://github.com/xicilion/fibjs/releases/download/v0.2.1/fullsrc.zip"
|
|
|
|
version "0.2.1"
|
|
|
|
sha256 "914d79bb18e5309228747d73c481c1c243db8cc0ab1b29ec66f201cc2d8f85b9"
|
2014-10-27 16:29:01 +00:00
|
|
|
|
|
|
|
head "https://github.com/xicilion/fibjs.git"
|
|
|
|
|
2014-10-27 17:46:11 +00:00
|
|
|
bottle do
|
2015-09-19 13:27:01 +00:00
|
|
|
cellar :any_skip_relocation
|
2016-09-29 04:50:44 +00:00
|
|
|
sha256 "88e3ab32d1beeff05ff560df3a801754497968d5be899fe1a5a9d09b91fb9ba1" => :sierra
|
2016-08-02 08:03:32 +00:00
|
|
|
sha256 "ba281f85ad6e3b0ad65c47c25d8b3f3eda6a969f429735432a62451e024bab33" => :el_capitan
|
|
|
|
sha256 "acb0013c7cf6d3f6dbf7793b5a3a1a627afd39af55c0b5e0cdf0b64da7eab9eb" => :yosemite
|
|
|
|
sha256 "e08ec48ecb64a708f148d56e60f2b54d75629e3a9e0ee9bb88d8afa13a4964e4" => :mavericks
|
2014-10-27 17:46:11 +00:00
|
|
|
end
|
|
|
|
|
2016-01-10 08:05:46 +00:00
|
|
|
depends_on "cmake" => :build
|
2014-10-27 16:29:01 +00:00
|
|
|
|
|
|
|
def install
|
2016-08-02 07:46:06 +00:00
|
|
|
system "./build", "release", "-j#{ENV.make_jobs}"
|
|
|
|
bin.install "bin/Darwin_amd64_release/fibjs"
|
2014-10-27 16:29:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"test.js"
|
|
|
|
path.write "console.log('hello');"
|
|
|
|
|
2016-01-10 08:05:46 +00:00
|
|
|
output = shell_output("#{bin}/fibjs #{path}").strip
|
2014-10-27 16:29:01 +00:00
|
|
|
assert_equal "hello", output
|
|
|
|
end
|
|
|
|
end
|