aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/fibjs.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/fibjs.rb b/Library/Formula/fibjs.rb
new file mode 100644
index 000000000..494118a8f
--- /dev/null
+++ b/Library/Formula/fibjs.rb
@@ -0,0 +1,25 @@
+require "formula"
+
+class Fibjs < Formula
+ homepage "http://fibjs.org"
+ url "https://github.com/xicilion/fibjs/archive/v0.1.0.tar.gz"
+ sha1 "2e933da29ea66eee0a9ff8b604f9e3935c3b90fa"
+
+ head "https://github.com/xicilion/fibjs.git"
+
+ 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