With MySQL and Postgres installed when I run brew install sphinx brew dynamically adds without-mysql into args.
brew install sphinx
./configure --prefix=/usr/local/Cellar/sphinx/2.0.6 --localstatedir=/usr/local/var --with-libstemmer --with-pgsql --without-mysql
After some debugging i realize that build.include?('mysql') and which 'mysql_config' both returns nil.
So, after commented out:
args << "--without-mysql" unless build.include?('mysql') or which 'mysql_config'
and added this:
args << "--with-mysql"
Should MySQL and Postgres be supported default? How can I force MySQL support?
Brew doctor outputs Your system is raring to brew.
Your system is raring to brew.
Thank You, and sorry for my english.
I had this same problem. Mysql was already installed on my system yet this brew formula didn't think so and configured without mysql. I tried the following and it worked:
brew install sphinx --mysql
Perhaps this command can be added to the Caveats text as an example of how to force a compile against mysql.
Worked! Thanks @schlick.
Curious... If I put --mysql it will throw --with-libstemmer --with-pgsql, but without --mysql option it will throw --with-libstemmer --with-pgsql --without-mysql. Why the behaviour of mysql and postgres are diferent?
--with-libstemmer --with-pgsql --without-mysql
Issue because of and vs && differences, and calling which without parens. Posting a fix.
sphinx: fix database detection
There's a problem with the formula. If you have PG and MySQL installed on your system there's no way to force Sphinx installation with mysql option. Gonna do a PR for you.
A pull request is now available to fix this problem when you've both PGsql and MySQL installed on your system.