Skip to content
Snippets Groups Projects
Commit a812e954 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #1227 from DomT4/apr

apr_requirement: use Homebrew's Apr for Sierra
parents 5e90c5a7 784b71cb
No related branches found
No related tags found
No related merge requests found
...@@ -4,16 +4,22 @@ class AprRequirement < Requirement ...@@ -4,16 +4,22 @@ 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
ENV.prepend_path "PATH", Formula["apr-util"].opt_bin next if MacOS.version >= :sierra
ENV.prepend_path "PATH", Formula["apr"].opt_bin next if MacOS::CLT.installed?
ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr"].opt_libexec}/lib/pkgconfig" ENV.prepend_path "PATH", Formula["apr-util"].opt_bin
ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig" ENV.prepend_path "PATH", Formula["apr"].opt_bin
end 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 def to_dependency
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment