summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-06-11 22:34:01 +0000
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-06-21 14:06:06 +0100
commitc10059d0952c0b496f7721c382368e3d42e4478d (patch)
tree0e03c371235614a5be987cd30d12e0a8a38ee06f
parente453fb29cb074ec6d6e120b184e24a05190ecebf (diff)
osxrelocator: Fix RPATHs in deeply nested libraries1.24.5
With the removal of the `lib` subfolder in the dylib IDs, this needs to be accounted for in the RPATH nesting calculations. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1491>
-rwxr-xr-xcerbero/tools/osxrelocator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cerbero/tools/osxrelocator.py b/cerbero/tools/osxrelocator.py
index 737d72d5..42fb44bf 100755
--- a/cerbero/tools/osxrelocator.py
+++ b/cerbero/tools/osxrelocator.py
@@ -87,13 +87,13 @@ class OSXRelocator(object):
self.change_id(object_file, id='@rpath/{}'.format(os.path.basename(original_file)))
# With that out of the way, we need to sort out how many parents
# need to be navigated to reach the root of the GStreamer prefix
- depth = len(original_file.split('/')) - len(self.lib_prefix.split('/')) - 1
+ depth = len(original_file.split('/')) - len(self.lib_prefix.split('/'))
p_depth = '/..' * depth
rpaths = [
# From a deeply nested library
- f'@loader_path{p_depth}',
+ f'@loader_path{p_depth}/lib',
# From a deeply nested framework or binary
- f'@executable_path{p_depth}',
+ f'@executable_path{p_depth}/lib',
# From a library within the prefix
'@loader_path/../lib',
# From a binary within the prefix