mxcl/homebrew — pull request #10291 by camillol (2012-02-18 01:31:00+00:00)
Title: make fix_install_names more robust

The opencv formula does not seem to install correctly. The various libraries end up with install names of the type `@loader_path/lib/libfoo.dylib`, and then fail to load each other. I worked around this by making fix_install_names a bit more robust: before fixing the recorded path for a dependent library, it checks if the new target exists; if it does not, it tries using the basename of the old path; if this still fails, an error is reported, instead of silently using a bad name.