From c10059d0952c0b496f7721c382368e3d42e4478d Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Tue, 11 Jun 2024 22:34:01 +0000 Subject: osxrelocator: Fix RPATHs in deeply nested libraries With the removal of the `lib` subfolder in the dylib IDs, this needs to be accounted for in the RPATH nesting calculations. Part-of: --- cerbero/tools/osxrelocator.py | 6 +++--- 1 file 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 -- cgit v1.2.3