<commit_before>require 'formula'

# Official download has untrusted SSL cert, so use Debian

class Minbif < Formula
  homepage 'http://minbif.im/'
  url 'http://ftp.de.debian.org/debian/pool/main/m/minbif/minbif_1.0.5+git20120508.orig.tar.gz'
  version '1.0.5'
  sha1 '5827df8954e29df80d1e81ee5df354b76c5fd86a'
  revision 1

  option 'pam', 'Build with PAM support, patching for OSX PAM headers'

  depends_on 'pkg-config' => :build
  depends_on 'cmake' => :build
  depends_on 'glib'
  depends_on 'gettext'
  depends_on 'finch'
  depends_on 'gnutls'
  depends_on 'imlib2' => :optional
  depends_on 'libcaca' => :optional

  # Problem:  Apple doesn't have <security/pam_misc.h> so don't ask for it.
  # Reported: https://symlink.me/issues/917
  def patches
    DATA
  end if build.include? 'pam'

  def install
    inreplace "minbif.conf" do |s|
      s.gsub! "users = /var", "users = #{var}"
      s.gsub! "motd = /etc", "motd = #{etc}"
    end
<commit_msg>minbif: use patch DSL<commit_after>require 'formula'

# Official download has untrusted SSL cert, so use Debian

class Minbif < Formula
  homepage 'http://minbif.im/'
  url 'http://ftp.de.debian.org/debian/pool/main/m/minbif/minbif_1.0.5+git20120508.orig.tar.gz'
  version '1.0.5'
  sha1 '5827df8954e29df80d1e81ee5df354b76c5fd86a'
  revision 1

  option 'pam', 'Build with PAM support, patching for OSX PAM headers'

  depends_on 'pkg-config' => :build
  depends_on 'cmake' => :build
  depends_on 'glib'
  depends_on 'gettext'
  depends_on 'finch'
  depends_on 'gnutls'
  depends_on 'imlib2' => :optional
  depends_on 'libcaca' => :optional

  # Problem:  Apple doesn't have <security/pam_misc.h> so don't ask for it.
  # Reported: https://symlink.me/issues/917
  patch :DATA if build.include? 'pam'

  def install
    inreplace "minbif.conf" do |s|
      s.gsub! "users = /var", "users = #{var}"
      s.gsub! "motd = /etc", "motd = #{etc}"
    end

{'fraction_non_alphanumeric': 0.13529103303618248, 'fraction_numerical': 0.04614577871001573, 'mean_word_length': 3.608695652173913, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '3258029', 'n_tokens_mistral': 815, 'n_tokens_neox': 769, 'n_words': 183}