git: fix git-svn --with-brewed-subversion lib path

On newer systems perl installs modules into the standard
lib/perl5/site_perl hierarchy, instead of the Mac OS X specific
Library/Perl hierarchy. This fix makes sure that both old and new
directories are considered.

Closes Homebrew/homebrew#46093.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Felix Bünemann 2015-11-17 21:15:58 +01:00 committed by Mike McQuaid
parent 0c1a8721e1
commit eda8fe00ba

View file

@ -53,7 +53,10 @@ class Git < Formula
perl_version = /\d\.\d+/.match(`perl --version`)
if build.with? "brewed-svn"
ENV["PERLLIB_EXTRA"] = "#{Formula["subversion"].opt_prefix}/Library/Perl/#{perl_version}/darwin-thread-multi-2level"
ENV["PERLLIB_EXTRA"] = %W[
#{Formula["subversion"].opt_prefix}/lib/perl5/site_perl
#{Formula["subversion"].opt_prefix}/Library/Perl/#{perl_version}/darwin-thread-multi-2level
].join(":")
elsif MacOS.version >= :mavericks
ENV["PERLLIB_EXTRA"] = %W[
#{MacOS.active_developer_dir}