<commit_before>class Portmidi < Formula
  desc "Cross-platform library for real-time MIDI I/O"
  homepage "https://sourceforge.net/projects/portmedia/"
  url "https://downloads.sourceforge.net/project/portmedia/portmidi/217/portmidi-src-217.zip"
  sha256 "08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f"
  license "MIT"
  revision 2

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

  bottle do
    rebuild 2
    sha256 cellar: :any,                 arm64_big_sur: "3b88c9a63729019e630cd581fd6f54141cba80e6c0c2f57c369e67cd1b2e524b"
    sha256 cellar: :any,                 big_sur:       "b1f389b0e897e7fe5864bab75a9568bb4f08ede002f96f737f53248b88d49b43"
    sha256 cellar: :any,                 catalina:      "d36a5abe7624c563740d43403605a26d4c697ea4ed917f0263bc2869f1f9a766"
    sha256 cellar: :any,                 mojave:        "79c16a1e0a063781b5d89162d9c04e9bc6ff01a46a61479ea196d6749f0d0aff"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "6020495625938e80fe6242050f0aec05cf0061ebc77b009fb0806c3239952471"
  end

  depends_on "cmake" => :build

  on_linux do
    depends_on "alsa-lib"

    # Fix hardcoded "/usr/local" paths to install libraries and headers
    patch do
      url "https://sources.debian.org/data/main/p/portmidi/1:217-6/debian/patches/00_cmake.diff"
      sha256 "9a73c4453e784f97927d4412a916814b6f2ed864bd5f49d383c6650b8590fd26"
    end

    # Fix build error: midithru.c:(.text+0x374): undefined reference to `Pt_Start'
    patch do
      url "https://sources.debian.org/data/main/p/portmidi/1:217-6/debian/patches/20-movetest.diff"
      sha256 "938560fc3a6910f9451b11136ab295b68d8b0e0539a3cd0f02550d209bb39202"
    end

    # Install porttime libraries
    patch do
      url "https://sources.debian.org/data/main/p/portmidi/1:217-6/debian/patches/30-porttime_cmake.diff"
      sha256 "e6d26bfd2018e90d68c86cf5c7275480111873487d202bed7b1717a38dfa0fe2"
    end
  end<commit_msg>portmidi: update 217_2 bottle.<commit_after>class Portmidi < Formula
  desc "Cross-platform library for real-time MIDI I/O"
  homepage "https://sourceforge.net/projects/portmedia/"
  url "https://downloads.sourceforge.net/project/portmedia/portmidi/217/portmidi-src-217.zip"
  sha256 "08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f"
  license "MIT"
  revision 2

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

  bottle do
    rebuild 2
    sha256 cellar: :any,                 arm64_monterey: "22d94369f7d0908f12fb4152ff61c4fda25ec13a2d27a2a7a877f578091b66d7"
    sha256 cellar: :any,                 arm64_big_sur:  "3b88c9a63729019e630cd581fd6f54141cba80e6c0c2f57c369e67cd1b2e524b"
    sha256 cellar: :any,                 monterey:       "475293c8e6adf7796aaa7c0a5d8ed2be72b772db607ed2e51e33efef3ea4463d"
    sha256 cellar: :any,                 big_sur:        "b1f389b0e897e7fe5864bab75a9568bb4f08ede002f96f737f53248b88d49b43"
    sha256 cellar: :any,                 catalina:       "d36a5abe7624c563740d43403605a26d4c697ea4ed917f0263bc2869f1f9a766"
    sha256 cellar: :any,                 mojave:         "79c16a1e0a063781b5d89162d9c04e9bc6ff01a46a61479ea196d6749f0d0aff"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "6020495625938e80fe6242050f0aec05cf0061ebc77b009fb0806c3239952471"
  end

  depends_on "cmake" => :build

  on_linux do
    depends_on "alsa-lib"

    # Fix hardcoded "/usr/local" paths to install libraries and headers
    patch do
      url "https://sources.debian.org/data/main/p/portmidi/1:217-6/debian/patches/00_cmake.diff"
      sha256 "9a73c4453e784f97927d4412a916814b6f2ed864bd5f49d383c6650b8590fd26"
    end

    # Fix build error: midithru.c:(.text+0x374): undefined reference to `Pt_Start'
    patch do
      url "https://sources.debian.org/data/main/p/portmidi/1:217-6/debian/patches/20-movetest.diff"
      sha256 "938560fc3a6910f9451b11136ab295b68d8b0e0539a3cd0f02550d209bb39202"
    end

    # Install porttime libraries
    patch do
      url "https://sources.debian.org/data/main/p/portmidi/1:217-6/debian/patches/30-porttime_cmake.diff"
      sha256 "e6d26bfd2018e90d68c86cf5c7275480111873487d202bed7b1717a38dfa0fe2"
    end
  end
{'fraction_non_alphanumeric': 0.0910377358490566, 'fraction_numerical': 0.23514150943396225, 'mean_word_length': 3.743847874720358, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, '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': '307704', 'n_tokens_mistral': 2357, 'n_tokens_neox': 1818, 'n_words': 222}