diff options
| author | Adam Vandenberg | 2012-08-22 21:08:16 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-22 21:08:16 -0700 |
| commit | 62a31f32a7979cc2d685ed25ec657a03d8dc75f6 (patch) | |
| tree | f41efcc01e0d071b4aa880aec40e42059c85325d /Library | |
| parent | 309f0f43118358a2f159f5218a90778043163a26 (diff) | |
| download | homebrew-62a31f32a7979cc2d685ed25ec657a03d8dc75f6.tar.bz2 | |
v8cgi: use new dsl
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/v8cgi.rb | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Library/Formula/v8cgi.rb b/Library/Formula/v8cgi.rb index afe0a538e..9404cad07 100644 --- a/Library/Formula/v8cgi.rb +++ b/Library/Formula/v8cgi.rb @@ -7,20 +7,16 @@ class V8cgi < Formula 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 'v8' depends_on 'libmemcached' - depends_on 'xerces-c' if ARGV.include? '--with-dom' - depends_on 'gd' if ARGV.include? '--with-gd' - depends_on 'sqlite' if ARGV.include? '--with-sqlite' - - def options - [ - ["--with-dom", "Enable DOM."], - ["--with-gd", "Enable GD."], - ["--with-sqlite", "Enable SQLite."] - ] - end + depends_on 'xerces-c' => :optional if build.include? 'with-dom' + depends_on 'gd' => :optional if build.include? 'with-gd' + depends_on 'sqlite' => :optional if build.include? 'with-sqlite' def install arch = Hardware.is_64_bit? ? 'x64' : 'ia32' @@ -28,9 +24,9 @@ class V8cgi < Formula v8_prefix = Formula.factory('v8').prefix args = ["config_file=#{etc}/v8cgi.conf", "v8_path=#{v8_prefix}"] - args << ((ARGV.include? '--with-dom') ? 'dom=1' : 'dom=0') - args << ((ARGV.include? '--with-gd') ? 'gd=1' : 'gd=0') - args << ((ARGV.include? '--with-sqlite') ? 'sqlite=1' : 'sqlite=0') + args << ((build.include? 'with-dom') ? 'dom=1' : 'dom=0') + args << ((build.include? 'with-gd') ? 'gd=1' : 'gd=0') + args << ((build.include? 'with-sqlite') ? 'sqlite=1' : 'sqlite=0') cd 'v8cgi' do inreplace 'SConstruct', '../v8', v8_prefix |
