<commit_before>require 'formula'

def use_libnet?
  not ARGV.include? '--disable-libnet'
end

def use_glib?
  not ARGV.include? '--disable-libglib'
end

class Libnids < Formula
  url 'http://downloads.sourceforge.net/project/libnids/libnids/1.24/libnids-1.24.tar.gz'
  homepage 'http://libnids.sourceforge.net/'
  md5 '72d37c79c85615ffe158aa524d649610'

  depends_on 'libnet' if use_libnet?
  depends_on 'glib' if use_glib?

  def options
    [
      ["--disable-libnet", "Don't include code requiring libnet"],
      ["--disable-libglib", "Don't use glib2 for multiprocessing support"]
    ]
  end

  def install
    args = ["--prefix=#{prefix}", "--mandir=#{man}"]
    args << "--disable-libnet" unless use_libnet?
    args << "--disable-libglib" unless use_glib?

    system "./configure", *args
    system "make install"
  end
end<commit_msg>libnids: add pkg-config as a build-time dependency<commit_after>require 'formula'

def use_libnet?
  not ARGV.include? '--disable-libnet'
end

def use_glib?
  not ARGV.include? '--disable-libglib'
end

class Libnids < Formula
  url 'http://downloads.sourceforge.net/project/libnids/libnids/1.24/libnids-1.24.tar.gz'
  homepage 'http://libnids.sourceforge.net/'
  md5 '72d37c79c85615ffe158aa524d649610'

  depends_on 'libnet' if use_libnet?
  depends_on 'glib' if use_glib?
  depends_on 'pkg-config' => :build

  def options
    [
      ["--disable-libnet", "Don't include code requiring libnet"],
      ["--disable-libglib", "Don't use glib2 for multiprocessing support"]
    ]
  end

  def install
    args = ["--prefix=#{prefix}", "--mandir=#{man}"]
    args << "--disable-libnet" unless use_libnet?
    args << "--disable-libglib" unless use_glib?

    system "./configure", *args
    system "make install"
  end
end
{'fraction_non_alphanumeric': 0.14560906515580738, 'fraction_numerical': 0.03512747875354107, 'mean_word_length': 3.528205128205128, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '5171720', 'n_tokens_mistral': 702, 'n_tokens_neox': 651, 'n_words': 144}