Please note: Homebrew is not 1.0 yet. Generally it works well, but when it doesn’t we’d hope you report the bug. If it’s still broken at 1.0 you have our permission to throw a strop and make a big fuss.
Before you report a bug, run brew doctor to diagnose known issues. If the doctor can’t help then use this checklist to correctly report the bug and we’ll get it fixed.
However! Fixing build issues is easier than you think: try brew edit formula-name and see how you fare.