aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-07-23 16:29:37 +0800
committerXu Cheng2015-07-23 16:29:37 +0800
commitde6a9ff055f9f691f132b03d297268590a42a541 (patch)
tree7ba3b67cf7d91ea06fb0e91204117f2efdb477b9 /Library
parentfd7f3b949659cedef62ac58258c652bea58ef1a7 (diff)
downloadbrew-de6a9ff055f9f691f132b03d297268590a42a541.tar.bz2
keg_relocate: relocate libtool files
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg_relocate.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index 04e542141..1541d4695 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -38,7 +38,9 @@ class Keg
end
end
- text_files.group_by { |f| f.stat.ino }.each_value do |first, *rest|
+ files = text_files | libtool_files
+
+ files.group_by { |f| f.stat.ino }.each_value do |first, *rest|
s = first.open("rb", &:read)
changed = s.gsub!(old_cellar, new_cellar)
changed = s.gsub!(old_prefix, new_prefix) || changed
@@ -171,4 +173,15 @@ class Keg
text_files
end
+
+ def libtool_files
+ libtool_files = []
+
+ # find .la files, which are stored in lib/
+ lib.find do |pn|
+ next if pn.symlink? or pn.directory? or pn.extname != '.la'
+ libtool_files << pn
+ end if lib.directory?
+ libtool_files
+ end
end