aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-07-09 13:52:05 +0100
committerGitHub2016-07-09 13:52:05 +0100
commitf1c414188540206370ebc85bf3b8c66c7c410e2e (patch)
tree01c0a116de4ba393c19e2f2e805969a87e496de6 /Library/Homebrew/cmd
parentdf7e36b86cf4fab3cf24a6d0888121d94ca73b8a (diff)
downloadbrew-f1c414188540206370ebc85bf3b8c66c7c410e2e.tar.bz2
keg_relocate: port to generic OS. (#453)
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/bottle.rb17
1 files changed, 5 insertions, 12 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 1975d7ccf..50ce94709 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -57,15 +57,8 @@ module Homebrew
# skip document file.
next if Metafiles::EXTENSIONS.include? file.extname
- # Check dynamic library linkage. Importantly, do not run otool on static
- # libraries, which will falsely report "linkage" to themselves.
- if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
- linked_libraries = file.dynamically_linked_libraries
- linked_libraries = linked_libraries.select { |lib| lib.include? string }
- result ||= linked_libraries.any?
- else
- linked_libraries = []
- end
+ linked_libraries = Keg.file_linked_libraries(file, string)
+ result ||= linked_libraries.any?
if ARGV.verbose?
print_filename(string, file) if linked_libraries.any?
@@ -195,9 +188,9 @@ module Homebrew
begin
unless ARGV.include? "--skip-relocation"
- keg.relocate_install_names prefix, Keg::PREFIX_PLACEHOLDER,
+ keg.relocate_dynamic_linkage prefix, Keg::PREFIX_PLACEHOLDER,
cellar, Keg::CELLAR_PLACEHOLDER
- keg.relocate_text_files prefix, Keg::PREFIX_PLACEHOLDER,
+ keg.relocate_dynamic_files prefix, Keg::PREFIX_PLACEHOLDER,
cellar, Keg::CELLAR_PLACEHOLDER
end
@@ -264,7 +257,7 @@ module Homebrew
ignore_interrupts do
original_tab.write if original_tab
unless ARGV.include? "--skip-relocation"
- keg.relocate_install_names Keg::PREFIX_PLACEHOLDER, prefix,
+ keg.relocate_dynamic_linkage Keg::PREFIX_PLACEHOLDER, prefix,
Keg::CELLAR_PLACEHOLDER, cellar
keg.relocate_text_files Keg::PREFIX_PLACEHOLDER, prefix,
Keg::CELLAR_PLACEHOLDER, cellar