apr_requirement: favour system as much as possible

This commit is contained in:
Dominyk Tiller 2016-10-05 01:45:24 +01:00
parent b6ecaa26f5
commit fcc9cfa6ae
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -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