formula_cellar_checks: .dylib and .framework are macOS-specific

This commit is contained in:
Maxim Belkin 2018-08-22 21:25:00 -05:00
parent 1c7c876f3f
commit 4f166ce021
No known key found for this signature in database
GPG Key ID: AC71560D4C5F2338
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))
check_linkage
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

View File

@ -56,7 +56,7 @@ module FormulaCellarChecks
EOS
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)
VALID_LIBRARY_EXTENSIONS.include? filename.extname