Merge pull request #4743 from maxim-belkin/mac-libs

formula_cellar_checks: .dylib and .framework are macOS-specific
This commit is contained in:
Shaun Jackman 2018-08-23 08:31:38 -07:00 committed by GitHub
commit ef149f2e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -94,4 +94,9 @@ module FormulaCellarChecks
problem_if_output(check_python_framework_links(formula.lib)) problem_if_output(check_python_framework_links(formula.lib))
check_linkage check_linkage
end end
def valid_library_extension?(filename)
macos_lib_extensions = %w[.dylib .framework]
generic_valid_library_extension?(filename) || macos_lib_extensions.include?(filename.extname)
end
end end

View File

@ -56,7 +56,7 @@ module FormulaCellarChecks
EOS EOS
end end
VALID_LIBRARY_EXTENSIONS = %w[.a .dylib .framework .jnilib .la .o .so .jar .prl .pm .sh].freeze VALID_LIBRARY_EXTENSIONS = %w[.a .jnilib .la .o .so .jar .prl .pm .sh].freeze
def valid_library_extension?(filename) def valid_library_extension?(filename)
VALID_LIBRARY_EXTENSIONS.include? filename.extname VALID_LIBRARY_EXTENSIONS.include? filename.extname