Restore Formula#declared_runtime_dependencies

This got lost in a merge.
This commit is contained in:
Alyssa Ross 2018-04-07 12:16:10 +01:00
parent 6bbc56c3a9
commit 264acb22f4
No known key found for this signature in database
GPG Key ID: 6CF064D149E3ABDB

View File

@ -1498,6 +1498,13 @@ class Formula
declared_runtime_dependencies | undeclared_runtime_dependencies declared_runtime_dependencies | undeclared_runtime_dependencies
end end
def declared_runtime_dependencies
recursive_dependencies do |_, dependency|
Dependency.prune if dependency.build?
Dependency.prune if !dependency.required? && build.without?(dependency)
end
end
def undeclared_runtime_dependencies def undeclared_runtime_dependencies
if optlinked? if optlinked?
keg = Keg.new(opt_prefix) keg = Keg.new(opt_prefix)