<commit_before>class Capstone < Formula
  desc "Multi-platform, multi-architecture disassembly framework"
  homepage "https://www.capstone-engine.org/"
  url "https://github.com/aquynh/capstone/archive/4.0.2.tar.gz"
  sha256 "7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a"
  license "BSD-3-Clause"
  head "https://github.com/aquynh/capstone.git", branch: "next"

  bottle do
    sha256 cellar: :any, arm64_big_sur: "5c2d67aeb32a36c76d1918ec10de347971b385fc73b3025c97639467dc5302e2"
    sha256 cellar: :any, big_sur:       "21dd5b41e81b165e0419901103aa46ab8afee2be5453b2076c8f7a5b94fdf211"
    sha256 cellar: :any, catalina:      "b434ee96e9d7c413e289340b280705a6c3b9929cf1859de865d88bc012c34396"
    sha256 cellar: :any, mojave:        "c90885740ef54af155c2a0151dc85f728a3aa7ca304a45510e5524ac7fecb7fc"
    sha256 cellar: :any, high_sierra:   "c6d974a3c237fc36bfea2042d95551f2be7197d37fc0df6c7b9ea2179cd01084"
  end

  def install
    ENV["HOMEBREW_CAPSTONE"] = "1"
    ENV["PREFIX"] = prefix
    system "./make.sh"
    system "./make.sh", "install"
  end

  test do
    # code comes from https://www.capstone-engine.org/lang_c.html
    (testpath/"test.c").write <<~EOS
      #include <stdio.h>
      #include <inttypes.h><commit_msg>capstone: use standard make install (#73682)<commit_after>class Capstone < Formula
  desc "Multi-platform, multi-architecture disassembly framework"
  homepage "https://www.capstone-engine.org/"
  url "https://github.com/aquynh/capstone/archive/4.0.2.tar.gz"
  sha256 "7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a"
  license "BSD-3-Clause"
  head "https://github.com/aquynh/capstone.git", branch: "next"

  bottle do
    sha256 cellar: :any, arm64_big_sur: "5c2d67aeb32a36c76d1918ec10de347971b385fc73b3025c97639467dc5302e2"
    sha256 cellar: :any, big_sur:       "21dd5b41e81b165e0419901103aa46ab8afee2be5453b2076c8f7a5b94fdf211"
    sha256 cellar: :any, catalina:      "b434ee96e9d7c413e289340b280705a6c3b9929cf1859de865d88bc012c34396"
    sha256 cellar: :any, mojave:        "c90885740ef54af155c2a0151dc85f728a3aa7ca304a45510e5524ac7fecb7fc"
    sha256 cellar: :any, high_sierra:   "c6d974a3c237fc36bfea2042d95551f2be7197d37fc0df6c7b9ea2179cd01084"
  end

  def install
    ENV["HOMEBREW_CAPSTONE"] = "1"
    ENV["PREFIX"] = prefix
    system "./make.sh"
    system "make", "install", "PREFIX=#{prefix}"
  end

  test do
    # code comes from https://www.capstone-engine.org/lang_c.html
    (testpath/"test.c").write <<~EOS
      #include <stdio.h>
      #include <inttypes.h>
{'fraction_non_alphanumeric': 0.10736677115987461, 'fraction_numerical': 0.21904388714733541, 'mean_word_length': 4.7242152466367715, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5749464', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1101, 'n_words': 149}