[gobject-introspection] use "otool -L" instead of "ldd" on Darwin



commit 543745dfdffb15d218d7f8dd001de2a4ba10f9e7
Author: Alexey Zakhlestin <indeyets gmail com>
Date:   Fri Jun 4 14:44:01 2010 +0400

    use "otool -L" instead of "ldd" on Darwin
    
    https://bugzilla.gnome.org/show_bug.cgi?id=606686

 giscanner/shlibs.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
index cac4fdf..563a55e 100644
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
@@ -21,6 +21,7 @@
 
 import re
 import subprocess
+import platform
 
 from .utils import get_libtool_command, extract_libtool_shlib
 
@@ -71,7 +72,10 @@ def _resolve_non_libtool(options, binary, libraries):
     if libtool:
         args.extend(libtool)
         args.append('--mode=execute')
-    args.extend(['ldd', binary.args[0]])
+    if platform.system() == 'Darwin':
+        args.extend(['otool', '-L', binary.args[0]])
+    else:
+        args.extend(['ldd', binary.args[0]])
     proc = subprocess.Popen(args, stdout=subprocess.PIPE)
     patterns = {}
     for library in libraries:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]