[gobject-introspection/gnome-3-28] giscanner: fix --no-libtool on macOS



commit d0b04f18777eb170d84fcc1cdb1ddacad66bcd33
Author: Tom Schoonjans <Tom Schoonjans diamond ac uk>
Date:   Wed Feb 14 08:17:46 2018 +0000

    giscanner: fix --no-libtool on macOS
    
    Currently g-ir-scanner fails on macOS when invoked in --no-libtool mode
    if the library it links to has not been installed into its destination
    (which is likely to be the case). In libtool mode this issue does not
    occur as DYLD_LIBRARY_PATH will get set by libtool in an appropriate
    manner. This patch ensures DYLD_LIBRARY_PATH will get set.
    
    This patch is also essential for meson and cmake to generate
    gobject-introspection bindings.
    
    More information can be found e.g. at
    https://mail.gnome.org/archives/gtk-osx-users-list/2018-February/msg00000.html,
    and the github repo that was produced subsequently at
    https://github.com/wagavulin/gir-mac-sample.

 giscanner/ccompiler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index a8bd5b13..d10327c8 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -119,7 +119,7 @@ class CCompiler(object):
         if os.name == 'nt':
             runtime_path_envvar = ['LIB', 'PATH']
         else:
-            runtime_path_envvar = ['LD_LIBRARY_PATH']
+            runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH']
             # Search the current directory first
             # (This flag is not supported nor needed for Visual C++)
             args.append('-L.')


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