From 0506c603df277a576ec5799cf7d27e9a71dd70e8 Mon Sep 17 00:00:00 2001 From: reg_ Date: Thu, 20 Dec 2012 11:52:48 +0000 Subject: [PATCH] fix install name ID for components (required for i386) --- src/macosx/cleanup_rpath.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/macosx/cleanup_rpath.py b/src/macosx/cleanup_rpath.py index aa4b983..5c167eb 100755 --- a/src/macosx/cleanup_rpath.py +++ b/src/macosx/cleanup_rpath.py @@ -61,6 +61,10 @@ except ValueError: ext = '' libname = u'lib%s%s.0.dylib' % (name[0].upper(), name[1:]) +# change ID if component to match new name/path +if is_component: + os.system('install_name_tool -id %s %s' % (basename, component)) + # run otool to get a list of deps. otool = subprocess.Popen(['otool', '-L', component], stdout=subprocess.PIPE) otool_out, otool_err = otool.communicate() @@ -78,10 +82,7 @@ for line in otool_out.split('\n'): _basename = os.path.basename(path).strip() - # remove the libXX.0.dylib from the component (optionnal) - # doesn't seem to work. - if _basename == libname: - # os.system('install_name_tool -delete_rpath %s %s' % (path, component)) + if _basename == basename: continue # is it a library link?