Merge pull request #1271 from MikeMcQuaid/deprecate-apr-requirement
Deprecate apr requirement.
This commit is contained in:
commit
fd0dffdd77
@ -13,6 +13,10 @@ class DependencyCollector
|
|||||||
when :cairo, :fontconfig, :freetype, :libpng, :pixman
|
when :cairo, :fontconfig, :freetype, :libpng, :pixman
|
||||||
output_deprecation(spec, tags)
|
output_deprecation(spec, tags)
|
||||||
Dependency.new(spec.to_s, 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
|
when :libltdl
|
||||||
tags << :run
|
tags << :run
|
||||||
output_deprecation("libtool", tags)
|
output_deprecation("libtool", tags)
|
||||||
@ -27,13 +31,13 @@ class DependencyCollector
|
|||||||
Dependency.new(spec.to_s, tags)
|
Dependency.new(spec.to_s, tags)
|
||||||
end
|
end
|
||||||
|
|
||||||
def output_deprecation(dependency, tags)
|
def output_deprecation(dependency, tags, new_dependency = dependency)
|
||||||
tags_string = if tags.length > 1
|
tags_string = if tags.length > 1
|
||||||
" => [:#{tags.join ", :"}]"
|
" => [:#{tags.join ", :"}]"
|
||||||
elsif tags.length == 1
|
elsif tags.length == 1
|
||||||
" => :#{tags.first}"
|
" => :#{tags.first}"
|
||||||
end
|
end
|
||||||
odeprecated "'depends_on :#{dependency}'",
|
odeprecated "'depends_on :#{dependency}'",
|
||||||
"'depends_on \"#{dependency}\"#{tags_string}'"
|
"'depends_on \"#{new_dependency}\"#{tags_string}'"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -8,7 +8,6 @@ GPGRequirement = GPG2Requirement
|
|||||||
TeXDependency = TeXRequirement
|
TeXDependency = TeXRequirement
|
||||||
MercurialDependency = MercurialRequirement
|
MercurialDependency = MercurialRequirement
|
||||||
GitDependency = GitRequirement
|
GitDependency = GitRequirement
|
||||||
AprDependency = AprRequirement
|
|
||||||
FortranDependency = FortranRequirement
|
FortranDependency = FortranRequirement
|
||||||
JavaDependency = JavaRequirement
|
JavaDependency = JavaRequirement
|
||||||
LanguageModuleDependency = LanguageModuleRequirement
|
LanguageModuleDependency = LanguageModuleRequirement
|
||||||
|
|||||||
@ -114,7 +114,6 @@ class DependencyCollector
|
|||||||
when :perl then PerlRequirement.new(tags)
|
when :perl then PerlRequirement.new(tags)
|
||||||
when :tuntap then TuntapRequirement.new(tags)
|
when :tuntap then TuntapRequirement.new(tags)
|
||||||
when :ant then ant_dep(spec, tags)
|
when :ant then ant_dep(spec, tags)
|
||||||
when :apr then AprRequirement.new(tags)
|
|
||||||
when :emacs then EmacsRequirement.new(tags)
|
when :emacs then EmacsRequirement.new(tags)
|
||||||
# Tiger's ld is too old to properly link some software
|
# Tiger's ld is too old to properly link some software
|
||||||
when :ld64 then LD64Dependency.new if MacOS.version < :leopard
|
when :ld64 then LD64Dependency.new if MacOS.version < :leopard
|
||||||
|
|||||||
@ -811,6 +811,10 @@ class FormulaAuditor
|
|||||||
problem ":#{$1} is deprecated. Usage should be \"#{$1}\""
|
problem ":#{$1} is deprecated. Usage should be \"#{$1}\""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if line =~ /depends_on :apr/
|
||||||
|
problem ":apr is deprecated. Usage should be \"apr-util\""
|
||||||
|
end
|
||||||
|
|
||||||
# Commented-out depends_on
|
# Commented-out depends_on
|
||||||
problem "Commented-out dep #{$1}" if line =~ /#\s*depends_on\s+(.+)\s*$/
|
problem "Commented-out dep #{$1}" if line =~ /#\s*depends_on\s+(.+)\s*$/
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
require "requirement"
|
require "requirement"
|
||||||
require "requirements/apr_requirement"
|
|
||||||
require "requirements/fortran_requirement"
|
require "requirements/fortran_requirement"
|
||||||
require "requirements/gpg2_requirement"
|
require "requirements/gpg2_requirement"
|
||||||
require "requirements/language_module_requirement"
|
require "requirements/language_module_requirement"
|
||||||
|
|||||||
@ -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
|
|
||||||
Loading…
x
Reference in New Issue
Block a user