blob: 8b05c5b2dd11d60d728794dbd69671e6ccd5f709 (
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.1.tar.gz"
  sha1 "59b819ee4d22b2a339f3bfc0dff115a5d8452256"
  head "https://github.com/xicilion/fibjs.git"
  bottle do
    cellar :any
    sha1 "5c9dee229c3c5eede978eabe3ec6ccc5b7c4a616" => :yosemite
    sha1 "9eb15e12ad700529ad91bf0f294d349474dc7144" => :mavericks
    sha1 "11120148b4943383ddd8779c6a4d18dba72735eb" => :mountain_lion
  end
  depends_on "cmake" => :build
  def install
    system "./build", "Release", "-j#{ENV["HOMEBREW_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
  |