<commit_before>class Mrboom < Formula
  desc "Eight player Bomberman clone"
  homepage "http://mrboom.mumblecore.org/"
  url "https://github.com/Javanaise/mrboom-libretro/releases/download/5.2/MrBoom-src-5.2.454d614.tar.gz"
  version "5.2"
  sha256 "50e4fe4bc74b23ac441499c756c4575dfe9faab9e787a3ab942a856ac63cf10d"
  license "MIT"

  bottle do
    sha256 cellar: :any, arm64_big_sur: "90484ee7a62a29aa82242664b917340def45c3b999a7d21197ac10e020617194"
    sha256 cellar: :any, big_sur:       "904cd506e99c6269809fe4c593263de7cc1f0746fe0c5b5180aa63ef522ca212"
    sha256 cellar: :any, catalina:      "7fc60e5a37d093f2311b797c5822dbeb098cdf47c038c808496973d29f563f2c"
    sha256 cellar: :any, mojave:        "262fab23ed3b5a3b80948ae4fb4eca1c0c0cad04220a031a731905d812aebaae"
  end

  depends_on "cmake" => :build
  depends_on "libmodplug"
  depends_on "minizip"
  depends_on "sdl2"
  depends_on "sdl2_mixer"

  def install
    system "make", "mrboom", "LIBSDL2=1"
    system "make", "install", "PREFIX=#{prefix}"
  end

  test do
    require "pty"
    require "expect"
    require "timeout"
    PTY.spawn(bin/"mrboom", "-m", "-f 0", "-z") do |r, _w, pid|
      sleep 15
      Process.kill "SIGINT", pid
      assert_match "monster", r.expect(/monster/, 10)[0]
    ensure
      begin
        Timeout.timeout(30) do
          Process.wait pid
        end
      rescue Timeout::Error
        Process.kill "KILL", pid
      end
    end<commit_msg>mrboom: upstream Linux fixes (#83862)<commit_after>class Mrboom < Formula
  desc "Eight player Bomberman clone"
  homepage "http://mrboom.mumblecore.org/"
  url "https://github.com/Javanaise/mrboom-libretro/releases/download/5.2/MrBoom-src-5.2.454d614.tar.gz"
  version "5.2"
  sha256 "50e4fe4bc74b23ac441499c756c4575dfe9faab9e787a3ab942a856ac63cf10d"
  license "MIT"

  bottle do
    sha256 cellar: :any, arm64_big_sur: "90484ee7a62a29aa82242664b917340def45c3b999a7d21197ac10e020617194"
    sha256 cellar: :any, big_sur:       "904cd506e99c6269809fe4c593263de7cc1f0746fe0c5b5180aa63ef522ca212"
    sha256 cellar: :any, catalina:      "7fc60e5a37d093f2311b797c5822dbeb098cdf47c038c808496973d29f563f2c"
    sha256 cellar: :any, mojave:        "262fab23ed3b5a3b80948ae4fb4eca1c0c0cad04220a031a731905d812aebaae"
  end

  depends_on "cmake" => :build
  depends_on "libmodplug"
  depends_on "minizip"
  depends_on "sdl2"
  depends_on "sdl2_mixer"

  def install
    system "make", "mrboom", "LIBSDL2=1"
    system "make", "install", "PREFIX=#{prefix}", "MANDIR=share/man/man6"
  end

  test do
    require "pty"
    require "expect"
    require "timeout"
    PTY.spawn(bin/"mrboom", "-m", "-f 0", "-z") do |r, _w, pid|
      sleep 15
      Process.kill "SIGINT", pid
      assert_match "monster", r.expect(/monster/, 10)[0]
    ensure
      begin
        Timeout.timeout(30) do
          Process.wait pid
        end
      rescue Timeout::Error
        Process.kill "KILL", pid
      end
    end
{'fraction_non_alphanumeric': 0.10713067212555442, 'fraction_numerical': 0.16922552030023882, 'mean_word_length': 3.653968253968254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '2309102', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1231, 'n_words': 210}