aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/keg_fix_install_names.rb
diff options
context:
space:
mode:
authorJack Nagel2014-06-26 19:06:31 -0500
committerJack Nagel2014-06-26 20:07:11 -0500
commitee2240bc661c6d9e49c63bbdd8d1e92b7d630b43 (patch)
tree344329fefd8a82cdfc6e0142a297088c0caacea4 /Library/Homebrew/keg_fix_install_names.rb
parentf786509703d6920daf0664c84ae5be0eab959e2a (diff)
downloadhomebrew-ee2240bc661c6d9e49c63bbdd8d1e92b7d630b43.tar.bz2
Keg no longer inherits from Pathname
Diffstat (limited to 'Library/Homebrew/keg_fix_install_names.rb')
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 049b0e7a8..ad98f77d6 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -1,4 +1,4 @@
-class Keg < Pathname
+class Keg
PREFIX_PLACEHOLDER = "@@HOMEBREW_PREFIX@@".freeze
CELLAR_PLACEHOLDER = "@@HOMEBREW_CELLAR@@".freeze
@@ -121,7 +121,9 @@ class Keg < Pathname
end
end
- def lib; join 'lib' end
+ def lib
+ path.join("lib")
+ end
def each_install_name_for file, &block
dylibs = file.dynamically_linked_libraries
@@ -133,7 +135,7 @@ class Keg < Pathname
# The new dylib ID should have the same basename as the old dylib ID, not
# the basename of the file itself.
basename = File.basename(file.dylib_id)
- relative_dirname = file.dirname.relative_path_from(self)
+ relative_dirname = file.dirname.relative_path_from(path)
shortpath = HOMEBREW_PREFIX.join(relative_dirname, basename)
if shortpath.exist? and not options[:keg_only]
@@ -150,7 +152,7 @@ class Keg < Pathname
def mach_o_files
mach_o_files = []
dirs = %w{bin lib Frameworks}
- dirs.map! { |dir| join(dir) }
+ dirs.map! { |dir| path.join(dir) }
dirs.reject! { |dir| not dir.directory? }
dirs.each do |dir|
@@ -179,7 +181,7 @@ class Keg < Pathname
pkgconfig_files = []
%w[lib share].each do |dir|
- pcdir = join(dir, "pkgconfig")
+ pcdir = path.join(dir, "pkgconfig")
pcdir.find do |pn|
next if pn.symlink? or pn.directory? or pn.extname != '.pc'