Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git: use options DSL

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
commit 783019d02f8aa581d11e79fe99aa7e8952dcbceb 1 parent 1554831
@jacknagel jacknagel authored
Showing with 5 additions and 9 deletions.
  1. +5 −9 Library/Formula/git.rb
View
14 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 @@ def install
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.