Remove old cctools references now that only ruby-macho is used.
This commit is contained in:
parent
bbed7246bc
commit
846a5b79b6
@ -255,7 +255,7 @@ module Homebrew
|
|||||||
if prefix != prefix_check
|
if prefix != prefix_check
|
||||||
relocatable = false if keg_contain_absolute_symlink_starting_with?(prefix, keg)
|
relocatable = false if keg_contain_absolute_symlink_starting_with?(prefix, keg)
|
||||||
end
|
end
|
||||||
skip_relocation = relocatable && !keg.require_install_name_tool?
|
skip_relocation = relocatable && !keg.require_relocation?
|
||||||
end
|
end
|
||||||
puts if !relocatable && ARGV.verbose?
|
puts if !relocatable && ARGV.verbose?
|
||||||
rescue Interrupt
|
rescue Interrupt
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class Keg
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.file_linked_libraries(file, string)
|
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.
|
# libraries, which will falsely report "linkage" to themselves.
|
||||||
if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
|
if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
|
||||||
file.dynamically_linked_libraries.select { |lib| lib.include? string }
|
file.dynamically_linked_libraries.select { |lib| lib.include? string }
|
||||||
|
|||||||
@ -45,26 +45,6 @@ module OS
|
|||||||
@language ||= Utils.popen_read("defaults", "read", ".GlobalPreferences", "AppleLanguages").delete(" \n\"()").sub(/,.*/, "")
|
@language ||= Utils.popen_read("defaults", "read", ".GlobalPreferences", "AppleLanguages").delete(" \n\"()").sub(/,.*/, "")
|
||||||
end
|
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
|
def active_developer_dir
|
||||||
@active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip
|
@active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
class Keg
|
class Keg
|
||||||
def change_dylib_id(id, file)
|
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?
|
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)
|
MachO::Tools.change_dylib_id(file, id, strict: false)
|
||||||
rescue MachO::MachOError
|
rescue MachO::MachOError
|
||||||
@ -13,7 +13,7 @@ class Keg
|
|||||||
end
|
end
|
||||||
|
|
||||||
def change_install_name(old, new, file)
|
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?
|
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)
|
MachO::Tools.change_install_name(file, old, new, strict: false)
|
||||||
rescue MachO::MachOError
|
rescue MachO::MachOError
|
||||||
@ -25,7 +25,7 @@ class Keg
|
|||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
|
|
||||||
def require_install_name_tool?
|
def require_relocation?
|
||||||
@require_install_name_tool
|
@require_relocation
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user