<commit_before>class Tepl < Formula
  desc "GNOME Text Editor Product Line"
  homepage "https://gitlab.gnome.org/swilmet/tepl"
  url "https://gitlab.gnome.org/swilmet/tepl.git",
      tag:      "6.1.2",
      revision: "62aba5222f8512042285d65d29e455da56f67dc3"
  license "LGPL-2.1-or-later"

  bottle do
    sha256 arm64_monterey: "7d56f260b4611183b3fc7b01fa1f28bacb42a82f0b719ca9c2a1ca64b5ce9d85"
    sha256 arm64_big_sur:  "2c8df9d1f47f82511b50b3dd0bcfe9c88f50f3320ddbd6a035b4a6f7b0892f87"
    sha256 monterey:       "b5648b6a9896189fe4c9d03121b793b34e1f3e6b2b778904d935607791799348"
    sha256 big_sur:        "1cb57e720dc1dac92b54d56baad192550c2d397572d1ef7eda63fa85bda90168"
    sha256 catalina:       "148d63d57bfdb37c4f7862581960c6df83ef6b5c87f95adfc10fa6847ed3ff73"
    sha256 x86_64_linux:   "869fd24987a560c0ccb3bf06535cbdadcd921fc4905eaa3fd1b9d8586c7b65a9"
  end

  depends_on "gobject-introspection" => :build
  depends_on "meson" => :build
  depends_on "ninja" => :build
  depends_on "pkg-config" => :build
  depends_on "amtk"
  depends_on "gtksourceview4"
  depends_on "icu4c"
  depends_on "uchardet"

  def install
    mkdir "build" do
      system "meson", *std_meson_args, "-Dgtk_doc=false", ".."
      system "ninja", "-v"
      system "ninja", "install", "-v"
    end
  end

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

      int main(int argc, char *argv[]) {
        GType type = tepl_file_get_type();
        return 0;
      }
    EOS
    ENV.libxml2<commit_msg>tepl: depends on `glib-utils` to build<commit_after>class Tepl < Formula
  desc "GNOME Text Editor Product Line"
  homepage "https://gitlab.gnome.org/swilmet/tepl"
  url "https://gitlab.gnome.org/swilmet/tepl.git",
      tag:      "6.1.2",
      revision: "62aba5222f8512042285d65d29e455da56f67dc3"
  license "LGPL-2.1-or-later"

  bottle do
    sha256 arm64_monterey: "7d56f260b4611183b3fc7b01fa1f28bacb42a82f0b719ca9c2a1ca64b5ce9d85"
    sha256 arm64_big_sur:  "2c8df9d1f47f82511b50b3dd0bcfe9c88f50f3320ddbd6a035b4a6f7b0892f87"
    sha256 monterey:       "b5648b6a9896189fe4c9d03121b793b34e1f3e6b2b778904d935607791799348"
    sha256 big_sur:        "1cb57e720dc1dac92b54d56baad192550c2d397572d1ef7eda63fa85bda90168"
    sha256 catalina:       "148d63d57bfdb37c4f7862581960c6df83ef6b5c87f95adfc10fa6847ed3ff73"
    sha256 x86_64_linux:   "869fd24987a560c0ccb3bf06535cbdadcd921fc4905eaa3fd1b9d8586c7b65a9"
  end

  depends_on "glib-utils" => :build
  depends_on "gobject-introspection" => :build
  depends_on "meson" => :build
  depends_on "ninja" => :build
  depends_on "pkg-config" => :build
  depends_on "amtk"
  depends_on "gtksourceview4"
  depends_on "icu4c"
  depends_on "uchardet"

  def install
    system "meson", *std_meson_args, "build", "-Dgtk_doc=false"
    system "meson", "compile", "-C", "build", "-v"
    system "meson", "install", "-C", "build"
  end

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

      int main(int argc, char *argv[]) {
        GType type = tepl_file_get_type();
        return 0;
      }
    EOS
    ENV.libxml2
{'fraction_non_alphanumeric': 0.10232408005164623, 'fraction_numerical': 0.19173660426081343, 'mean_word_length': 4.006462035541196, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '296286', 'n_tokens_mistral': 1688, 'n_tokens_neox': 1416, 'n_words': 200}