os/mac/keg_relocate: handle libexec/lib.
We can fix up libraries in `lib` not `libexec/lib` so add an extra check for that case. Inspired by https://github.com/Homebrew/homebrew-core/pull/53790#issuecomment-637622329
This commit is contained in:
parent
7db771be30
commit
3663e9d5d1
@ -106,10 +106,12 @@ class Keg
|
||||
bad_name.sub(PREFIX_PLACEHOLDER, HOMEBREW_PREFIX)
|
||||
elsif bad_name.start_with? CELLAR_PLACEHOLDER
|
||||
bad_name.sub(CELLAR_PLACEHOLDER, HOMEBREW_CELLAR)
|
||||
elsif (file.dylib? || file.mach_o_bundle?) && (file.parent + bad_name).exist?
|
||||
elsif (file.dylib? || file.mach_o_bundle?) && (file.dirname/bad_name).exist?
|
||||
"@loader_path/#{bad_name}"
|
||||
elsif file.mach_o_executable? && (lib + bad_name).exist?
|
||||
elsif file.mach_o_executable? && (lib/bad_name).exist?
|
||||
"#{lib}/#{bad_name}"
|
||||
elsif file.mach_o_executable? && (libexec/"lib"/bad_name).exist?
|
||||
"#{libexec}/lib/#{bad_name}"
|
||||
elsif bad_name.start_with?("@rpath") && ENV["HOMEBREW_RELOCATE_METAVARS"]
|
||||
expand_rpath file, bad_name
|
||||
elsif (abs_name = find_dylib(bad_name)) && abs_name.exist?
|
||||
|
Loading…
x
Reference in New Issue
Block a user