<commit_before>require 'formula'

class NoBdb5 < Requirement
  def message; <<-EOS.undent
    This software can fail to compile when Berkeley-DB 5.x is installed.
    You may need to try:
      brew unlink berkeley-db
      brew install dsniff
      brew link berkeley-db
    EOS
  end
  def satisfied?
    f = Formula.factory("berkeley-db")
    not f.installed?
  end
end

class Exim < Formula
  homepage 'http://exim.org'
  url 'http://ftp.exim.org/pub/exim/exim4/exim-4.77.tar.gz'
  sha1 '2c1ba6b8f627b71b3b58fc0cc56e394590dcd1dc'

  depends_on 'pcre'
  depends_on NoBdb5.new

  def options
    [['--support-maildir', 'Support delivery in Maildir format']]
  end

  def install
    cp 'src/EDITME', 'Local/Makefile'
    inreplace 'Local/Makefile' do |s|
      s.remove_make_var! "EXIM_MONITOR"
      s.change_make_var! "EXIM_USER", ENV['USER']
      s.change_make_var! "SYSTEM_ALIASES_FILE", etc+'aliases'
      s.gsub! '/usr/exim/configure', etc+'exim.conf'
      s.gsub! '/usr/exim', prefix
      s.gsub! '/var/spool/exim', var+'spool/exim'
      s << "SUPPORT_MAILDIR=yes\n" if ARGV.include? '--support-maildir'<commit_msg>exim: fix message<commit_after>require 'formula'

class NoBdb5 < Requirement
  def message; <<-EOS.undent
    This software can fail to compile when Berkeley-DB 5.x is installed.
    You may need to try:
      brew unlink berkeley-db
      brew install exim
      brew link berkeley-db
    EOS
  end
  def satisfied?
    f = Formula.factory("berkeley-db")
    not f.installed?
  end
end

class Exim < Formula
  homepage 'http://exim.org'
  url 'http://ftp.exim.org/pub/exim/exim4/exim-4.77.tar.gz'
  sha1 '2c1ba6b8f627b71b3b58fc0cc56e394590dcd1dc'

  depends_on 'pcre'
  depends_on NoBdb5.new

  def options
    [['--support-maildir', 'Support delivery in Maildir format']]
  end

  def install
    cp 'src/EDITME', 'Local/Makefile'
    inreplace 'Local/Makefile' do |s|
      s.remove_make_var! "EXIM_MONITOR"
      s.change_make_var! "EXIM_USER", ENV['USER']
      s.change_make_var! "SYSTEM_ALIASES_FILE", etc+'aliases'
      s.gsub! '/usr/exim/configure', etc+'exim.conf'
      s.gsub! '/usr/exim', prefix
      s.gsub! '/var/spool/exim', var+'spool/exim'
      s << "SUPPORT_MAILDIR=yes\n" if ARGV.include? '--support-maildir'
{'fraction_non_alphanumeric': 0.12699115044247788, 'fraction_numerical': 0.02654867256637168, 'mean_word_length': 3.1183970856102006, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7411609', 'n_tokens_mistral': 910, 'n_tokens_neox': 887, 'n_words': 193}