diff options
author | der richter <der.richter@gmx.de> | 2024-02-22 00:44:19 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-02-24 20:04:16 +0100 |
commit | 48f48e0d5d0bc0f3f04f2975a66991c64dc86099 (patch) | |
tree | 48e4260c225bc84acb5204caadd9955905930e31 /TOOLS | |
parent | 98f2dcb6765f618dbedc44f9d2889ce15a6ba28d (diff) | |
download | mpv-48f48e0d5d0bc0f3f04f2975a66991c64dc86099.tar.bz2 mpv-48f48e0d5d0bc0f3f04f2975a66991c64dc86099.tar.xz |
osxbundle: resolve loader_path on rpath retrieval
rpaths can be relative to the current object folder path. resolve those
paths.
Diffstat (limited to 'TOOLS')
-rwxr-xr-x | TOOLS/dylib-unhell.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/TOOLS/dylib-unhell.py b/TOOLS/dylib-unhell.py index c1a5cb142f..5221a18e00 100755 --- a/TOOLS/dylib-unhell.py +++ b/TOOLS/dylib-unhell.py @@ -50,7 +50,12 @@ def get_rapths(objfile): return rpaths for line in result.splitlines(): - rpaths.append(pathRe.search(line).group(1).strip()) + line_clean = pathRe.search(line).group(1).strip() + # resolve @loader_path + if line_clean.startswith('@loader_path/'): + line_clean = line_clean[len('@loader_path/'):] + line_clean = os.path.normpath(os.path.join(os.path.dirname(objfile), line_clean)) + rpaths.append(line_clean) return rpaths |