v8cgi: use new dsl
This commit is contained in:
parent
2fb16c1d51
commit
edc7780e86
1 changed files with 10 additions and 14 deletions
|
@ -7,20 +7,16 @@ class V8cgi < Formula
|
||||||
|
|
||||||
head 'http://v8cgi.googlecode.com/svn/trunk/'
|
head 'http://v8cgi.googlecode.com/svn/trunk/'
|
||||||
|
|
||||||
|
option "with-dom", "Enable DOM"
|
||||||
|
option "with-gd", "Enable GD"
|
||||||
|
option "with-sqlite", "Enable SQLite"
|
||||||
|
|
||||||
depends_on 'scons' => :build
|
depends_on 'scons' => :build
|
||||||
depends_on 'v8'
|
depends_on 'v8'
|
||||||
depends_on 'libmemcached'
|
depends_on 'libmemcached'
|
||||||
depends_on 'xerces-c' if ARGV.include? '--with-dom'
|
depends_on 'xerces-c' => :optional if build.include? 'with-dom'
|
||||||
depends_on 'gd' if ARGV.include? '--with-gd'
|
depends_on 'gd' => :optional if build.include? 'with-gd'
|
||||||
depends_on 'sqlite' if ARGV.include? '--with-sqlite'
|
depends_on 'sqlite' => :optional if build.include? 'with-sqlite'
|
||||||
|
|
||||||
def options
|
|
||||||
[
|
|
||||||
["--with-dom", "Enable DOM."],
|
|
||||||
["--with-gd", "Enable GD."],
|
|
||||||
["--with-sqlite", "Enable SQLite."]
|
|
||||||
]
|
|
||||||
end
|
|
||||||
|
|
||||||
def install
|
def install
|
||||||
arch = Hardware.is_64_bit? ? 'x64' : 'ia32'
|
arch = Hardware.is_64_bit? ? 'x64' : 'ia32'
|
||||||
|
@ -28,9 +24,9 @@ class V8cgi < Formula
|
||||||
v8_prefix = Formula.factory('v8').prefix
|
v8_prefix = Formula.factory('v8').prefix
|
||||||
|
|
||||||
args = ["config_file=#{etc}/v8cgi.conf", "v8_path=#{v8_prefix}"]
|
args = ["config_file=#{etc}/v8cgi.conf", "v8_path=#{v8_prefix}"]
|
||||||
args << ((ARGV.include? '--with-dom') ? 'dom=1' : 'dom=0')
|
args << ((build.include? 'with-dom') ? 'dom=1' : 'dom=0')
|
||||||
args << ((ARGV.include? '--with-gd') ? 'gd=1' : 'gd=0')
|
args << ((build.include? 'with-gd') ? 'gd=1' : 'gd=0')
|
||||||
args << ((ARGV.include? '--with-sqlite') ? 'sqlite=1' : 'sqlite=0')
|
args << ((build.include? 'with-sqlite') ? 'sqlite=1' : 'sqlite=0')
|
||||||
|
|
||||||
cd 'v8cgi' do
|
cd 'v8cgi' do
|
||||||
inreplace 'SConstruct', '../v8', v8_prefix
|
inreplace 'SConstruct', '../v8', v8_prefix
|
||||||
|
|
Loading…
Reference in a new issue