<commit_before>require 'formula'

def use_libgadu?; ARGV.include? "--with-libgadu"; end

class Ekg2 < Formula
  url 'http://pl.ekg2.org/ekg2-0.3.1.tar.gz'
  homepage 'http://ekg2.org'
  md5 '68fc05b432c34622df6561eaabef5a40'

  depends_on 'pkg-config' => :build
  depends_on 'readline'
  depends_on 'libgadu' if use_libgadu?

  # stripping breaks loading shared objects
  skip_clean :all

  def options
    [["--with-libgadu", "Compiles ekg2 with gadu-gadu support"]]
  end

  def install
    readline = Formula.factory 'readline'

    args = ["--disable-debug", "--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--without-python",
            "--without-perl",
            "--with-readline=#{readline.prefix}",
            "--without-gtk",
            "--enable-unicode"]

    args << use_libgadu? ? "--with-libgadu" : "--without-libgadu"

    system "./configure", *args
    system "make install"
  end
end
<commit_msg>ekg2: use new dsl<commit_after>require 'formula'

class Ekg2 < Formula
  homepage 'http://ekg2.org'
  url 'http://pl.ekg2.org/ekg2-0.3.1.tar.gz'
  md5 '68fc05b432c34622df6561eaabef5a40'

  depends_on 'pkg-config' => :build
  depends_on 'readline'
  depends_on 'libgadu' if build.include? "with-libgadu"

  # stripping breaks loading shared objects
  skip_clean :all

  option "with-libgadu", "Compiles ekg2 with gadu-gadu support"

  def install
    readline = Formula.factory 'readline'

    args = ["--disable-debug", "--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--without-python",
            "--without-perl",
            "--with-readline=#{readline.prefix}",
            "--without-gtk",
            "--enable-unicode"]

    args << build.include?("with-libgadu") ? "--with-libgadu" : "--without-libgadu"

    system "./configure", *args
    system "make install"
  end
end

{'fraction_non_alphanumeric': 0.15710455764075068, 'fraction_numerical': 0.030563002680965148, 'mean_word_length': 2.6660117878192535, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '7270310', 'n_tokens_mistral': 682, 'n_tokens_neox': 655, 'n_words': 131}