diff options
| author | William Woodruff | 2016-09-20 17:37:08 -0400 |
|---|---|---|
| committer | William Woodruff | 2016-09-20 17:48:21 -0400 |
| commit | d16e4a782efb217070159bfb182cc10f8b68a426 (patch) | |
| tree | 0027466aacd91dd5435dacc4c65cf02400b7792c /Library/Homebrew/os/mac/ruby_mach.rb | |
| parent | f6fef7cdce5302ae6f3fed357612d31d1d08cd5a (diff) | |
| download | brew-d16e4a782efb217070159bfb182cc10f8b68a426.tar.bz2 | |
os/mac: Delete old cctools-based relocation code.
Disable check for $HOMEBREW_NO_RUBY_MACHO now that no alternative exists.
Diffstat (limited to 'Library/Homebrew/os/mac/ruby_mach.rb')
| -rw-r--r-- | Library/Homebrew/os/mac/ruby_mach.rb | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/Library/Homebrew/os/mac/ruby_mach.rb b/Library/Homebrew/os/mac/ruby_mach.rb deleted file mode 100644 index 5d0e75c31..000000000 --- a/Library/Homebrew/os/mac/ruby_mach.rb +++ /dev/null @@ -1,60 +0,0 @@ -require "vendor/macho/macho" - -module RubyMachO - # @private - def macho - @macho ||= begin - MachO.open(to_s) - end - end - - # @private - def mach_data - @mach_data ||= begin - machos = [] - mach_data = [] - - if MachO::Utils.fat_magic?(macho.magic) - machos = macho.machos - else - machos << macho - end - - machos.each do |m| - arch = case m.cputype - when :x86_64, :i386, :ppc64 then m.cputype - when :ppc then :ppc7400 - else :dunno - end - - type = case m.filetype - when :dylib, :bundle then m.filetype - when :execute then :executable - else :dunno - end - - mach_data << { arch: arch, type: type } - end - - mach_data - rescue MachO::NotAMachOError - # Silently ignore errors that indicate the file is not a Mach-O binary ... - [] - rescue - # ... but complain about other (parse) errors for further investigation. - if ARGV.homebrew_developer? - onoe "Failed to read Mach-O binary: #{self}" - raise - end - [] - end - end - - def dynamically_linked_libraries - macho.linked_dylibs - end - - def dylib_id - macho.dylib_id - end -end |
