aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/git.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/git.rb')
-rw-r--r--Library/Formula/git.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Formula/git.rb b/Library/Formula/git.rb
index 8588beab0..3b16f6569 100644
--- a/Library/Formula/git.rb
+++ b/Library/Formula/git.rb
@@ -15,8 +15,13 @@ class Git < Formula
sha1 '5b6920989480a37ec65977e756b24961578795dd'
homepage 'http://git-scm.com'
+ depends_on 'pcre' if ARGV.include? '--with-pcre'
+
def options
- [['--with-blk-sha1', 'compile with the optimized SHA1 implementation']]
+ [
+ ['--with-blk-sha1', 'compile with the optimized SHA1 implementation'],
+ ['--with-pcre', 'compile with the PCRE library'],
+ ]
end
def install
@@ -30,6 +35,11 @@ class Git < Formula
ENV['BLK_SHA1']='1' if ARGV.include? '--with-blk-sha1'
+ if ARGV.include? '--with-pcre'
+ ENV['USE_LIBPCRE']='1'
+ ENV['LIBPCREDIR'] = HOMEBREW_PREFIX
+ end
+
inreplace "Makefile" do |s|
s.remove_make_var! %w{CC CFLAGS LDFLAGS}
end