diff options
| author | William Woodruff | 2016-02-01 14:19:29 -0500 |
|---|---|---|
| committer | Mike McQuaid | 2016-02-03 21:25:40 +0000 |
| commit | afe0fde49ceb29aba6f152967582ced5ba206c32 (patch) | |
| tree | 53150351cfd4f4c96fa3f94d2d4f7e08fb890f1b /Library/Homebrew/os/mac/ruby_keg.rb | |
| parent | 1cb6a2ad186624b9013eb63fb0a5f14a1336a53c (diff) | |
| download | brew-afe0fde49ceb29aba6f152967582ced5ba206c32.tar.bz2 | |
os/mac: optionally use ruby_macho.
- and branch for dylib_id_and_dylibs
- add branches for dylib id changing and change_install_name
- rename MachO module to HomebrewMachO to prevent namespace clashes
with MachO in ruby-macho. this will eventually be replaced entirely
with direct calls to ruby-macho methods
- break ruby-macho implementation out into separate RubyMachO module,
and include either RubyMachO or CctoolsMachO (the original
implementation) based on the HOMEBREW_RUBY_MACHO env var
- move ArchitectureListExtension and RubyMachO into separate files
- create {ruby_,cctools_,,}relocate.rb for isolation of different
methods of mach-o relocation (ruby-macho vs. cctools)
- fill in require_install_name_tool? for ruby_relocate.rb
- rename {ruby_,cctools_,,}relocate.rb to keg, isolate requires in
os/mac
Closes Homebrew/homebrew#45001.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/os/mac/ruby_keg.rb')
| -rw-r--r-- | Library/Homebrew/os/mac/ruby_keg.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/ruby_keg.rb b/Library/Homebrew/os/mac/ruby_keg.rb new file mode 100644 index 000000000..f6fc33495 --- /dev/null +++ b/Library/Homebrew/os/mac/ruby_keg.rb @@ -0,0 +1,19 @@ +require "vendor/macho/macho" + +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) + end + + 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) + end + + def require_install_name_tool? + !!@require_install_name_tool + end +end |
