<commit_before>require "formula"

class Gdnsd < Formula
  homepage "http://gdnsd.org/"
  url "https://github.com/gdnsd/gdnsd/releases/download/v2.1.0/gdnsd-2.1.0.tar.xz"
  sha1 "138c7542005de457e756bf84fd7f727d690efe56"

  bottle do
    sha1 "72e912a4de41afda8ea8b806086c7291c308e72c" => :yosemite
    sha1 "ef4d3d7b6c0a7eab61ac4b2ae1f188a2eaec0e37" => :mavericks
    sha1 "5acbc203b2687aec9c2506906172122a680133f5" => :mountain_lion
  end

  head do
    url "https://github.com/gdnsd/gdnsd.git"
    depends_on :autoconf
    depends_on :automake
    depends_on :libtool
  end

  depends_on "libev"
  depends_on "ragel"
  depends_on "libunwind-headers" => :recommended

  def install
    system "autoreconf", "-fvi" if build.head?
    system "./configure", "--disable-debug",
                          "--disable-dependency-tracking",
                          "--disable-silent-rules",
                          "--prefix=#{prefix}",
                          "--with-rundir=#{var}/run",
                          "--localstatedir=#{var}",
                          "--sysconfdir=#{etc}",
                          "--without-urcu"
    system "make", "install"
  end

  test do
    (testpath/"config").write("options => { listen => [ 127.0.0.1 ] }")
    system "#{sbin}/gdnsd", "-c", testpath, "checkconf"
  end
end
<commit_msg>gdnsd: modernize autotools deps<commit_after>require "formula"

class Gdnsd < Formula
  homepage "http://gdnsd.org/"
  url "https://github.com/gdnsd/gdnsd/releases/download/v2.1.0/gdnsd-2.1.0.tar.xz"
  sha1 "138c7542005de457e756bf84fd7f727d690efe56"

  bottle do
    sha1 "72e912a4de41afda8ea8b806086c7291c308e72c" => :yosemite
    sha1 "ef4d3d7b6c0a7eab61ac4b2ae1f188a2eaec0e37" => :mavericks
    sha1 "5acbc203b2687aec9c2506906172122a680133f5" => :mountain_lion
  end

  head do
    url "https://github.com/gdnsd/gdnsd.git"
    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  depends_on "libev"
  depends_on "ragel"
  depends_on "libunwind-headers" => :recommended

  def install
    system "autoreconf", "-fvi" if build.head?
    system "./configure", "--disable-debug",
                          "--disable-dependency-tracking",
                          "--disable-silent-rules",
                          "--prefix=#{prefix}",
                          "--with-rundir=#{var}/run",
                          "--localstatedir=#{var}",
                          "--sysconfdir=#{etc}",
                          "--without-urcu"
    system "make", "install"
  end

  test do
    (testpath/"config").write("options => { listen => [ 127.0.0.1 ] }")
    system "#{sbin}/gdnsd", "-c", testpath, "checkconf"
  end
end

{'fraction_non_alphanumeric': 0.14296268932397488, 'fraction_numerical': 0.08496490579977835, 'mean_word_length': 2.2548076923076925, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7172230', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1006, 'n_words': 154}