2009-11-27 04:52:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class V8 < Formula
|
2009-11-15 04:09:23 +00:00
|
|
|
head 'http://v8.googlecode.com/svn/trunk/'
|
2009-11-27 04:52:31 +00:00
|
|
|
homepage 'http://code.google.com/p/v8/'
|
|
|
|
|
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
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
system "scons", "-j #{Hardware.processor_count}",
|
|
|
|
"arch=#{arch}",
|
|
|
|
"mode=release",
|
|
|
|
"snapshot=on",
|
|
|
|
"library=shared",
|
|
|
|
"visibility=default",
|
|
|
|
"console=readline",
|
|
|
|
"sample=shell"
|
2009-11-27 04:52:31 +00:00
|
|
|
|
2010-04-08 23:22:45 +00:00
|
|
|
include.install Dir['include/*']
|
|
|
|
lib.install Dir['libv8.*']
|
2010-02-18 18:05:01 +00:00
|
|
|
bin.install 'shell' => 'v8'
|
2010-02-06 23:44:45 +00:00
|
|
|
|
2010-04-08 23:22:45 +00:00
|
|
|
system "install_name_tool -change libv8.dylib #{lib}/libv8.dylib #{bin}/v8"
|
2009-11-27 04:52:31 +00:00
|
|
|
end
|
|
|
|
end
|