2009-11-27 04:52:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2013-07-23 21:54:13 +00:00
|
|
|
# When trunk is 3.x, then 3.x is devel and 3.(x-1)
|
|
|
|
# is stable.
|
2013-05-22 14:07:02 +00:00
|
|
|
# https://code.google.com/p/v8/issues/detail?id=2545
|
|
|
|
# http://omahaproxy.appspot.com/
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class V8 < Formula
|
2009-11-27 04:52:31 +00:00
|
|
|
homepage 'http://code.google.com/p/v8/'
|
2013-11-04 06:09:50 +00:00
|
|
|
url 'https://github.com/v8/v8/archive/3.21.17.tar.gz'
|
|
|
|
sha1 '762dacc85a896e23a311eaed1e182f535677f4d6'
|
2009-11-27 04:52:31 +00:00
|
|
|
|
2013-07-23 20:48:21 +00:00
|
|
|
option 'with-readline', 'Use readline instead of libedit'
|
|
|
|
|
2013-09-18 04:36:47 +00:00
|
|
|
# not building on Snow Leopard:
|
|
|
|
# https://github.com/mxcl/homebrew/issues/21426
|
|
|
|
depends_on :macos => :lion
|
|
|
|
|
2013-02-02 20:02:20 +00:00
|
|
|
# gyp currently depends on a full xcode install
|
|
|
|
# https://code.google.com/p/gyp/issues/detail?id=292
|
|
|
|
depends_on :xcode
|
2013-07-23 20:48:21 +00:00
|
|
|
depends_on 'readline' => :optional
|
2013-02-02 02:40:25 +00:00
|
|
|
|
2013-11-04 06:09:50 +00:00
|
|
|
resource 'gyp' do
|
|
|
|
url 'http://gyp.googlecode.com/svn/trunk', :revision => 1685
|
|
|
|
version '1685'
|
|
|
|
end
|
|
|
|
|
2013-02-02 20:02:20 +00:00
|
|
|
def install
|
2013-11-04 06:09:50 +00:00
|
|
|
# Download gyp ourselves because running "make dependencies" pulls in ICU.
|
|
|
|
(buildpath/'build/gyp').install resource('gyp')
|
|
|
|
|
|
|
|
system "make", "native",
|
2013-01-05 21:24:07 +00:00
|
|
|
"-j#{ENV.make_jobs}",
|
|
|
|
"library=shared",
|
|
|
|
"snapshot=on",
|
2013-11-04 06:09:50 +00:00
|
|
|
"console=readline",
|
|
|
|
"i18nsupport=off"
|
2009-11-27 04:52:31 +00:00
|
|
|
|
2012-02-10 04:58:43 +00:00
|
|
|
prefix.install 'include'
|
2013-01-05 21:24:07 +00:00
|
|
|
cd 'out/native' do
|
|
|
|
lib.install Dir['lib*']
|
2013-04-22 18:20:47 +00:00
|
|
|
bin.install 'd8', 'lineprocessor', 'preparser', 'process', 'shell' => 'v8'
|
|
|
|
bin.install Dir['mksnapshot.*']
|
2013-01-05 21:24:07 +00:00
|
|
|
end
|
2009-11-27 04:52:31 +00:00
|
|
|
end
|
|
|
|
end
|