From 6eabbed464c6a33a5af8d646805fae9fa3f3c648 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 5 Nov 2014 20:32:09 -0600 Subject: [PATCH] Add `depend_on :apr` --- Library/Homebrew/dependency_collector.rb | 1 + Library/Homebrew/requirements.rb | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index 546e92af39..1641c71e64 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -124,6 +124,7 @@ class DependencyCollector when :ld64 then LD64Dependency.new if MacOS.version < :leopard when :ant then ant_dep(spec, tags) when :clt # deprecated + when :apr then AprDependency.new(tags) when :cairo, :fontconfig, :freetype, :libpng, :pixman # deprecated Dependency.new(spec.to_s, tags) when :libltdl # deprecated diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb index 05576a873d..7dcd5039f1 100644 --- a/Library/Homebrew/requirements.rb +++ b/Library/Homebrew/requirements.rb @@ -130,3 +130,27 @@ class JavaDependency < Requirement EOS end end + +class AprDependency < Requirement + fatal true + + satisfy(:build_env => false) { MacOS::CLT.installed? } + + def message + message = <<-EOS.undent + Due to packaging problems on Apple's part, software that compiles + against APR requires the standalone Command Line Tools. + EOS + if MacOS.version >= :mavericks + message += <<-EOS.undent + Run `xcode-select --install` to install them. + EOS + else + message += <<-EOS.undent + The standalone package can be obtained from + https://developer.apple.com/downloads/, + or it can be installed via Xcode's preferences. + EOS + end + end +end