robotastic/homebrew-hackrf — pull request #1 by mistydemeo (2013-08-03 06:23:25+00:00)
Title: gnuradio: use fails_with to control compilers

It's much cleaner to select compilers using the `fails_with` than by specifying a dependency and hardcoding the compiler. If the user doesn't have any compatible compilers, the build will error out and they'll be given a helpful error message telling them how to get gcc-4.2.

A few reasons why this approach works better:

* Users on Xcode 4.1 and earlier already have gcc-4.2 and don't need the one from homebrew/dupes.
* Some users on Xcode 4.2 and later still have gcc-4.2 leftover if they'd had 4.1 or earlier installed in the past.
* The gcc-4.2 from homebrew/dupes is only compatible with Lion or later.
* Hardcoding `/usr/local/bin/gcc-4.2` doesn't work for users on 4.1 or earlier (they have it at a different location), or users with Homebrew installed to an alternate prefix.