<commit_before>class Silk < Formula
  desc "Collection of traffic analysis tools"
  homepage "https://tools.netsa.cert.org/silk/"
  url "https://tools.netsa.cert.org/releases/silk-3.19.1.tar.gz"
  sha256 "b287de07502c53d51e9ccdcc17a46d8a4d7a59db9e5ae7add7b82458a9da45a7"

  livecheck do
    url :homepage
    regex(%r{".*?/silk[._-]v?(\d+(?:\.\d+)+)\.t}i)
  end

  bottle do
    sha256 arm64_big_sur: "8d3c65086a32469d221ca03666c9c54f9b16dc3a83cd3906ac46676d0f7139fb"
    sha256 big_sur:       "6fab609033d87aada95d080cbc49b4730bb4b07d77b58eba8f6244773e2ca999"
    sha256 catalina:      "4a88b111ce742a948b91b9441f2bbc7e821ffd3691673086ff46e8e27fbda31e"
    sha256 mojave:        "923bc8b774f207d23073195b49befba72e378e79846b6809066f55f3df87c329"
    sha256 high_sierra:   "663d2a858210750b8650e4f0e516dd6530fb5d08a7c501f8daa937572d8a81ee"
    sha256 x86_64_linux:  "260d96b7167b57d9fb2be97dd9632a6e8877633cce28331ea2b9d6fe21ff5019"
  end

  depends_on "pkg-config" => :build
  depends_on "glib"
  depends_on "libfixbuf"
  depends_on "yaf"

  uses_from_macos "libpcap"

  def install
    args = %W[
      --prefix=#{prefix}
      --disable-dependency-tracking
      --mandir=#{man}
      --enable-ipv6<commit_msg>silk: patch incorrect -flat_namespace usage (#88601)<commit_after>class Silk < Formula
  desc "Collection of traffic analysis tools"
  homepage "https://tools.netsa.cert.org/silk/"
  url "https://tools.netsa.cert.org/releases/silk-3.19.1.tar.gz"
  sha256 "b287de07502c53d51e9ccdcc17a46d8a4d7a59db9e5ae7add7b82458a9da45a7"

  livecheck do
    url :homepage
    regex(%r{".*?/silk[._-]v?(\d+(?:\.\d+)+)\.t}i)
  end

  bottle do
    sha256 arm64_big_sur: "8d3c65086a32469d221ca03666c9c54f9b16dc3a83cd3906ac46676d0f7139fb"
    sha256 big_sur:       "6fab609033d87aada95d080cbc49b4730bb4b07d77b58eba8f6244773e2ca999"
    sha256 catalina:      "4a88b111ce742a948b91b9441f2bbc7e821ffd3691673086ff46e8e27fbda31e"
    sha256 mojave:        "923bc8b774f207d23073195b49befba72e378e79846b6809066f55f3df87c329"
    sha256 high_sierra:   "663d2a858210750b8650e4f0e516dd6530fb5d08a7c501f8daa937572d8a81ee"
    sha256 x86_64_linux:  "260d96b7167b57d9fb2be97dd9632a6e8877633cce28331ea2b9d6fe21ff5019"
  end

  depends_on "pkg-config" => :build
  depends_on "glib"
  depends_on "libfixbuf"
  depends_on "yaf"

  uses_from_macos "libpcap"

  # Fix -flat_namespace being used on Big Sur and later.
  patch do
    url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
    sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
  end

  def install
    args = %W[
      --prefix=#{prefix}
      --disable-dependency-tracking
      --mandir=#{man}
      --enable-ipv6
{'fraction_non_alphanumeric': 0.09459949256977165, 'fraction_numerical': 0.25552736498731426, 'mean_word_length': 4.644171779141105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, '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': '2919076', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1290, 'n_words': 142}