diff options
| author | Josh Hagins | 2016-10-24 16:44:36 -0400 |
|---|---|---|
| committer | GitHub | 2016-10-24 16:44:36 -0400 |
| commit | 79e8cdd3ed8c7f5dee573648d55eb3d3e305de19 (patch) | |
| tree | 4228093e30d00c9568538342adf8ef10c55377cd /Library/Homebrew/extend | |
| parent | e6bce5ec27306e85a8312400f44d8b9685f9e981 (diff) | |
| parent | fab2cffe5de82b6d540fcf3f4f8873f7cd89af34 (diff) | |
| download | brew-79e8cdd3ed8c7f5dee573648d55eb3d3e305de19.tar.bz2 | |
Merge pull request #1253 from jawshooah/perf/relocate-text-files
keg_relocate: cache files rewritten during brew bottle
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/os/mac/keg_relocate.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/extend/os/mac/keg_relocate.rb b/Library/Homebrew/extend/os/mac/keg_relocate.rb index 33ee149ce..8f73daba5 100644 --- a/Library/Homebrew/extend/os/mac/keg_relocate.rb +++ b/Library/Homebrew/extend/os/mac/keg_relocate.rb @@ -17,19 +17,19 @@ class Keg generic_fix_dynamic_linkage end - def relocate_dynamic_linkage(old_prefix, new_prefix, old_cellar, new_cellar) + def relocate_dynamic_linkage(relocation) mach_o_files.each do |file| file.ensure_writable do if file.dylib? - id = dylib_id_for(file).sub(old_prefix, new_prefix) + id = dylib_id_for(file).sub(relocation.old_prefix, relocation.new_prefix) change_dylib_id(id, file) end each_install_name_for(file) do |old_name| - if old_name.start_with? old_cellar - new_name = old_name.sub(old_cellar, new_cellar) - elsif old_name.start_with? old_prefix - new_name = old_name.sub(old_prefix, new_prefix) + if old_name.start_with? relocation.old_cellar + new_name = old_name.sub(relocation.old_cellar, relocation.new_cellar) + elsif old_name.start_with? relocation.old_prefix + new_name = old_name.sub(relocation.old_prefix, relocation.new_prefix) end change_install_name(old_name, new_name, file) if new_name |
