diff options
| author | Adam Vandenberg | 2012-04-14 10:01:57 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-04-14 10:01:57 -0700 |
| commit | 8dbb32e1b5210a74d813734ab3e1cfca8f4c7283 (patch) | |
| tree | d6ebd2f48cf6f83f5ed39e730f5bcda5cb1d94be /Library | |
| parent | 1262d0f629a26bebcef519b49f4c9ac8cad0ef62 (diff) | |
| download | homebrew-8dbb32e1b5210a74d813734ab3e1cfca8f4c7283.tar.bz2 | |
Sphix: add options to force database selection
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/sphinx.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Formula/sphinx.rb b/Library/Formula/sphinx.rb index 497ab7b4f..e7f9a0ee5 100644 --- a/Library/Formula/sphinx.rb +++ b/Library/Formula/sphinx.rb @@ -32,6 +32,13 @@ class Sphinx < Formula EOS end + def options + [ + ['--mysql', 'Force compiling against MySQL.'], + ['--pgsql', 'Force compiling against PostgreSQL.'], + ] + end + def install lstem = Pathname.pwd+'libstemmer_c' Libstemmer.new.brew { lstem.install Dir['*'] } @@ -45,8 +52,8 @@ class Sphinx < Formula args << "--with-libstemmer" # configure script won't auto-select PostgreSQL - args << "--with-pgsql" if which 'pg_config' - args << "--without-mysql" unless which 'mysql_config' + args << "--with-pgsql" if ARGV.include?('--pgsql') or which 'pg_config' + args << "--without-mysql" unless ARGV.include?('--mysql') or which 'mysql_config' system "./configure", *args system "make install" |
