[gtk-mac-bundler] Delete leading path elements matching '@[a-z]+'.



commit 3e96e7a9de75779f50836f9fcfb32599d26a5592
Author: John Ralls <jralls ceridwen us>
Date:   Sat Nov 18 14:24:24 2017 -0800

    Delete leading path elements matching '@[a-z]+'.
    
    Meaning @rpath, @loader_path, @executable_path, etc. The libraries must
    be in $prefix/lib for one of the prefixes set in the bundle file.
    
    Works around cmake's habit of setting @rpath in dependency names.

 bundler/bundler.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/bundler/bundler.py b/bundler/bundler.py
index 4add405..13ebc65 100644
--- a/bundler/bundler.py
+++ b/bundler/bundler.py
@@ -301,6 +301,8 @@ class Bundler:
         def relative_path_map(line):
             if not os.path.isabs(line):
                 for prefix in list(prefixes.values()):
+                    if line.startswith('@'):
+                        line = re.sub(r'@[-a-z]+/', '', line)
                     path = os.path.join(prefix, "lib", line)
                     if os.path.exists(path):
                         return path


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