diff options
| author | Bret Comnes | 2015-01-24 12:27:40 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-25 10:51:15 +0000 |
| commit | 3e18b3ef225fddc4322f5485325a4d547d07f775 (patch) | |
| tree | 45b21ad4dd5da73a2f71c15eb4fcb8ac27c58f24 /Library/Formula/iojs.rb | |
| parent | 6e8bd0def051a99a5c3916f9a577f6bdb57f089e (diff) | |
| download | homebrew-3e18b3ef225fddc4322f5485325a4d547d07f775.tar.bz2 | |
iojs 1.0.4 (new formula)
Closes #34658.
Closes #35853.
Closes #35854.
Closes #36039.
Closes #36193.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/iojs.rb')
| -rw-r--r-- | Library/Formula/iojs.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Library/Formula/iojs.rb b/Library/Formula/iojs.rb new file mode 100644 index 000000000..637ceac16 --- /dev/null +++ b/Library/Formula/iojs.rb @@ -0,0 +1,37 @@ +class Iojs < Formula + homepage "https://iojs.org/" + url "https://iojs.org/dist/v1.0.4/iojs-v1.0.4.tar.xz" + sha256 "c902f5abbd59c56346680f0b4a71056c51610847b9576acf83a9c210bf664e98" + + keg_only "`iojs` symlinks conflict with `node` but can be used by prepending your PATH" + + option "with-debug", "Build with debugger hooks" + + depends_on :python => :build + + def install + args = %W[--prefix=#{prefix} --without-npm] + args << "--debug" if build.with? "debug" + + system "./configure", *args + system "make", "install" + end + + def caveats; <<-EOS.undent + `iojs` was installed without `npm`. + + To intall `npm` and have it use `iojs`, install `node` and add + iojs to the front of your path: + export PATH=#{Formula["iojs"].opt_bin}:$PATH + EOS + end + + test do + path = testpath/"test.js" + path.write "console.log('hello');" + + output = `#{bin}/iojs #{path}`.strip + assert_equal "hello", output + assert_equal 0, $?.exitstatus + end +end |
