From 0e6df1c3bf1c5f5d23bcfa5c668d26cf48dffd20 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 24 Oct 2013 20:29:14 -0700 Subject: [PATCH] detect_cxx_stdlibs: use mach_o_files --- Library/Homebrew/keg_fix_install_names.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb index 694daaba8a..9210e70e3f 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?