Skip to content

Instantly share code, notes, and snippets.

@azu
Created September 13, 2014 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azu/203ada47a6a271a91d70 to your computer and use it in GitHub Desktop.
Save azu/203ada47a6a271a91d70 to your computer and use it in GitHub Desktop.
v8_enable_disassembler=1
require 'formula'
# When trunk is 3.x, then 3.x is devel and 3.(x-1)
# is stable.
# https://code.google.com/p/v8/issues/detail?id=2545
# http://omahaproxy.appspot.com/
class V8Dev < Formula
homepage 'http://code.google.com/p/v8/'
url 'https://github.com/v8/v8/archive/3.25.30.tar.gz'
sha1 '207d0bb1dd5954fe691570e799b3c1e318741290'
option 'with-readline', 'Use readline instead of libedit'
# not building on Snow Leopard:
# https://github.com/Homebrew/homebrew/issues/21426
depends_on :macos => :lion
depends_on :python => :build # gyp doesn't run under 2.6 or lower
depends_on 'readline' => :optional
resource 'gyp' do
url 'http://gyp.googlecode.com/svn/trunk', :revision => 1831
version '1831'
end
def install
# Download gyp ourselves because running "make dependencies" pulls in ICU.
(buildpath/'build/gyp').install resource('gyp')
system "make", "native",
"library=shared",
"snapshot=on",
"console=readline",
"i18nsupport=off",
"v8_enable_disassembler=on"
prefix.install 'include'
cd 'out/native' do
lib.install Dir['lib*']
bin.install 'd8', 'lineprocessor', 'process', 'shell' => 'v8'
bin.install Dir['mksnapshot.*']
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment