aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/keg_fix_install_names.rb
diff options
context:
space:
mode:
authorMisty De Meo2013-10-24 20:29:14 -0700
committerMisty De Meo2013-10-26 21:54:30 -0700
commitf6487f6a7409db3ea947e6bec62c33330ba1a2e1 (patch)
tree29285fc13a20d1b1bcc37f9478a8eee5edf86ff1 /Library/Homebrew/keg_fix_install_names.rb
parent6eeaf770a4fd76d5fe28e38d51cf3d538bf4bec2 (diff)
downloadhomebrew-f6487f6a7409db3ea947e6bec62c33330ba1a2e1.tar.bz2
detect_cxx_stdlibs: use mach_o_files
Diffstat (limited to 'Library/Homebrew/keg_fix_install_names.rb')
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 694daaba8..9210e70e3 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -47,13 +47,9 @@ class Keg
# Note that this doesn't attempt to distinguish between libstdc++ versions,
# for instance between Apple libstdc++ and GNU libstdc++
def detect_cxx_stdlibs
- return [] unless lib.exist?
-
results = Set.new
- lib.find do |file|
- next if file.symlink? || file.directory?
- next unless file.dylib?
+ mach_o_files.each do |file|
dylibs = file.dynamically_linked_libraries
results << :libcxx unless dylibs.grep(/libc\+\+.+\.dylib/).empty?
results << :libstdcxx unless dylibs.grep(/libstdc\+\+.+\.dylib/).empty?