Merge pull request #1227 from DomT4/apr
apr_requirement: use Homebrew's Apr for Sierra
This commit is contained in:
commit
a812e95417
@ -4,17 +4,23 @@ class AprRequirement < Requirement
|
|||||||
fatal true
|
fatal true
|
||||||
default_formula "apr-util"
|
default_formula "apr-util"
|
||||||
|
|
||||||
# APR shipped in Tiger is too old, but Leopard+ is usable
|
# APR shipped in Tiger is too old, but Leopard+ is usable.
|
||||||
satisfy(build_env: false) { MacOS.version > :leopard && MacOS::CLT.installed? }
|
# The *-config scripts were removed in Sierra, which is widely breaking.
|
||||||
|
satisfy(build_env: false) do
|
||||||
|
next false if MacOS.version <= :leopard
|
||||||
|
next false if MacOS.version >= :sierra
|
||||||
|
MacOS::CLT.installed? || Formula["apr-util"].installed?
|
||||||
|
end
|
||||||
|
|
||||||
env do
|
env do
|
||||||
unless MacOS::CLT.installed?
|
next if MacOS.version <= :leopard
|
||||||
|
next if MacOS.version >= :sierra
|
||||||
|
next if MacOS::CLT.installed?
|
||||||
ENV.prepend_path "PATH", Formula["apr-util"].opt_bin
|
ENV.prepend_path "PATH", Formula["apr-util"].opt_bin
|
||||||
ENV.prepend_path "PATH", Formula["apr"].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"].opt_libexec}/lib/pkgconfig"
|
||||||
ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig"
|
ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def to_dependency
|
def to_dependency
|
||||||
super.extend Module.new {
|
super.extend Module.new {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user