sphinx: use new dsl

master
Adam Vandenberg 2012-08-26 19:28:16 -07:00
parent 4caca1fa46
commit f65977406a
1 changed files with 6 additions and 10 deletions

View File

@ -27,13 +27,9 @@ class Sphinx < Formula
EOS
end
def options
[
['--mysql', 'Force compiling against MySQL.'],
['--pgsql', 'Force compiling against PostgreSQL.'],
['--id64', 'Force compiling with 64-bit ID support'],
]
end
option 'mysql', 'Force compiling against MySQL'
option 'pgsql', 'Force compiling against PostgreSQL'
option 'id64', 'Force compiling with 64-bit ID support'
def install
Libstemmer.new.brew { (buildpath/'libstemmer_c').install Dir['*'] }
@ -46,9 +42,9 @@ class Sphinx < Formula
args << "--with-libstemmer"
# configure script won't auto-select PostgreSQL
args << "--with-pgsql" if ARGV.include?('--pgsql') or which 'pg_config'
args << "--enable-id64" if ARGV.include?('--id64')
args << "--without-mysql" unless ARGV.include?('--mysql') or which 'mysql_config'
args << "--with-pgsql" if build.include?('pgsql') or which 'pg_config'
args << "--enable-id64" if build.include?('id64')
args << "--without-mysql" unless build.include?('mysql') or which 'mysql_config'
system "./configure", *args
system "make install"