brianmario/charlock_holmes — pull request #55 by g-nix (2013-12-12 06:58:45+00:00)
Title: Update libmagic; link system ICU on Darwin; use RbConfig CFLAGS, etc.

This pull request includes changes intended to allow the resolution of #29, #40, #42 (partial), #43, #49, #50, #51, #52.

- file/libmagic (and patch) updated to 5.16.
- extconf.rb modified to:
- enforce RbConfig compiler and related flags.
- fix for non-GNU 'make' (ie, no ```make -C```).
- remove 'dst' build directory after compiling.
- **Build and link against system ICU on Darwin.**
I've included a minimal subset of the ICU headers in ```darwin-icu-headers.tar.gz```,
taken from the [Apple ICU](http://www.opensource.apple.com/source/ICU/ICU-461.18) source (Apple doesn't distribute these headers because they prefer you use their client frameworks like Core Text, etc., but they're available freely at the link above). These headers are from the version bundled with 10.7 (10.6 was too old, so I've retained the check for homebrew icu4c on older versions).

I've tested that they work on 10.9, so presumably it should work on 10.7 and 10.8 as well.
If anyone can confirm that, that would be great.

I think perhaps this is a better solution than relying on ```brew install icu4c```?