Don't attempt installation multiple times

When a dependency of a formula specified on the command-line is also
specified, *after* the dependent formula, installation proceeds as part
of the dependent's dependency tree and then is attempted again because
the user asked for it explicitly. This results in the installer raising
a CannotInstallFormulaError because it has already been installed.

For example:

  $ brew install graphviz pkg-config
  ==> Installing graphviz dependency: pkg-config
  ...
  ==> Installing graphviz
  ...
  Error: pkg-config-0.27.1 already installed

We already have a mechanism for dealing with this, but it does not kick
in early enough. Move the installation attempt check into
FormulaInstaller#check_install_sanity and catch the exception in the
appropriate places.

Fixes #16957.
shiboken: use qt-project URL
pyside: use qt-project URL
exempi: Fix compilation on Xcode >= 4.3
spark 1.0.1

Closes #16996.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
z: mess around with caveats formatting
python: Allow --with-brewed-tk.

- Fixes #16574.
- Improve Tkinter test by actually calling Tk()
- Check for /Library/Frameworks/Tk.framework no longer needed.
- Fix PYTHONFRAMEWORKDIR so that `python-config --ldflags` is useful.

Closes #16626.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
sqlite: keg_only

Closes #17000.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Remove rbenv dependents directory creation.

Was needed to upgrade to the new linked directory
format in the case of a non-upgraded rbenv.
rbenv-bundler 0.95
Give a fresh 🍺 after hard work of brew install

- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).

Closes #16020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Fix build errors caused by making sqlite keg_only

- In subversion and gdal, because they used
  HOMEBREW_PREFIX/lib instead of
  Formula.factory('sqlite').opt_prefix

Closes #17005.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Revert "python: Allow --with-brewed-tk."

This reverts commit 1d8f01d8af394a7501f5bf3a1e51796c1a7548a1.

Reopens #16626, reopens #16574.
scm-manager 1.25

Closes #17009.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
youtube-dl 2013.01.11

Closes #17006.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Leiningen --devel 2.0.0-RC1

Closes #16999.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
metasploit 4.5.0

Closes #17001.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
gource 0.39

Closes #17002.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
z.rb: append the missing 'h', correct the indent.

Closes #16998.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
mongodb 2.3.2

Closes #17015.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>