blob: e4ec268f8976ea544100abf68c586d0dac5e75fc (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 | require "formula"
class Fibjs < Formula
  homepage "http://fibjs.org"
  url "https://github.com/xicilion/fibjs/archive/v0.1.2.tar.gz"
  sha1 "d19dc40fecfd1ee9cd6cc850d9c83267dc0f7a96"
  head "https://github.com/xicilion/fibjs.git"
  bottle do
    cellar :any
    sha1 "055349bc97bd548fbde2819e3361131fed609e22" => :yosemite
    sha1 "3b80e72eccff9e45cec662b9506aa3875beeaf67" => :mavericks
    sha1 "27ab582d18228f794ef3460f7ee60fdce804fb0a" => :mountain_lion
  end
  depends_on "cmake" => :build
  def install
    system "./build", "Release", "-j#{ENV.make_jobs}"
    bin.install "bin/Darwin_Release/fibjs"
  end
  test do
    path = testpath/"test.js"
    path.write "console.log('hello');"
    output = `#{bin}/fibjs #{path}`.strip
    assert_equal "hello", output
    assert_equal 0, $?.exitstatus
  end
end
 |