Please take a look at this mess to reset RPATH for all libs in a set of
binaries:
system "
cd ${build.dir};
find ${destroot}/${vtkExamplePath}/bin | grep -e '\[^(bin)\]\$' >
find.txt;
for f in `cat find.txt`; do
if \[ -f \${f} \] && \[ -x \${f} \]; then
echo install_name_tool changing link libs for \${f};
otool -L \${f} | grep 'libvtk' > otool_libs.txt;
for lib in `cat otool_libs.txt`; do
newlib=`echo \${lib} | sed
s#${build.dir}/bin#${prefix}/lib/${distname}#`;
install_name_tool -change \${lib} \${newlib} \${f};
done;
rm otool_libs.txt;
fi;
done;
rm find.txt;
"
It works, but can it be done more efficiently?
Can you do file tests in tcl, like the bash tests [ -f $f ] && [ -x $f ] ?
Darren
PS, Don't ask me why it's required ;-)
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev