Homebrew/homebrew — pull request #33384 by driskell (2014-10-20 13:50:44+00:00)
Title: Fix RE2 install-name preventing dynamic libraries from loading libre2.dylib

Hi,

The default make for re2 doesn't correctly set the install_name, so the library generated cannot be used by other libraries. Use by other binaries works OK.

Specifically, I'm trying to compile Ruby re2 extension, and using this formula it fails due to the libre2.dylib file actually having "libre2.so" as its install_name, thus the compiled ruby extension points to the incorrect library location.

Fixed it by adding an in replace to add the install_name parameter. Hopefully this is acceptable as a patch to fix the existing version. This is only an issue due to the "mv" which renames from .so to .dylib, which breaks the install_name - so they come hand in hand.

I will raise with upstream at some point to have .dylib files generated instead of .so for Mac so none of this "mv" or install_name is required.

Jason