homebrew-core/Formula/chakra.rb
2017-07-25 02:28:01 -07:00

26 lines
1,001 B
Ruby

class Chakra < Formula
desc "The core part of the JavaScript engine that powers Microsoft Edge"
homepage "https://github.com/Microsoft/ChakraCore"
url "https://github.com/Microsoft/ChakraCore/archive/v1.7.0.tar.gz"
sha256 "e8240ef1d1d9a5eb1b987023f3286d701cceafcd0620192818b29d875d584c4e"
bottle do
cellar :any
sha256 "87b118a93f13fa3a574a55a5a7fa6ba13da6b38bae940ade8e024752a66d592e" => :sierra
sha256 "8e941eab8dcc9d14ec8e22da5456fff5fedd4b6a965b9dfdd2ba31fe74648343" => :el_capitan
sha256 "d01cb6d79d2072d189b1a6174df208378532eb98dace23c4461426e81a232266" => :yosemite
end
depends_on "cmake" => :build
depends_on "icu4c"
def install
system "./build.sh", "--lto-thin", "--static", "--icu=#{Formula["icu4c"].opt_include}", "-j=#{ENV.make_jobs}", "-y"
bin.install "out/Release/ch" => "chakra"
end
test do
(testpath/"test.js").write("print('Hello world!');\n")
assert_equal "Hello world!", shell_output("#{bin}/chakra test.js").chomp
end
end