diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_cellar_checks.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index 939b55b1c..4b5e1cc9e 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -134,6 +134,23 @@ module FormulaCellarChecks EOS end + def check_openssl_links prefix + return unless prefix.directory? + keg = Keg.new(prefix) + system_openssl = keg.mach_o_files.select do |obj| + dlls = obj.dynamically_linked_libraries + dlls.any? { |dll| /\/usr\/lib\/lib(crypto|ssl).(\d\.)*dylib/.match dll } + end + return if system_openssl.empty? + + <<-EOS.undent + object files were linked against system openssl + These object files were linked against the deprecated system OpenSSL. + Adding `depends_on "openssl"` to the formula may help. + #{system_openssl * "\n "} + EOS + end + def audit_installed audit_check_output(check_manpages) audit_check_output(check_infopages) @@ -145,6 +162,7 @@ module FormulaCellarChecks audit_check_output(check_generic_executables(f.sbin)) audit_check_output(check_shadowed_headers) audit_check_output(check_easy_install_pth(f.lib)) + audit_check_output(check_openssl_links(f.prefix)) end private |
