<commit_before>require 'formula'

class Sphinx <Formula
  url 'http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz'
  homepage 'http://www.sphinxsearch.com'
  md5 '7b9b618cb9b378f949bb1b91ddcc4f54'
  head 'http://sphinxsearch.googlecode.com/svn/trunk/'

  def install
    fails_with_llvm "fails with: ld: rel32 out of range in _GetPrivateProfileString from /usr/lib/libodbc.a(SQLGetPrivateProfileString.o)"

    config_args = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"]
    # configure script won't auto-select PostgreSQL
    config_args << "--with-pgsql" if `/usr/bin/which pg_config`.size > 0
    config_args << "--without-mysql" if `/usr/bin/which mysqld`.size <= 0

    system "./configure", *config_args
    system "make install"
  end<commit_msg>sphinx - check for mysql client libs. Fixes #2262<commit_after>require 'formula'

class Sphinx <Formula
  url 'http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz'
  homepage 'http://www.sphinxsearch.com'
  md5 '7b9b618cb9b378f949bb1b91ddcc4f54'
  head 'http://sphinxsearch.googlecode.com/svn/trunk/'

  def install
    fails_with_llvm "fails with: ld: rel32 out of range in _GetPrivateProfileString from /usr/lib/libodbc.a(SQLGetPrivateProfileString.o)"

    config_args = ["--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"]
    # configure script won't auto-select PostgreSQL
    config_args << "--with-pgsql" if `/usr/bin/which pg_config`.size > 0
    config_args << "--without-mysql" if `/usr/bin/which mysql`.size <= 0

    system "./configure", *config_args
    system "make install"
  end
{'fraction_non_alphanumeric': 0.14321140731556106, 'fraction_numerical': 0.0347179169249845, 'mean_word_length': 3.9661538461538464, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1845950', 'n_tokens_mistral': 610, 'n_tokens_neox': 572, 'n_words': 116}