aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/compat/dependency_collector.rb8
-rw-r--r--Library/Homebrew/compat/requirements.rb1
-rw-r--r--Library/Homebrew/dependency_collector.rb1
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb4
-rw-r--r--Library/Homebrew/requirements.rb1
-rw-r--r--Library/Homebrew/requirements/apr_requirement.rb32
6 files changed, 10 insertions, 37 deletions
diff --git a/Library/Homebrew/compat/dependency_collector.rb b/Library/Homebrew/compat/dependency_collector.rb
index b18adc490..bd72c55d4 100644
--- a/Library/Homebrew/compat/dependency_collector.rb
+++ b/Library/Homebrew/compat/dependency_collector.rb
@@ -13,6 +13,10 @@ class DependencyCollector
when :cairo, :fontconfig, :freetype, :libpng, :pixman
output_deprecation(spec, tags)
Dependency.new(spec.to_s, tags)
+ when :apr
+ # TODO: reenable in future when we've fixed a few of the audits.
+ # output_deprecation(spec, tags, "apr-util")
+ Dependency.new("apr-util", tags)
when :libltdl
tags << :run
output_deprecation("libtool", tags)
@@ -27,13 +31,13 @@ class DependencyCollector
Dependency.new(spec.to_s, tags)
end
- def output_deprecation(dependency, tags)
+ def output_deprecation(dependency, tags, new_dependency = dependency)
tags_string = if tags.length > 1
" => [:#{tags.join ", :"}]"
elsif tags.length == 1
" => :#{tags.first}"
end
odeprecated "'depends_on :#{dependency}'",
- "'depends_on \"#{dependency}\"#{tags_string}'"
+ "'depends_on \"#{new_dependency}\"#{tags_string}'"
end
end
diff --git a/Library/Homebrew/compat/requirements.rb b/Library/Homebrew/compat/requirements.rb
index 5c3c7a09c..77760d1dc 100644
--- a/Library/Homebrew/compat/requirements.rb
+++ b/Library/Homebrew/compat/requirements.rb
@@ -8,7 +8,6 @@ GPGRequirement = GPG2Requirement
TeXDependency = TeXRequirement
MercurialDependency = MercurialRequirement
GitDependency = GitRequirement
-AprDependency = AprRequirement
FortranDependency = FortranRequirement
JavaDependency = JavaRequirement
LanguageModuleDependency = LanguageModuleRequirement
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb
index 56463fa29..02c781998 100644
--- a/Library/Homebrew/dependency_collector.rb
+++ b/Library/Homebrew/dependency_collector.rb
@@ -114,7 +114,6 @@ class DependencyCollector
when :perl then PerlRequirement.new(tags)
when :tuntap then TuntapRequirement.new(tags)
when :ant then ant_dep(spec, tags)
- when :apr then AprRequirement.new(tags)
when :emacs then EmacsRequirement.new(tags)
# Tiger's ld is too old to properly link some software
when :ld64 then LD64Dependency.new if MacOS.version < :leopard
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index de53b0292..bfe56302e 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -811,6 +811,10 @@ class FormulaAuditor
problem ":#{$1} is deprecated. Usage should be \"#{$1}\""
end
+ if line =~ /depends_on :apr/
+ problem ":apr is deprecated. Usage should be \"apr-util\""
+ end
+
# Commented-out depends_on
problem "Commented-out dep #{$1}" if line =~ /#\s*depends_on\s+(.+)\s*$/
diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb
index 87b315cb7..b09dc889a 100644
--- a/Library/Homebrew/requirements.rb
+++ b/Library/Homebrew/requirements.rb
@@ -1,5 +1,4 @@
require "requirement"
-require "requirements/apr_requirement"
require "requirements/fortran_requirement"
require "requirements/gpg2_requirement"
require "requirements/language_module_requirement"
diff --git a/Library/Homebrew/requirements/apr_requirement.rb b/Library/Homebrew/requirements/apr_requirement.rb
deleted file mode 100644
index edfad1752..000000000
--- a/Library/Homebrew/requirements/apr_requirement.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require "requirement"
-
-class AprRequirement < Requirement
- fatal true
- default_formula "apr-util"
-
- # 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
- 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
- super.extend Module.new {
- def tags
- super - [:build]
- end
- }
- end
-end