Library/Homebrew/extend/os/mac/keg_relocate.rb
# If file is a dylib or bundle itself, look for the dylib named by
# bad_name relative to the lib directory, so that we can skip the more
# expensive recursive search if possible.
If file is a dylib or bundle itself, look for the dylib named by
bad_name relative to the lib directory, so that we can skip the more
expensive recursive search if possible.
If file is a dylib or bundle itself look for the dylib named by bad_name relative to the lib directory so that we can skip the more expensive recursive search if possible .
def fixed_name(file, bad_name)
    if bad_name.start_with? PREFIX_PLACEHOLDER
      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?
      "@loader_path/#{bad_name}"
    elsif file.mach_o_executable? && (lib + bad_name).exist?
      "#{lib}/#{bad_name}"
    elsif (abs_name = find_dylib(bad_name)) && abs_name.exist?
      abs_name.to_s
    else
      opoo "Could not fix #{bad_name} in #{file}"
      bad_name
    end
  end
def fixed_name ( file , bad_name ) if bad_name . start_with? PREFIX_PLACEHOLDER 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? "@loader_path/#{bad_name}" elsif file . mach_o_executable? && ( lib + bad_name ) . exist? "#{lib}/#{bad_name}" elsif ( abs_name = find_dylib ( bad_name ) ) && abs_name . exist? abs_name . to_s else opoo "Could not fix #{bad_name} in #{file}" bad_name end end
If file is a dylib or bundle itself, look for the dylib named by
bad_name relative to the lib directory, so that we can skip the more
expensive recursive search if possible.
If file is a dylib or bundle itself look for the dylib named by bad_name relative to the lib directory so that we can skip the more expensive recursive search if possible .
file
bad_name