How to fix "broken ports"?
Marko Käning
MK-MacPorts at techno.ms
Wed May 23 12:56:52 PDT 2012
On May 23, 2012, at 9:53 PM, Bradley Giesbrecht wrote:
> 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}"
> }
> }
> }
> }
> …
Thanks Brad, that looks interesting. :-)
More information about the macports-dev
mailing list