2017-03-26 02:21:13 +00:00
|
|
|
class Binaryen < Formula
|
|
|
|
desc "Compiler infrastructure and toolchain library for WebAssembly"
|
|
|
|
homepage "http://webassembly.org/"
|
2017-06-09 06:24:27 +00:00
|
|
|
url "https://github.com/WebAssembly/binaryen/archive/version_33.tar.gz"
|
|
|
|
sha256 "858038e5a04ceb416fa789902151592f9eacade8e03bc84785401cfec50fb3c8"
|
2017-03-26 02:21:13 +00:00
|
|
|
|
|
|
|
head "https://github.com/WebAssembly/binaryen.git"
|
|
|
|
|
2017-04-26 02:45:30 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha256 "cf97939e920df902e21ad075aa9c3c2c587280cb63335e154a89c90e5fd4185b" => :sierra
|
|
|
|
sha256 "bf5846f96131f98695e475a73a7d5c14767e2886ac3c56a609ee2b6f0e48f253" => :el_capitan
|
|
|
|
sha256 "5e2269c335a5e6777a85ea729a597d07ce4676fe19f3aef08ec14582e0389402" => :yosemite
|
|
|
|
end
|
|
|
|
|
2017-03-26 02:21:13 +00:00
|
|
|
depends_on "cmake" => :build
|
2017-06-09 06:24:27 +00:00
|
|
|
depends_on :macos => :el_capitan # needs thread-local storage
|
2017-03-26 02:21:13 +00:00
|
|
|
|
|
|
|
needs :cxx11
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.cxx11
|
|
|
|
|
|
|
|
system "cmake", ".", *std_cmake_args
|
|
|
|
system "make", "install"
|
|
|
|
|
|
|
|
pkgshare.install "test/"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/wasm-opt", "#{pkgshare}/test/passes/O.wast"
|
|
|
|
system "#{bin}/asm2wasm", "#{pkgshare}/test/hello_world.asm.js"
|
|
|
|
end
|
|
|
|
end
|