From 783019d02f8aa581d11e79fe99aa7e8952dcbceb Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 12 Aug 2012 12:36:13 -0500 Subject: git: use options DSL Signed-off-by: Jack Nagel --- Library/Formula/git.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'Library/Formula/git.rb') diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb index d48ce2ddf..4606de409 100644 --- a/Library/Formula/git.rb +++ b/Library/Formula/git.rb @@ -17,14 +17,10 @@ class Git < Formula head 'https://github.com/git/git.git' - depends_on 'pcre' if ARGV.include? '--with-pcre' + depends_on 'pcre' if build.include? 'with-pcre' - def options - [ - ['--with-blk-sha1', 'compile with the optimized SHA1 implementation'], - ['--with-pcre', 'compile with the PCRE library'], - ] - end + option 'with-blk-sha1', 'Compile with the block-optimized SHA1 implementation' + option 'with-pcre', 'Compile with the PCRE library' def install # If these things are installed, tell Git build system to not use them @@ -39,9 +35,9 @@ class Git < Formula # Clean XCode 4.x installs don't include Perl MakeMaker ENV['NO_PERL_MAKEMAKER'] = '1' if MacOS.lion? - ENV['BLK_SHA1'] = '1' if ARGV.include? '--with-blk-sha1' + ENV['BLK_SHA1'] = '1' if build.include? 'with-blk-sha1' - if ARGV.include? '--with-pcre' + if build.include? 'with-pcre' ENV['USE_LIBPCRE'] = '1' ENV['LIBPCREDIR'] = HOMEBREW_PREFIX end -- cgit v1.2.3