lighttpd: use new optional deps

Here's an example where we use `option` to override the default option
description provided by the :optional tag.
This commit is contained in:
Jack Nagel 2013-01-26 20:45:54 -06:00
parent 3b1c5e368c
commit 756dbfd389

View file

@ -9,7 +9,7 @@ class Lighttpd < Formula
depends_on 'pkg-config' => :build
depends_on 'pcre'
depends_on 'lua' => :optional if build.include? 'with-lua'
depends_on 'lua' => :optional
def install
args = %W[
@ -18,7 +18,7 @@ class Lighttpd < Formula
--with-openssl
--with-ldap
]
args << "--with-lua" if build.include? 'with-lua'
args << "--with-lua" if build.with? 'lua'
system "./configure", *args
system "make install"
end