<commit_before>class Opencascade < Formula
  desc "3D modeling and numerical simulation software for CAD/CAM/CAE"
  homepage "https://dev.opencascade.org/"
  url "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_6_3;sf=tgz"
  version "7.6.3"
  sha256 "baae5b3a7a38825396fc45ef9d170db406339f5eeec62e21b21036afeda31200"
  license "LGPL-2.1-only"

  # The first-party download page (https://dev.opencascade.org/release)
  # references version 7.5.0 and hasn't been updated for later maintenance
  # releases (e.g., 7.6.2, 7.5.2), so we check the Git tags instead. Release
  # information is posted at https://dev.opencascade.org/forums/occt-releases
  # but the text varies enough that we can't reliably match versions from it.
  livecheck do
    url "https://git.dev.opencascade.org/repos/occt.git"
    regex(/^v?(\d+(?:[._]\d+)+(?:p\d+)?)$/i)
    strategy :git do |tags, regex|
      tags.map { |tag| tag[regex, 1]&.gsub("_", ".") }.compact
    end
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "fcc339d2b37a2b8cb0d2abfe18278b377052db2efc4e878f3041172cf4556fd8"
    sha256 cellar: :any,                 arm64_big_sur:  "d1fe34d968ef3cc896ef218dac0c874f3c878ad9b2ec3fe2745d97246d23775a"
    sha256 cellar: :any,                 monterey:       "aab016c958c57cbba2bfc69aae276dabd8262ceae3534f6a11161015649774a7"
    sha256 cellar: :any,                 big_sur:        "c8a1c82ba773d2172970286fb8e3bc497bf36cdf2ea496be1fc0ccdb900db16c"
    sha256 cellar: :any,                 catalina:       "7a3b452e17479cb7c94b3e85a1c9de6e364ececa0cfe99cfc558791420a731b0"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "952cd53fcd596b002bf2e914d498280240597b892022b102c6c04c13ac67064b"
  end

  depends_on "cmake" => :build
  depends_on "doxygen" => :build
  depends_on "rapidjson" => :build
  depends_on "fontconfig"
  depends_on "freeimage"
  depends_on "freetype"
  depends_on "tbb"
  depends_on "tcl-tk"

  on_linux do
    depends_on "mesa" # For OpenGL
  end

  # Fix compilation errors with oneTBB 2021
  # Issue ref: https://tracker.dev.opencascade.org/view.php?id=0032697<commit_msg>opencascade: update 7.6.3 bottle.<commit_after>class Opencascade < Formula
  desc "3D modeling and numerical simulation software for CAD/CAM/CAE"
  homepage "https://dev.opencascade.org/"
  url "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_6_3;sf=tgz"
  version "7.6.3"
  sha256 "baae5b3a7a38825396fc45ef9d170db406339f5eeec62e21b21036afeda31200"
  license "LGPL-2.1-only"

  # The first-party download page (https://dev.opencascade.org/release)
  # references version 7.5.0 and hasn't been updated for later maintenance
  # releases (e.g., 7.6.2, 7.5.2), so we check the Git tags instead. Release
  # information is posted at https://dev.opencascade.org/forums/occt-releases
  # but the text varies enough that we can't reliably match versions from it.
  livecheck do
    url "https://git.dev.opencascade.org/repos/occt.git"
    regex(/^v?(\d+(?:[._]\d+)+(?:p\d+)?)$/i)
    strategy :git do |tags, regex|
      tags.map { |tag| tag[regex, 1]&.gsub("_", ".") }.compact
    end
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "96cdf3feef24749b79245628fde6a301a62101d287ba569658b1453c025a603e"
    sha256 cellar: :any,                 arm64_big_sur:  "9b896f09a6ce6bbcff4abdee911a58878028e9869d286f249e2822061b2815ce"
    sha256 cellar: :any,                 monterey:       "b63e43a407f51e81caac688e9975b1d699d381223d45edb8acd62eb90f4ca260"
    sha256 cellar: :any,                 big_sur:        "c59a832a0c276b11f31bb9b07b25c5ba27076cf61b4eff75a2f221eaf2ce1278"
    sha256 cellar: :any,                 catalina:       "e6cc4172dbdcb266b5b424c95402323dea264168fe0a0eaa8f486abdb9109386"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "03ae982ca1f28e1979f2d6533bd7c5bedb40ddb6e5637c27eec1bb16d68821b6"
  end

  depends_on "cmake" => :build
  depends_on "doxygen" => :build
  depends_on "rapidjson" => :build
  depends_on "fontconfig"
  depends_on "freeimage"
  depends_on "freetype"
  depends_on "tbb"
  depends_on "tcl-tk"

  on_linux do
    depends_on "mesa" # For OpenGL
  end

  # Fix compilation errors with oneTBB 2021
  # Issue ref: https://tracker.dev.opencascade.org/view.php?id=0032697
{'fraction_non_alphanumeric': 0.10631383472609099, 'fraction_numerical': 0.15506035283194058, 'mean_word_length': 3.7824639289678137, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 12, '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': '3789547', 'n_tokens_mistral': 2112, 'n_tokens_neox': 1753, 'n_words': 306}