On May 23, 2012, at 12:22 PM, Marko Käning wrote: > > On May 23, 2012, at 6:40 PM, Bradley Giesbrecht wrote: >> If memory serves me correctly, the first line in "otool -L" is the "id". > yes, you're right! > >> Try: >> sudo install_name_tool -id /opt/macports-test/lib/libphonon.4.dylib >> /opt/macports-test/lib/libphonon.4.dylib > It worked, as also Michael hinted out to me via PM. > > BUT, the question is how to I change the 2nd or 3rd entry in case of need???
Here are examples for install_name_tool:
echo $MP_SVNDPORTS
/opt/local/var/macports/sources/svn.macports.org/trunk/dports
find $MP_SVNDPORTS -maxdepth 3 -name Portfile -exec echo {} \; -exec grep -B3
-A1 -E "install_name_tool" {} \; | grep -B1 -v /Portfile
For lots of files you might try something like this:
...
post-destroot {
foreach lib [glob -directory ${destroot}${prefix}/lib *.dylib*] {
system "install_name_tool -id ${prefix}/lib/[strsed ${lib} /^.*\\///]
${lib}"
foreach dep [exec otool -L ${lib}] {
if [string match "${prefix}/wrong/dir/*" ${dep}] {
system "install_name_tool -change ${dep}
${prefix}/right/dir/[strsed ${dep} /^.*\\///] ${lib}"
}
}
}
}
...
Regards,
Bradley Giesbrecht (pixilla)
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
