<commit_before>class Protobuf < Formula
  desc "Protocol buffers (Google's data interchange format)"
  homepage "https://github.com/protocolbuffers/protobuf/"
  url "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.tar.gz"
  sha256 "83ad4faf95ff9cbece7cb9c56eb3ca9e42c3497b77001840ab616982c6269fb6"
  license "BSD-3-Clause"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "81f6dfaacdbc7fba8b907897eff030cad8e4ff9fcb49cd63158debd8cdaeeaa8"
    sha256 cellar: :any,                 arm64_big_sur:  "0bbcc9c1ed9065b7a0212cc73ae740ca6df61cb85ed03be60ac19f2e58e39a2d"
    sha256 cellar: :any,                 monterey:       "d5f44d5b95170b5d8d1d2e64c79a4295f94242e7314f7778fffc2a10b869003b"
    sha256 cellar: :any,                 big_sur:        "91806ed47ad28e142559408cd21a766e62169ff245a1bee9e7db171f0723f607"
    sha256 cellar: :any,                 catalina:       "902bb822ba1c8cdbc7e6cb81f97b4a630d7c7dba036da05537ebf5a888511c00"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "4262c7e1f5141b859e620cea0e6ee671e4c31d826f0414163948973e4750ca54"
  end

  head do
    url "https://github.com/protocolbuffers/protobuf.git", branch: "main"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  depends_on "python@3.10" => [:build, :test]
  depends_on "python@3.9" => [:build, :test]

  uses_from_macos "zlib"

  def install
    # Don't build in debug mode. See:
    # https://github.com/Homebrew/homebrew/issues/9279
    # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61
    ENV.prepend "CXXFLAGS", "-DNDEBUG"
    ENV.cxx11

    system "./autogen.sh" if build.head?
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "--with-zlib"
    system "make"
    system "make", "check"<commit_msg>protobuf: update 21.8 bottle.<commit_after>class Protobuf < Formula
  desc "Protocol buffers (Google's data interchange format)"
  homepage "https://github.com/protocolbuffers/protobuf/"
  url "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-all-21.8.tar.gz"
  sha256 "83ad4faf95ff9cbece7cb9c56eb3ca9e42c3497b77001840ab616982c6269fb6"
  license "BSD-3-Clause"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "5f507ada52497a6dc2d3044b07faee312348277d4a69467e8eac371d4d4111bb"
    sha256 cellar: :any,                 arm64_big_sur:  "894f6f1f404b3e049751e81c3a2a31bea621e664b3bf317c913946c814f5c4c0"
    sha256 cellar: :any,                 monterey:       "bbf1936a2317f331ab2ab2bd6c981db6de8828feae20b698b186d9504d155507"
    sha256 cellar: :any,                 big_sur:        "3cc298cbd78936785e33ae475b3adc886c48790e77120d58f42a26b9b1b2091c"
    sha256 cellar: :any,                 catalina:       "ffea5a8b744cd725a488457c255ef7cf1c4f01e1cfed58708161021b0a083a66"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "427c12abde99ab19c1a284df9d90eb57ea03e89dc5696f36c38ac03e83f6b62b"
  end

  head do
    url "https://github.com/protocolbuffers/protobuf.git", branch: "main"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  depends_on "python@3.10" => [:build, :test]
  depends_on "python@3.9" => [:build, :test]

  uses_from_macos "zlib"

  def install
    # Don't build in debug mode. See:
    # https://github.com/Homebrew/homebrew/issues/9279
    # https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61
    ENV.prepend "CXXFLAGS", "-DNDEBUG"
    ENV.cxx11

    system "./autogen.sh" if build.head?
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "--with-zlib"
    system "make"
    system "make", "check"
{'fraction_non_alphanumeric': 0.10483473112974839, 'fraction_numerical': 0.1734089787863838, 'mean_word_length': 3.5767494356659144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 10, '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': '307705', 'n_tokens_mistral': 1972, 'n_tokens_neox': 1592, 'n_words': 228}