From 291e900abc18e9d53cb6221f7f117e1e52507f2b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 2 Feb 2015 00:39:04 -0500 Subject: [PATCH] AprRequirement should not generate a build-time dependency We want the apr requirement to act as a build-time requirement in case it is satisfied (that is, the CLT is installed), as the resulting binaries will link to the system libapr which is always present. When it is *not* satisfied by the CLT, and we need to install the formula, we have to treat it as a runtime dependency since the resulting binaries will link to it. Fixes Homebrew/homebrew#36301. Fixes Homebrew/homebrew#36438. Closes Homebrew/homebrew#36443. --- Library/Homebrew/requirements/apr_dependency.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/requirements/apr_dependency.rb b/Library/Homebrew/requirements/apr_dependency.rb index 8b63256a87..7dfd83f298 100644 --- a/Library/Homebrew/requirements/apr_dependency.rb +++ b/Library/Homebrew/requirements/apr_dependency.rb @@ -14,4 +14,12 @@ class AprDependency < Requirement ENV.prepend_path "PKG_CONFIG_PATH", "#{Formula["apr-util"].opt_libexec}/lib/pkgconfig" end end + + def to_dependency + super.extend Module.new { + def tags + super - [:build] + end + } + end end