Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
git: use options DSL
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
jacknagel committed Aug 12, 2012
1 parent 1554831 commit 783019d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Library/Formula/git.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 783019d

Please sign in to comment.