<commit_before>class Librdkafka < Formula
  desc "Apache Kafka C/C++ library"
  homepage "https://github.com/edenhill/librdkafka"
  url "https://github.com/edenhill/librdkafka/archive/v1.5.0.tar.gz"
  sha256 "f7fee59fdbf1286ec23ef0b35b2dfb41031c8727c90ced6435b8cf576f23a656"
  license "BSD-2-Clause"
  revision 1
  head "https://github.com/edenhill/librdkafka.git"

  livecheck do
    url :head
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle do
    cellar :any
    sha256 "cf3cf9c7b0d6a66b77897d5b922311e040a6b3c08d3cbf44592685d279299ddf" => :catalina
    sha256 "b1928bcbd897a110b5924d0d181050488e923b85fad328100d7748baf065708b" => :mojave
    sha256 "685a700c58c4e7b46275640f02e7f2c9c722b8c50e441554c5d7e1d6e67405a0" => :high_sierra
  end

  depends_on "pkg-config" => :build
  depends_on "python@3.9" => :build
  depends_on "lz4"
  depends_on "lzlib"
  depends_on "openssl@1.1"
  depends_on "zstd"

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make"
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <librdkafka/rdkafka.h>

      int main (int argc, char **argv)
      {
        int partition = RD_KAFKA_PARTITION_UA; /* random */
        int version = rd_kafka_version();
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lrdkafka", "-lz", "-lpthread", "-o", "test"
    system "./test"
  end
end
<commit_msg>librdkafka: update 1.5.0_1 bottle.<commit_after>class Librdkafka < Formula
  desc "Apache Kafka C/C++ library"
  homepage "https://github.com/edenhill/librdkafka"
  url "https://github.com/edenhill/librdkafka/archive/v1.5.0.tar.gz"
  sha256 "f7fee59fdbf1286ec23ef0b35b2dfb41031c8727c90ced6435b8cf576f23a656"
  license "BSD-2-Clause"
  revision 1
  head "https://github.com/edenhill/librdkafka.git"

  livecheck do
    url :head
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle do
    cellar :any
    sha256 "cf3cf9c7b0d6a66b77897d5b922311e040a6b3c08d3cbf44592685d279299ddf" => :catalina
    sha256 "b1928bcbd897a110b5924d0d181050488e923b85fad328100d7748baf065708b" => :mojave
    sha256 "685a700c58c4e7b46275640f02e7f2c9c722b8c50e441554c5d7e1d6e67405a0" => :high_sierra
    sha256 "77d6d6fa9fb17bcf9ba28e7f372af0763aa6415225a91e70a30572e7e179e637" => :x86_64_linux
  end

  depends_on "pkg-config" => :build
  depends_on "python@3.9" => :build
  depends_on "lz4"
  depends_on "lzlib"
  depends_on "openssl@1.1"
  depends_on "zstd"

  def install
    system "./configure", "--prefix=#{prefix}"
    system "make"
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <librdkafka/rdkafka.h>

      int main (int argc, char **argv)
      {
        int partition = RD_KAFKA_PARTITION_UA; /* random */
        int version = rd_kafka_version();
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lrdkafka", "-lz", "-lpthread", "-o", "test"
    system "./test"
  end
end

{'fraction_non_alphanumeric': 0.1344850948509485, 'fraction_numerical': 0.1470189701897019, 'mean_word_length': 3.5925349922239502, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 16, 'https://': 6, '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': '5681443', 'n_tokens_mistral': 1501, 'n_tokens_neox': 1299, 'n_words': 206}