<commit_before>class Zimg < Formula
  desc "Scaling, colorspace conversion, and dithering library"
  homepage "https://github.com/sekrit-twc/zimg"
  url "https://github.com/sekrit-twc/zimg/archive/release-3.0.tar.gz"
  sha256 "91db478e7271d3267bc79b15a9728c87bff88b1f08741e6701e79b028aa5b01e"
  license "WTFPL"
  head "https://github.com/sekrit-twc/zimg.git"

  bottle do
    cellar :any
    sha256 "9128cde1d368e3c49175038e1dad989b68dce0385b582a4405018051bd403108" => :catalina
    sha256 "3ae619fe7074ba0c4dea5e6eb9e8066ac4c34d5ac43053babb9c9693b39f1aeb" => :mojave
    sha256 "d9748d016f77d29cf855d33fd0af95da9e21bc7edeb479c9e48ef8f895646f79" => :high_sierra
  end

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

  # Upstream has decided not to fix https://github.com/sekrit-twc/zimg/issues/52
  depends_on macos: :el_capitan

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

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

      int main()
      {
        zimg_image_format format;
        zimg_image_format_default(&format, ZIMG_API_VERSION);
        assert(ZIMG_MATRIX_UNSPECIFIED == format.matrix_coefficients);
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lzimg", "-o", "test"
    system "./test"
  end
end
<commit_msg>zimg: update 3.0 bottle.<commit_after>class Zimg < Formula
  desc "Scaling, colorspace conversion, and dithering library"
  homepage "https://github.com/sekrit-twc/zimg"
  url "https://github.com/sekrit-twc/zimg/archive/release-3.0.tar.gz"
  sha256 "91db478e7271d3267bc79b15a9728c87bff88b1f08741e6701e79b028aa5b01e"
  license "WTFPL"
  head "https://github.com/sekrit-twc/zimg.git"

  bottle do
    cellar :any
    sha256 "9128cde1d368e3c49175038e1dad989b68dce0385b582a4405018051bd403108" => :catalina
    sha256 "3ae619fe7074ba0c4dea5e6eb9e8066ac4c34d5ac43053babb9c9693b39f1aeb" => :mojave
    sha256 "d9748d016f77d29cf855d33fd0af95da9e21bc7edeb479c9e48ef8f895646f79" => :high_sierra
    sha256 "f4582459aa1f90576f8e6f39b394736ab523c5126ce69091fa21c057327ab4a0" => :x86_64_linux
  end

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

  # Upstream has decided not to fix https://github.com/sekrit-twc/zimg/issues/52
  depends_on macos: :el_capitan

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

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

      int main()
      {
        zimg_image_format format;
        zimg_image_format_default(&format, ZIMG_API_VERSION);
        assert(ZIMG_MATRIX_UNSPECIFIED == format.matrix_coefficients);
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lzimg", "-o", "test"
    system "./test"
  end
end

{'fraction_non_alphanumeric': 0.11938296445338699, 'fraction_numerical': 0.1374916163648558, 'mean_word_length': 3.7958199356913185, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 20, 'https://': 8, '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': '5954612', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1240, 'n_words': 194}