<commit_before>class Lablgtk < Formula
  desc "Objective Caml interface to gtk+"
  homepage "http://lablgtk.forge.ocamlcore.org"
  url "https://github.com/garrigue/lablgtk/releases/download/lablgtk2188/lablgtk-2.18.8.tar.gz"
  sha256 "91f59bafd07989ea00080f4fd65512ce339878c7117bf5116bad3b93b64d4de3"

  bottle do
    cellar :any
    rebuild 1
    sha256 "836b71ab69b8adaf0a2259bac50b77c479d24061bd827f429deb4d30ab53a2e7" => :catalina
    sha256 "7b791695065968ef260da45a54d55904e30122dd45ee521e348220749e73533c" => :mojave
    sha256 "200db9ed1660655d461bd02f4c7d6026be63d896621f1f8ee76e76fed9e458b0" => :high_sierra
  end

  depends_on "pkg-config" => :build
  depends_on "gtk+"
  depends_on "gtksourceview"
  depends_on "librsvg"
  depends_on "ocaml"

  def install
    system "./configure", "--bindir=#{bin}",
                          "--libdir=#{lib}",
                          "--mandir=#{man}",
                          "--with-libdir=#{lib}/ocaml"
    ENV.deparallelize
    system "make", "world"
    system "make", "old-install"
  end

  test do
    (testpath/"test.ml").write <<~EOS
      let _ =<commit_msg>labelgtk 2.18.10<commit_after>class Lablgtk < Formula
  desc "Objective Caml interface to gtk+"
  homepage "http://lablgtk.forge.ocamlcore.org"
  url "https://github.com/garrigue/lablgtk/archive/2.18.10.tar.gz"
  sha256 "6f00f6b3114b468eb9e743d27511a6063936f6798f890e44b494f71a5cf95470"

  bottle do
    cellar :any
    rebuild 1
    sha256 "836b71ab69b8adaf0a2259bac50b77c479d24061bd827f429deb4d30ab53a2e7" => :catalina
    sha256 "7b791695065968ef260da45a54d55904e30122dd45ee521e348220749e73533c" => :mojave
    sha256 "200db9ed1660655d461bd02f4c7d6026be63d896621f1f8ee76e76fed9e458b0" => :high_sierra
  end

  depends_on "pkg-config" => :build
  depends_on "gtk+"
  depends_on "gtksourceview"
  depends_on "librsvg"
  depends_on "ocaml"

  def install
    system "./configure", "--bindir=#{bin}",
                          "--libdir=#{lib}",
                          "--mandir=#{man}",
                          "--with-libdir=#{lib}/ocaml"
    ENV.deparallelize
    system "make", "world"
    system "make", "old-install"
  end

  test do
    (testpath/"test.ml").write <<~EOS
      let _ =
{'fraction_non_alphanumeric': 0.11687725631768953, 'fraction_numerical': 0.17509025270758122, 'mean_word_length': 3.222857142857143, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3260073', 'n_tokens_mistral': 1118, 'n_tokens_neox': 904, 'n_words': 127}