apr_requirement: require Homebrew's Apr on Sierra

Sierra ships the headers/libraries still but for some reason decided to bin
the config scripts, which whilst seemingly not an issue for `mesos`
or `ganglia` it has broken `subversion`, `log4cxx`, `ctail`, `shibboleth`
and `passenger` that we know of so far. Let's assume more often than not
things are going to break without those config scripts around.
This commit is contained in:
Dominyk Tiller 2016-10-04 23:16:31 +01:00
parent a7a2aef803
commit 0756a3d7d8
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -4,16 +4,17 @@ class AprRequirement < Requirement
fatal true
default_formula "apr-util"
# APR shipped in Tiger is too old, but Leopard+ is usable
satisfy(build_env: false) { MacOS.version > :leopard && MacOS::CLT.installed? }
# APR shipped in Tiger is too old, but Leopard+ is usable.
# The *-config scripts were removed in Sierra, which is widely breaking.
satisfy(build_env: false) do
MacOS.version > :leopard && MacOS.version < :sierra && MacOS::CLT.installed?
end
env do
unless 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
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
def to_dependency