Merge pull request #1227 from DomT4/apr
apr_requirement: use Homebrew's Apr for Sierra
This commit is contained in:
commit
a812e95417
@ -4,16 +4,22 @@ 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
|
||||
next false if MacOS.version <= :leopard
|
||||
next false if MacOS.version >= :sierra
|
||||
MacOS::CLT.installed? || Formula["apr-util"].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
|
||||
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"].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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user