aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-04 22:37:57 -0600
committerJack Nagel2013-12-04 22:37:57 -0600
commite3bd9b26073a27fded49117aea13dec25c771d99 (patch)
treee7e0df43a4d1f17d99bdcc33f1815734993e9c8e /Library
parentf2aaa5f0ac615dbf3560085652baf4c8af202bac (diff)
downloadbrew-e3bd9b26073a27fded49117aea13dec25c771d99.tar.bz2
Let fix_install_names fix up placeholders too
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 716fcf874..1c25c7efe 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -104,15 +104,16 @@ class Keg
# bad_name relative to the lib directory, so that we can skip the more
# expensive recursive search if possible.
def fixed_name(file, bad_name)
- if (file.dylib? || file.mach_o_bundle?) && (file.parent + bad_name).exist?
+ if bad_name.start_with? PREFIX_PLACEHOLDER
+ bad_name.sub(PREFIX_PLACEHOLDER, HOMEBREW_PREFIX.to_s)
+ elsif bad_name.start_with? CELLAR_PLACEHOLDER
+ bad_name.sub(CELLAR_PLACEHOLDER, HOMEBREW_CELLAR.to_s)
+ elsif (file.dylib? || file.mach_o_bundle?) && (file.parent + bad_name).exist?
"@loader_path/#{bad_name}"
elsif file.mach_o_executable? && (lib + bad_name).exist?
"#{lib}/#{bad_name}"
elsif (abs_name = find_dylib(Pathname.new(bad_name).basename)) && abs_name.exist?
abs_name.to_s
- elsif bad_name.start_with? PREFIX_PLACEHOLDER, CELLAR_PLACEHOLDER
- # Skip these, relocate_install_names will fix them
- bad_name
else
opoo "Could not fix #{bad_name} in #{file}"
bad_name