2009-11-27 04:52:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
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/'
|
2012-02-10 04:58:43 +00:00
|
|
|
# Use the official github mirror, it is easier to find tags there
|
|
|
|
url 'https://github.com/v8/v8/tarball/3.8.9'
|
|
|
|
sha1 'a99d3d1259f56baeb16b937c315e8fa158eaa7ba'
|
|
|
|
|
|
|
|
head 'https://github.com/v8/v8.git', :using => :git
|
2009-11-27 04:52:31 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'scons' => :build
|
2009-11-27 04:52:31 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
arch = Hardware.is_64_bit? ? 'x64' : 'ia32'
|
2009-11-15 04:09:23 +00:00
|
|
|
|
2011-10-15 05:02:02 +00:00
|
|
|
system "scons", "-j #{ENV.make_jobs}",
|
2010-04-07 05:58:35 +00:00
|
|
|
"arch=#{arch}",
|
|
|
|
"mode=release",
|
|
|
|
"snapshot=on",
|
|
|
|
"library=shared",
|
|
|
|
"visibility=default",
|
|
|
|
"console=readline",
|
|
|
|
"sample=shell"
|
2009-11-27 04:52:31 +00:00
|
|
|
|
2012-02-10 04:58:43 +00:00
|
|
|
prefix.install 'include'
|
|
|
|
lib.install 'libv8.dylib'
|
2010-02-18 18:05:01 +00:00
|
|
|
bin.install 'shell' => 'v8'
|
2010-02-06 23:44:45 +00:00
|
|
|
|
2012-02-11 18:03:26 +00:00
|
|
|
system "install_name_tool", "-change", "libv8.dylib", "#{lib}/libv8.dylib", "#{bin}/v8"
|
2009-11-27 04:52:31 +00:00
|
|
|
end
|
|
|
|
end
|