0121e85a1e
Closes #6930. Signed-off-by: William Woodruff <william@tuffbizz.com>
58 lines
1.8 KiB
Ruby
58 lines
1.8 KiB
Ruby
class Llnode < Formula
|
|
desc "LLDB plugin for live/post-mortem debugging of node.js apps"
|
|
homepage "https://github.com/indutny/llnode"
|
|
url "https://github.com/indutny/llnode/archive/v1.3.0.tar.gz"
|
|
sha256 "7d7a0c44195adeb0389641148597dfef652ca3736af8bcc90c65e28a0b2ede63"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "fd5f6a10d91bbd4ea48f0a91745d9a14ad7f8e25c939d6955dcc79d5f6355540" => :sierra
|
|
sha256 "9dad366ed90f4f97c266f2df7875460e5a7b2525ae427cd48f276d0e5a671156" => :el_capitan
|
|
sha256 "75be2616873cff178cf6cc5dc14809922ab5089aca3d334a7845e4064dd15a98" => :yosemite
|
|
end
|
|
|
|
depends_on :macos => :yosemite
|
|
depends_on :python => :build
|
|
|
|
resource "gyp" do
|
|
url "https://chromium.googlesource.com/external/gyp.git",
|
|
:revision => "db72e9fcf55ba9d8089f0bc7e447180f8972b5c0"
|
|
end
|
|
|
|
resource "lldb" do
|
|
url "https://github.com/llvm-mirror/lldb.git",
|
|
:revision => "839b868e2993dcffc7fea898a1167f1cec097a82"
|
|
end
|
|
|
|
def install
|
|
(buildpath/"lldb").install resource("lldb")
|
|
(buildpath/"tools/gyp").install resource("gyp")
|
|
|
|
system "./gyp_llnode"
|
|
system "make", "-C", "out/"
|
|
prefix.install "out/Release/llnode.dylib"
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
`brew install llnode` does not link the plugin to LLDB PlugIns dir.
|
|
|
|
To load this plugin in LLDB, one will need to either
|
|
|
|
* Type `plugin load #{opt_prefix}/llnode.dylib` on each run of lldb
|
|
* Install plugin into PlugIns dir manually:
|
|
|
|
mkdir -p ~/Library/Application\\ Support/LLDB/PlugIns
|
|
ln -sf #{opt_prefix}/llnode.dylib \\
|
|
~/Library/Application\\ Support/LLDB/PlugIns/
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
lldb_out = pipe_output "lldb", <<-EOS.undent
|
|
plugin load #{opt_prefix}/llnode.dylib
|
|
help v8
|
|
quit
|
|
EOS
|
|
assert_match /v8 bt/, lldb_out
|
|
end
|
|
end
|