<commit_before>class Qtads < Formula
  desc "TADS multimedia interpreter"
  homepage "https://qtads.sourceforge.io/"
  license "GPL-3.0"
  revision 1
  head "https://github.com/realnc/qtads.git"

  stable do
    url "https://downloads.sourceforge.net/project/qtads/qtads-2.x/2.1.7/qtads-2.1.7.tar.bz2"
    sha256 "7477bb3cb1f74dcf7995a25579be8322c13f64fb02b7a6e3b2b95a36276ef231"

    # Remove for > 2.1.7
    # fix infinite recursion
    patch do
      url "https://github.com/realnc/qtads/commit/d22054b.patch?full_index=1"
      sha256 "e6af1eb7a8a4af72c9319ac6032a0bb8ffa098e7dd64d76da08ed0c7e50eaa7f"
    end

    # Remove for > 2.1.7
    # fix pointer/integer comparison
    patch do
      url "https://github.com/realnc/qtads/commit/46701a2.patch?full_index=1"
      sha256 "02c86bfa44769ec15844bbefa066360fb83ac923360ced140545fb782f4f3397"
    end

    # Fix "error: ordered comparison between pointer and zero"
    # Reported 11 Dec 2017 https://github.com/realnc/qtads/issues/7
    if DevelopmentTools.clang_build_version >= "900"
      patch do
        url "https://raw.githubusercontent.com/Homebrew/formula-patches/e189341/qtads/xcode9.diff"
        sha256 "2016fef6e867b7b8dfe1bd5db64d588161aad1357faa1962ee48edbe35042ddc"
      end
    end
  end

  livecheck do
    url :head
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any, arm64_big_sur: "860d00c579b90f13dcae925920c472b5a0d4119200a131449c4fe9e86beb9c7c"
    sha256 cellar: :any, big_sur:       "0b7ca6977cd90d44364cbea43a729e80c4c4dcd95427968cde38e1bf1971befc"
    sha256 cellar: :any, catalina:      "ddc00587ac0d9f3ebcd6f0bac9e8a4207f9ae930a6646e4f3ce60d186abdc832"
    sha256 cellar: :any, mojave:        "3158fb6eb3d97f548c908983348e221ee190835bda5ce70704747117ecf7611d"
    sha256 cellar: :any, high_sierra:   "ef218d294d01133003c6e52fc32f9482726d6f237b3b5b90add019960ffe9eb2"
    sha256 cellar: :any, sierra:        "51fff5c39b8c234bb72b9a3865f7a067fb2dab902316c7943261ba66ed98ab19"
    sha256 cellar: :any, el_capitan:    "fe8ab65019c324c13c9024291b3e6288aff3ec28049a0cf321da421b4c28f0f6"
    sha256 cellar: :any, yosemite:      "e2383ed761b051e337ed2a4a4162655cb9eaa19ed8ab0666e8a7d1efa236b9b2"
  end

  depends_on "pkg-config" => :build
  depends_on "qt"
  depends_on "sdl2"
  depends_on "sdl2_mixer"<commit_msg>qtads: update livecheck<commit_after>class Qtads < Formula
  desc "TADS multimedia interpreter"
  homepage "https://qtads.sourceforge.io/"
  license "GPL-3.0"
  revision 1
  head "https://github.com/realnc/qtads.git"

  stable do
    url "https://downloads.sourceforge.net/project/qtads/qtads-2.x/2.1.7/qtads-2.1.7.tar.bz2"
    sha256 "7477bb3cb1f74dcf7995a25579be8322c13f64fb02b7a6e3b2b95a36276ef231"

    # Remove for > 2.1.7
    # fix infinite recursion
    patch do
      url "https://github.com/realnc/qtads/commit/d22054b.patch?full_index=1"
      sha256 "e6af1eb7a8a4af72c9319ac6032a0bb8ffa098e7dd64d76da08ed0c7e50eaa7f"
    end

    # Remove for > 2.1.7
    # fix pointer/integer comparison
    patch do
      url "https://github.com/realnc/qtads/commit/46701a2.patch?full_index=1"
      sha256 "02c86bfa44769ec15844bbefa066360fb83ac923360ced140545fb782f4f3397"
    end

    # Fix "error: ordered comparison between pointer and zero"
    # Reported 11 Dec 2017 https://github.com/realnc/qtads/issues/7
    if DevelopmentTools.clang_build_version >= "900"
      patch do
        url "https://raw.githubusercontent.com/Homebrew/formula-patches/e189341/qtads/xcode9.diff"
        sha256 "2016fef6e867b7b8dfe1bd5db64d588161aad1357faa1962ee48edbe35042ddc"
      end
    end
  end

  # The first-party download page links to releases on GitHub, so we manually
  # check that for now. If the formula is modified in the future to use a
  # release from GitHub, this should be modified to use `url :stable`.
  livecheck do
    url :head
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle do
    sha256 cellar: :any, arm64_big_sur: "860d00c579b90f13dcae925920c472b5a0d4119200a131449c4fe9e86beb9c7c"
    sha256 cellar: :any, big_sur:       "0b7ca6977cd90d44364cbea43a729e80c4c4dcd95427968cde38e1bf1971befc"
    sha256 cellar: :any, catalina:      "ddc00587ac0d9f3ebcd6f0bac9e8a4207f9ae930a6646e4f3ce60d186abdc832"
    sha256 cellar: :any, mojave:        "3158fb6eb3d97f548c908983348e221ee190835bda5ce70704747117ecf7611d"
    sha256 cellar: :any, high_sierra:   "ef218d294d01133003c6e52fc32f9482726d6f237b3b5b90add019960ffe9eb2"
    sha256 cellar: :any, sierra:        "51fff5c39b8c234bb72b9a3865f7a067fb2dab902316c7943261ba66ed98ab19"
    sha256 cellar: :any, el_capitan:    "fe8ab65019c324c13c9024291b3e6288aff3ec28049a0cf321da421b4c28f0f6"
    sha256 cellar: :any, yosemite:      "e2383ed761b051e337ed2a4a4162655cb9eaa19ed8ab0666e8a7d1efa236b9b2"
  end

  depends_on "pkg-config" => :build
  depends_on "qt"
  depends_on "sdl2"
  depends_on "sdl2_mixer"
{'fraction_non_alphanumeric': 0.08328192473781616, 'fraction_numerical': 0.22866543286037425, 'mean_word_length': 4.264069264069264, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2682481', 'n_tokens_mistral': 2688, 'n_tokens_neox': 2112, 'n_words': 300}