<commit_before>require 'formula'

class SagaCore < Formula
  homepage 'http://saga-project.org'
  url 'http://download.saga.cct.lsu.edu/saga-core/saga-core-1.6.tgz'
  md5 'a5cda84bdae1f96646f39fda0aa7db73'

  head 'https://svn.cct.lsu.edu/repos/saga/core/trunk/'

  depends_on 'boost'
  depends_on 'postgresql'

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--with-boost=#{HOMEBREW_PREFIX}",
                          "--with-postgresql=#{HOMEBREW_PREFIX}"
    system "make install"
  end<commit_msg>saga-core: fix audit warning<commit_after>require 'formula'

class PostgresqlInstalled < Requirement
  def message; <<-EOS.undent
    PostgresQL is required to install.

    You can install this with:
      brew install postgresql

    Or you can use an official installer from:
      http://www.postgresql.org/
    EOS
  end
  def satisfied?
    which 'pg_config'
  end
  def fatal?
    true
  end
end

class SagaCore < Formula
  homepage 'http://saga-project.org'
  url 'http://download.saga.cct.lsu.edu/saga-core/saga-core-1.6.tgz'
  sha1 '89cc089b4feb5aae01ae5d371477d2d9a5204f1d'

  head 'https://svn.cct.lsu.edu/repos/saga/core/trunk/'

  depends_on 'boost'
  depends_on PostgresqlInstalled.new

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--with-boost=#{HOMEBREW_PREFIX}",
                          "--with-postgresql=#{HOMEBREW_PREFIX}"
    system "make install"
  end
{'fraction_non_alphanumeric': 0.12704918032786885, 'fraction_numerical': 0.030054644808743168, 'mean_word_length': 2.6994949494949494, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, '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': '5296429', 'n_tokens_mistral': 555, 'n_tokens_neox': 523, 'n_words': 98}