2015-01-24 20:27:40 +00:00
|
|
|
class Iojs < Formula
|
|
|
|
homepage "https://iojs.org/"
|
2015-04-21 01:24:46 +00:00
|
|
|
url "https://iojs.org/dist/v1.8.1/iojs-v1.8.1.tar.xz"
|
|
|
|
sha256 "8b9b4a141daca22e6bf28e8af86ce5f9ca5918d08923fb5619b7e614a674d966"
|
2015-01-24 20:27:40 +00:00
|
|
|
|
2015-01-25 01:31:08 +00:00
|
|
|
bottle do
|
2015-04-21 01:36:34 +00:00
|
|
|
sha256 "e535a806b9090b4ba229b4a724fd00a44f9df26f9614eb5cac6739376a9fd0b9" => :yosemite
|
|
|
|
sha256 "e8a671371dfc9adaeea54b4410929ca4bafe9f62bc6b036f0f08f3c278409036" => :mavericks
|
|
|
|
sha256 "023b19b7fa74a044a358157abdcab628c272860ecd9f12be5ac6aa3cce41da01" => :mountain_lion
|
2015-01-25 01:31:08 +00:00
|
|
|
end
|
|
|
|
|
2015-01-25 10:48:07 +00:00
|
|
|
keg_only "iojs conflicts with node (which is currently more established)"
|
2015-01-24 20:27:40 +00:00
|
|
|
|
|
|
|
option "with-debug", "Build with debugger hooks"
|
2015-02-04 02:30:47 +00:00
|
|
|
option "with-icu4c", "Build with Intl (icu4c) support"
|
2015-01-24 20:27:40 +00:00
|
|
|
|
2015-02-04 02:30:47 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "icu4c" => :optional
|
2015-01-24 20:27:40 +00:00
|
|
|
depends_on :python => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
args = %W[--prefix=#{prefix} --without-npm]
|
|
|
|
args << "--debug" if build.with? "debug"
|
2015-02-07 01:16:46 +00:00
|
|
|
args << "--with-intl=system-icu" if build.with? "icu4c"
|
2015-02-04 02:30:47 +00:00
|
|
|
|
2015-01-24 20:27:40 +00:00
|
|
|
system "./configure", *args
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2015-01-25 12:48:37 +00:00
|
|
|
iojs was installed without npm.
|
2015-01-24 20:27:40 +00:00
|
|
|
|
2015-01-25 12:48:37 +00:00
|
|
|
iojs currently requires a patched npm (i.e. not the npm installed by node).
|
2015-01-24 20:27:40 +00:00
|
|
|
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
|