diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 9676e374c24e36112b2080a1491c513b61f8d58e..f4d6a463afe7400bb7d54ad05e5923c3c99baff3 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -255,7 +255,7 @@ module Homebrew if prefix != prefix_check relocatable = false if keg_contain_absolute_symlink_starting_with?(prefix, keg) end - skip_relocation = relocatable && !keg.require_install_name_tool? + skip_relocation = relocatable && !keg.require_relocation? end puts if !relocatable && ARGV.verbose? rescue Interrupt diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 61d54ba97b8a96c82af1b8a570d6b4dab53dd352..33ee149cef4964a2a3b0b8d8587bcbf69ce67a97 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -124,7 +124,7 @@ class Keg end def self.file_linked_libraries(file, string) - # Check dynamic library linkage. Importantly, do not run otool on static + # Check dynamic library linkage. Importantly, do not perform for static # libraries, which will falsely report "linkage" to themselves. if file.mach_o_executable? || file.dylib? || file.mach_o_bundle? file.dynamically_linked_libraries.select { |lib| lib.include? string } diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index f121cbbd37cce36195ead8ec8a40f6e69559016f..029c761f776331baf60d4087d253777aaa79c5ad 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -45,26 +45,6 @@ module OS @language ||= Utils.popen_read("defaults", "read", ".GlobalPreferences", "AppleLanguages").delete(" \n\"()").sub(/,.*/, "") end - # Locates a (working) copy of install_name_tool, guaranteed to function - # whether the user has developer tools installed or not. - def install_name_tool - if (path = HOMEBREW_PREFIX/"opt/cctools/bin/install_name_tool").executable? - path - else - DevelopmentTools.locate("install_name_tool") - end - end - - # Locates a (working) copy of otool, guaranteed to function whether the user - # has developer tools installed or not. - def otool - if (path = HOMEBREW_PREFIX/"opt/cctools/bin/otool").executable? - path - else - DevelopmentTools.locate("otool") - end - end - def active_developer_dir @active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip end diff --git a/Library/Homebrew/os/mac/keg.rb b/Library/Homebrew/os/mac/keg.rb index 8505647a48039a32cad86f714bb3f797646607a6..b2a76984922ed79b1c5b4cf6429d3062ec26d068 100644 --- a/Library/Homebrew/os/mac/keg.rb +++ b/Library/Homebrew/os/mac/keg.rb @@ -1,6 +1,6 @@ class Keg def change_dylib_id(id, file) - @require_install_name_tool = true + @require_relocation = true puts "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug? MachO::Tools.change_dylib_id(file, id, strict: false) rescue MachO::MachOError @@ -13,7 +13,7 @@ class Keg end def change_install_name(old, new, file) - @require_install_name_tool = true + @require_relocation = true puts "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug? MachO::Tools.change_install_name(file, old, new, strict: false) rescue MachO::MachOError @@ -25,7 +25,7 @@ class Keg raise end - def require_install_name_tool? - @require_install_name_tool + def require_relocation? + @require_relocation end end