<commit_before>class Xfig < Formula
  desc "Facility for interactive generation of figures"
  homepage "https://mcj.sourceforge.io"
  url "https://downloads.sourceforge.net/mcj/xfig-3.2.8a.tar.xz"
  sha256 "ba43c0ea85b230d3efa5a951a3239e206d0b033d044c590a56208f875f888578"
  license "MIT"
  revision 1

  livecheck do
    url :stable
    regex(%r{url=.*?/xfig[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i)
  end

  bottle do
    sha256 arm64_big_sur: "507e8fe60993894dad06f4858efe60688d3af0fcebfd16b64ae49fe37921904c"
    sha256 big_sur:       "ffb26267062fdf96bc4356bbe0853e86cc1f83b8aedd7e73931bbd6cc3e1dc95"
    sha256 catalina:      "a0b961545f64c9dbfd9d829c723d1236d71eea43a12ee2ede238cbacb08d73ae"
    sha256 mojave:        "d9a0b286b4de4609cbee6ce952c58ba8e7a31d8780699c409132da630b4b7916"
  end

  depends_on "fig2dev"
  depends_on "ghostscript"
  depends_on "jpeg"
  depends_on "libpng"
  depends_on "libtiff"
  depends_on "libx11"
  depends_on "libxaw3d"
  depends_on "libxi"
  depends_on "libxpm"
  depends_on "libxt"

  def install
    args = %W[
      --prefix=#{prefix}
      --disable-dependency-tracking
      --disable-silent-rules
      --with-appdefaultdir=#{etc}/X11/app-defaults
    ]

    system "./configure", *args
    # "LDFLAGS" argument can be deleted the next release after 3.2.8a. See discussion at
    # https://sourceforge.net/p/mcj/discussion/general/thread/36ff8854e8/#fa9d.
    system "make", "LDFLAGS=-ltiff -ljpeg -lpng", "install-strip"
  end

  test do<commit_msg>xfig: update 3.2.8a_1 bottle.<commit_after>class Xfig < Formula
  desc "Facility for interactive generation of figures"
  homepage "https://mcj.sourceforge.io"
  url "https://downloads.sourceforge.net/mcj/xfig-3.2.8a.tar.xz"
  sha256 "ba43c0ea85b230d3efa5a951a3239e206d0b033d044c590a56208f875f888578"
  license "MIT"
  revision 1

  livecheck do
    url :stable
    regex(%r{url=.*?/xfig[._-]v?(\d+(?:\.\d+)+[a-z]?)\.t}i)
  end

  bottle do
    sha256 arm64_big_sur: "6a43d6e59266c06db6e95d612731dce290baca35ccdc885411ff01224c0dc6b2"
    sha256 big_sur:       "2f87098117a52ae19f9260f6d0a8413378eb790ced684221dc190a36f7c919a2"
    sha256 catalina:      "011b226be3e0e49599871b19cb8528a168cb91d5b37557eb6856f7e9d20f3506"
    sha256 mojave:        "70d31a321c35921fb64a15a0634b6159d4918498d5a2b743659635e3067bfb9a"
  end

  depends_on "fig2dev"
  depends_on "ghostscript"
  depends_on "jpeg"
  depends_on "libpng"
  depends_on "libtiff"
  depends_on "libx11"
  depends_on "libxaw3d"
  depends_on "libxi"
  depends_on "libxpm"
  depends_on "libxt"

  def install
    args = %W[
      --prefix=#{prefix}
      --disable-dependency-tracking
      --disable-silent-rules
      --with-appdefaultdir=#{etc}/X11/app-defaults
    ]

    system "./configure", *args
    # "LDFLAGS" argument can be deleted the next release after 3.2.8a. See discussion at
    # https://sourceforge.net/p/mcj/discussion/general/thread/36ff8854e8/#fa9d.
    system "make", "LDFLAGS=-ltiff -ljpeg -lpng", "install-strip"
  end

  test do
{'fraction_non_alphanumeric': 0.11148197596795728, 'fraction_numerical': 0.16488651535380508, 'mean_word_length': 3.8890701468189235, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '1595803', 'n_tokens_mistral': 1545, 'n_tokens_neox': 1300, 'n_words': 192}