This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #34658. Closes #35853. Closes #35854. Closes #36039. Closes #36193. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
- Loading branch information
1 parent
6e8bd0d
commit 3e18b3e
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |