<commit_before>class Libwebsockets < Formula
  desc "C websockets server library"
  homepage "https://libwebsockets.org"
  url "https://github.com/warmcat/libwebsockets/archive/v2.4.1.tar.gz"
  sha256 "29414be4f79f6abc0e6aadccd09a4da0f0c431e3b5691f496acd081ae6a8240c"
  head "https://github.com/warmcat/libwebsockets.git"

  bottle do
    sha256 "784fbbb862e238fbd35b6794ca5a955f1709495fe1c5e6bda6167e5fd9df7476" => :high_sierra
    sha256 "9f11e8c8d02ee7887eee5bf1651c97fa8c2f743a33c8389056a8094785c17fcf" => :sierra
    sha256 "e371ad39c9f31411339e1c55826e822f67726f63f27389562b53552f5f107f98" => :el_capitan
  end

  depends_on "cmake" => :build
  depends_on "openssl"

  def install
    system "cmake", ".", *std_cmake_args
    system "make"
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <openssl/ssl.h>
      #include <libwebsockets.h>

      int main()
      {
        struct lws_context_creation_info info;
        memset(&info, 0, sizeof(info));
        struct lws_context *context;
        context = lws_create_context(&info);
        lws_context_destroy(context);
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-I#{Formula["openssl"].opt_prefix}/include", "-L#{lib}", "-lwebsockets", "-o", "test"
    system "./test"
  end
end<commit_msg>libwebsockets: update 2.4.1 bottle for Linuxbrew.<commit_after>class Libwebsockets < Formula
  desc "C websockets server library"
  homepage "https://libwebsockets.org"
  url "https://github.com/warmcat/libwebsockets/archive/v2.4.1.tar.gz"
  sha256 "29414be4f79f6abc0e6aadccd09a4da0f0c431e3b5691f496acd081ae6a8240c"
  head "https://github.com/warmcat/libwebsockets.git"

  bottle do
    sha256 "784fbbb862e238fbd35b6794ca5a955f1709495fe1c5e6bda6167e5fd9df7476" => :high_sierra
    sha256 "9f11e8c8d02ee7887eee5bf1651c97fa8c2f743a33c8389056a8094785c17fcf" => :sierra
    sha256 "e371ad39c9f31411339e1c55826e822f67726f63f27389562b53552f5f107f98" => :el_capitan
    sha256 "9fd3e20229dea1900854baec1382849d3fd91dc8527aceac3356975e0dac7325" => :x86_64_linux
  end

  depends_on "cmake" => :build
  depends_on "openssl"

  def install
    system "cmake", ".", *std_cmake_args
    system "make"
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <openssl/ssl.h>
      #include <libwebsockets.h>

      int main()
      {
        struct lws_context_creation_info info;
        memset(&info, 0, sizeof(info));
        struct lws_context *context;
        context = lws_create_context(&info);
        lws_context_destroy(context);
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-I#{Formula["openssl"].opt_prefix}/include", "-L#{lib}", "-lwebsockets", "-o", "test"
    system "./test"
  end
end
{'fraction_non_alphanumeric': 0.11681735985533453, 'fraction_numerical': 0.14900542495479205, 'mean_word_length': 3.878306878306878, 'pattern_counts': {'":': 0, '<': 13, '<?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': '3591271', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1120, 'n_words': 169}