Use predicate methods instead of inspecting the tags array
This commit is contained in:
parent
177eee419a
commit
330e18bb17
@ -148,9 +148,9 @@ class FormulaAuditor
|
|||||||
dep.options.reject do |opt|
|
dep.options.reject do |opt|
|
||||||
next true if dep_f.build.has_option?(opt.name)
|
next true if dep_f.build.has_option?(opt.name)
|
||||||
dep_f.requirements.detect do |r|
|
dep_f.requirements.detect do |r|
|
||||||
if r.tags.include? :recommended
|
if r.recommended?
|
||||||
opt.name == "with-#{r.name}"
|
opt.name == "with-#{r.name}"
|
||||||
elsif r.tags.include? :optional
|
elsif r.optional?
|
||||||
opt.name == "without-#{r.name}"
|
opt.name == "without-#{r.name}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class CxxStdlib
|
|||||||
# Software is unlikely to link against anything from its
|
# Software is unlikely to link against anything from its
|
||||||
# buildtime deps, so it doesn't matter at all if they link
|
# buildtime deps, so it doesn't matter at all if they link
|
||||||
# against different C++ stdlibs
|
# against different C++ stdlibs
|
||||||
next if dep.tags.include? :build
|
next if dep.build?
|
||||||
|
|
||||||
dep_stdlib = Tab.for_formula(dep.to_formula).cxxstdlib
|
dep_stdlib = Tab.for_formula(dep.to_formula).cxxstdlib
|
||||||
if !compatible_with? dep_stdlib
|
if !compatible_with? dep_stdlib
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class PythonDependency < Requirement
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pour_bottle?
|
def pour_bottle?
|
||||||
tags.include?(:build) || system_python?
|
build? || system_python?
|
||||||
end
|
end
|
||||||
|
|
||||||
def modify_build_environment
|
def modify_build_environment
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user