<commit_before>class Gmime < Formula
  desc "MIME mail utilities"
  homepage "https://spruce.sourceforge.io/gmime/"
  url "https://download.gnome.org/sources/gmime/3.0/gmime-3.0.0.tar.xz"
  sha256 "9d4874fb66d8b09d79ba144d2fbcab6157cf5986268fc4fdc9d98daa12c1a791"

  bottle do
    sha256 "fea94b385a0f6bdb5051d4eb6b5d6f7dbddf5cf550036633080cc127985c96c4" => :sierra
    sha256 "c96f61c8f22a89385537bc6e73950b2521a1a722694d402ea8d0bfa89de443cf" => :el_capitan
    sha256 "c5ee9d15334e6b7c8cebebab59491ea54005c3f68e459c405cc3141fafd9c694" => :yosemite
  end

  depends_on "pkg-config" => :build
  depends_on "gobject-introspection" => :recommended
  depends_on "glib"

  def install
    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
      --enable-largefile
      --disable-vala
      --disable-glibtest
    ]

    if build.with? "gobject-introspection"
      args << "--enable-introspection"
    else
      args << "--disable-introspection"
    end

    system "./configure", *args
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<-EOS.undent
      #include <stdio.h>
      #include <gmime/gmime.h><commit_msg>gmime: update 3.0.0 bottle for Linuxbrew.<commit_after>class Gmime < Formula
  desc "MIME mail utilities"
  homepage "https://spruce.sourceforge.io/gmime/"
  url "https://download.gnome.org/sources/gmime/3.0/gmime-3.0.0.tar.xz"
  sha256 "9d4874fb66d8b09d79ba144d2fbcab6157cf5986268fc4fdc9d98daa12c1a791"

  bottle do
    sha256 "fea94b385a0f6bdb5051d4eb6b5d6f7dbddf5cf550036633080cc127985c96c4" => :sierra
    sha256 "c96f61c8f22a89385537bc6e73950b2521a1a722694d402ea8d0bfa89de443cf" => :el_capitan
    sha256 "c5ee9d15334e6b7c8cebebab59491ea54005c3f68e459c405cc3141fafd9c694" => :yosemite
    sha256 "d36c281883e7573aef36129d8447672ce6f3401d96ee7aacdbf25d74ee94bfc3" => :x86_64_linux
  end

  depends_on "pkg-config" => :build
  depends_on "gobject-introspection" => :recommended
  depends_on "glib"

  def install
    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
      --enable-largefile
      --disable-vala
      --disable-glibtest
    ]

    if build.with? "gobject-introspection"
      args << "--enable-introspection"
    else
      args << "--disable-introspection"
    end

    system "./configure", *args
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<-EOS.undent
      #include <stdio.h>
      #include <gmime/gmime.h>
{'fraction_non_alphanumeric': 0.11464708282333741, 'fraction_numerical': 0.15952672378620972, 'mean_word_length': 3.600375234521576, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 18, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2045932', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1025, 'n_words': 139}