In case you also need to work with legacy software and for example Thinking Sphinx won't recognise Sphinx version 2, you will have to fall back to version 0.9.
But no, no that's not so easy on Mountain Lion, and Homebrew won't help you there. Well, at least not out of the box.
I've done the following:
$ cd `brew --prefix` $ git checkout e37c64c Library/Formula/sphinx.rb $ export CC="gcc-4.2" $ brew install sphinx --use-gcc
This should help you build and compile Sphinx 0.9.9 on Mountain Lion:
$ indexer --version Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff
I'm a Ruby/JS dev/trainer with a focus on quality. An ex-Londoner, @terracycle, @ubxd, @lastfm. Follow me at http://twitter.com/attilagyorffy