aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorWilliam Woodruff2016-08-07 13:37:23 -0400
committerMartin Afanasjew2016-08-11 22:34:49 +0200
commit97a66aa513f515472b3c36256f4624060d5e365c (patch)
tree23e7ec3bac0815cd934ed9271d3d883f50ca0dd8 /Library
parent5caa812e2cc762f0af772a51ccf24b9524dea7a5 (diff)
downloadbrew-97a66aa513f515472b3c36256f4624060d5e365c.tar.bz2
os/mac: Update ruby-macho calls for compatibility with 0.2.5.
Closes #656. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/ruby_keg.rb4
-rw-r--r--Library/Homebrew/os/mac/ruby_mach.rb7
2 files changed, 5 insertions, 6 deletions
diff --git a/Library/Homebrew/os/mac/ruby_keg.rb b/Library/Homebrew/os/mac/ruby_keg.rb
index 26babdc3d..8f7b37419 100644
--- a/Library/Homebrew/os/mac/ruby_keg.rb
+++ b/Library/Homebrew/os/mac/ruby_keg.rb
@@ -4,7 +4,7 @@ module RubyKeg
def change_dylib_id(id, file)
@require_install_name_tool = 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)
+ MachO::Tools.change_dylib_id(file, id, :strict => false)
rescue MachO::MachOError
onoe <<-EOS.undent
Failed changing dylib ID of #{file}
@@ -17,7 +17,7 @@ module RubyKeg
def change_install_name(old, new, file)
@require_install_name_tool = true
puts "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug?
- MachO::Tools.change_install_name(file, old, new)
+ MachO::Tools.change_install_name(file, old, new, :strict => false)
rescue MachO::MachOError
onoe <<-EOS.undent
Failed changing install name in #{file}
diff --git a/Library/Homebrew/os/mac/ruby_mach.rb b/Library/Homebrew/os/mac/ruby_mach.rb
index 287ce481e..0a1565f4f 100644
--- a/Library/Homebrew/os/mac/ruby_mach.rb
+++ b/Library/Homebrew/os/mac/ruby_mach.rb
@@ -14,7 +14,7 @@ module RubyMachO
machos = []
mach_data = []
- if MachO.fat_magic?(macho.magic)
+ if MachO::Utils.fat_magic?(macho.magic)
machos = macho.machos
else
machos << macho
@@ -28,9 +28,8 @@ module RubyMachO
end
type = case m.filetype
- when "MH_EXECUTE" then :executable
- when "MH_DYLIB" then :dylib
- when "MH_BUNDLE" then :bundle
+ when :dylib, :bundle then m.filetype
+ when :execute then :executable
else :dunno
end