<commit_before>class Mkclean < Formula
  desc "Optimizes Matroska and WebM files"
  homepage "https://www.matroska.org/downloads/mkclean.html"
  url "https://downloads.sourceforge.net/project/matroska/mkclean/mkclean-0.8.10.tar.bz2"
  sha256 "96773e72903b00d73e68ba9d5f19744a91ed46d27acd511a10eb23533589777d"

  bottle do
    cellar :any_skip_relocation
    sha256 "eb519c8f3fb9b2773529d5e7a9751cec7e2a7a67a76af92cab0e6b48449dc6de" => :high_sierra
    sha256 "73e502b5331d28da40fc3b94763f6ea30a141e48329bede7eddf3e396991671b" => :sierra
    sha256 "a5db5b2309de19ea395efaafcf828c253e38133464faca623545a221f2b0ba52" => :el_capitan
  end

  # Fixes compile error with Xcode-4.3+, a hardcoded /Developer.  Reported as:
  # https://sourceforge.net/p/matroska/bugs/9/
  patch :DATA if MacOS.prefer_64_bit?

  def install
    system "./mkclean/configure"
    system "make", "mkclean"
    bindir = `corec/tools/coremake/system_output.sh`.chomp
    bin.install Dir["release/#{bindir}/mk*"]
  end

  test do
    output = shell_output("#{bin}/mkclean --version 2>&1", 255)
    assert_match version.to_s, output<commit_msg>mkclean: update 0.8.10 bottle for Linuxbrew.<commit_after>class Mkclean < Formula
  desc "Optimizes Matroska and WebM files"
  homepage "https://www.matroska.org/downloads/mkclean.html"
  url "https://downloads.sourceforge.net/project/matroska/mkclean/mkclean-0.8.10.tar.bz2"
  sha256 "96773e72903b00d73e68ba9d5f19744a91ed46d27acd511a10eb23533589777d"

  bottle do
    cellar :any_skip_relocation
    sha256 "eb519c8f3fb9b2773529d5e7a9751cec7e2a7a67a76af92cab0e6b48449dc6de" => :high_sierra
    sha256 "73e502b5331d28da40fc3b94763f6ea30a141e48329bede7eddf3e396991671b" => :sierra
    sha256 "a5db5b2309de19ea395efaafcf828c253e38133464faca623545a221f2b0ba52" => :el_capitan
    sha256 "d6842897a02e0fc4d4e7ca046e1f41aaefebb13bceb324aabd2fbf1d96f6c024" => :x86_64_linux
  end

  # Fixes compile error with Xcode-4.3+, a hardcoded /Developer.  Reported as:
  # https://sourceforge.net/p/matroska/bugs/9/
  patch :DATA if MacOS.prefer_64_bit?

  def install
    system "./mkclean/configure"
    system "make", "mkclean"
    bindir = `corec/tools/coremake/system_output.sh`.chomp
    bin.install Dir["release/#{bindir}/mk*"]
  end

  test do
    output = shell_output("#{bin}/mkclean --version 2>&1", 255)
    assert_match version.to_s, output
{'fraction_non_alphanumeric': 0.1025531914893617, 'fraction_numerical': 0.1774468085106383, 'mean_word_length': 4.92191435768262, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3347427', 'n_tokens_mistral': 1219, 'n_tokens_neox': 998, 'n_words': 139}