<commit_before>class Libgr < Formula
  desc "GR framework: a graphics library for visualisation applications"
  homepage "https://gr-framework.org/"
  url "https://github.com/sciapp/gr/archive/v0.47.2.tar.gz"
  sha256 "f7390496ee3f4255346535cfcdf2da102a81c035a5931413fa5da1e2141cba09"

  bottle do
    sha256 "a04d35e2f78a8ae6f1988c6f5428956513975aad300daaa87a0f92c649745f12" => :catalina
    sha256 "02c7cd12e2249f98cac3b4668a1701b7e8a529fbf50c0a6b58c09baff29314b4" => :mojave
    sha256 "0aaf94592a8540a80ec2c06f6a527b721c5abb1b4f8eba48a3de865d76f8f193" => :high_sierra
  end

  depends_on :xcode => :build
  depends_on "cairo"
  depends_on "glfw"
  depends_on "libtiff"
  depends_on "qt"
  depends_on "zeromq"

  def install
    # TODO: Remove this when released archive includes
    # the fix of https://github.com/sciapp/gr/pull/101 .
    ENV.deparallelize
    system "make", "GRDIR=#{prefix}"
    system "make", "GRDIR=#{prefix}", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <stdio.h>
      #include <gr.h>
<commit_msg>libgr: update 0.47.2 bottle.<commit_after>class Libgr < Formula
  desc "GR framework: a graphics library for visualisation applications"
  homepage "https://gr-framework.org/"
  url "https://github.com/sciapp/gr/archive/v0.47.2.tar.gz"
  sha256 "f7390496ee3f4255346535cfcdf2da102a81c035a5931413fa5da1e2141cba09"

  bottle do
    sha256 "53ffc6abefb518519b24e8c943a888fb465e109af744882aa1128de022f3ce39" => :catalina
    sha256 "909195fcfd2d67ec95387c7a8f4351212d7a24f28d02a89fa49efad76d246529" => :mojave
    sha256 "27fa9ba02b543d0fc669b6db2ade86c2ad16876f31132a3b35981ce065e79919" => :high_sierra
  end

  depends_on :xcode => :build
  depends_on "cairo"
  depends_on "glfw"
  depends_on "libtiff"
  depends_on "qt"
  depends_on "zeromq"

  def install
    # TODO: Remove this when released archive includes
    # the fix of https://github.com/sciapp/gr/pull/101 .
    ENV.deparallelize
    system "make", "GRDIR=#{prefix}"
    system "make", "GRDIR=#{prefix}", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <stdio.h>
      #include <gr.h>

{'fraction_non_alphanumeric': 0.10679156908665105, 'fraction_numerical': 0.17283372365339578, 'mean_word_length': 4.435114503816794, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, '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': '6388671', 'n_tokens_mistral': 1083, 'n_tokens_neox': 907, 'n_words': 149}