Skip to content
Snippets Groups Projects
Unverified Commit 846a5b79 authored by William Woodruff's avatar William Woodruff
Browse files

Remove old cctools references now that only ruby-macho is used.

parent bbed7246
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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 }
......
......@@ -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
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment