homebrew-core/Formula/fibjs.rb
2017-08-27 16:47:45 -04:00

36 lines
982 B
Ruby

class Fibjs < Formula
desc "JavaScript on Fiber"
homepage "http://fibjs.org/"
url "https://github.com/fibjs/fibjs/releases/download/v0.12.0/fullsrc.zip"
sha256 "1dd8a2fb39961e95f7bd4e3615da8bd071f5a483b2775f9d792a8b1f657c7659"
head "https://github.com/fibjs/fibjs.git"
bottle do
cellar :any_skip_relocation
sha256 "421d94e739189dfad4fab68bbe1a5af58005330d710828e4a0a54cf9b6923217" => :sierra
end
depends_on :macos => :sierra # fibjs requires >= Xcode 8.3 (or equivalent CLT)
depends_on "cmake" => :build
def install
# the build script breaks when CI is set by Homebrew
begin
env_ci = ENV.delete "CI"
system "./build", "release", "-j#{ENV.make_jobs}"
ensure
ENV["CI"] = env_ci
end
bin.install "bin/Darwin_amd64_release/fibjs"
end
test do
path = testpath/"test.js"
path.write "console.log('hello');"
output = shell_output("#{bin}/fibjs #{path}").strip
assert_equal "hello", output
end
end