diff options
| author | Dominyk Tiller | 2016-10-05 01:45:24 +0100 |
|---|---|---|
| committer | Dominyk Tiller | 2016-10-05 01:45:24 +0100 |
| commit | fcc9cfa6ae01b8c04f217692c69ed5e1e629baad (patch) | |
| tree | 70eb49b8ea9cdb6ec6c72f514bb8ff15e725aa6b /Library | |
| parent | b6ecaa26f5f06057b2f116e6f47977337153aaf6 (diff) | |
| download | brew-fcc9cfa6ae01b8c04f217692c69ed5e1e629baad.tar.bz2 | |
apr_requirement: favour system as much as possible
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/requirements/apr_requirement.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/requirements/apr_requirement.rb b/Library/Homebrew/requirements/apr_requirement.rb index 3d56c52a1..440788def 100644 --- a/Library/Homebrew/requirements/apr_requirement.rb +++ b/Library/Homebrew/requirements/apr_requirement.rb @@ -12,10 +12,13 @@ class AprRequirement < Requirement end env do - ENV.prepend_path "PATH", Formula["apr-util"].opt_bin - ENV.prepend_path "PATH", Formula["apr"].opt_bin - ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr"].opt_libexec}/lib/pkgconfig" - ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig" + # Prefer system Apr as much as possible, even if our's is installed. + unless MacOS.version > :leopard && MacOS.version < :sierra && MacOS::CLT.installed? + ENV.prepend_path "PATH", Formula["apr-util"].opt_bin + ENV.prepend_path "PATH", Formula["apr"].opt_bin + ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr"].opt_libexec}/lib/pkgconfig" + ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig" + end end def to_dependency |
