48 lines
2.1 KiB
Ruby
48 lines
2.1 KiB
Ruby
class Qcachegrind < Formula
|
|
desc "Visualize data generated by Cachegrind and Calltree"
|
|
homepage "https://kcachegrind.github.io/"
|
|
url "https://download.kde.org/stable/release-service/22.12.0/src/kcachegrind-22.12.0.tar.xz"
|
|
sha256 "0e7a9b042ba68ff29af8b6b6002606b93994103ccd40ac3aeec58bb312c4e350"
|
|
license "GPL-2.0-or-later"
|
|
|
|
# We don't match versions like 19.07.80 or 19.07.90 where the patch number
|
|
# is 80+ (beta) or 90+ (RC), as these aren't stable releases.
|
|
livecheck do
|
|
url "https://download.kde.org/stable/release-service/"
|
|
regex(%r{href=.*?v?(\d+\.\d+\.(?:(?![89]\d)\d+)(?:\.\d+)*)/?["' >]}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_ventura: "eeb35d6860155067398f6fc8bd40b0d35d8995010dd676287e5a1a4cd8b0c6f2"
|
|
sha256 cellar: :any, arm64_monterey: "eeb35d6860155067398f6fc8bd40b0d35d8995010dd676287e5a1a4cd8b0c6f2"
|
|
sha256 cellar: :any, arm64_big_sur: "d22902e61e774b3ab7978c17a237755bd9ebf16d032ebd4069b7f69e83046d45"
|
|
sha256 cellar: :any, ventura: "d4c78bcd4b8e4d1b7c86a13fbe373f6f928dd26ae6ebfa34eb46c86a5dff995c"
|
|
sha256 cellar: :any, monterey: "d4c78bcd4b8e4d1b7c86a13fbe373f6f928dd26ae6ebfa34eb46c86a5dff995c"
|
|
sha256 cellar: :any, big_sur: "024c214b8b20599f6a9002a5f4e787898c13e4acc664217a0a123b2d47a5ba3f"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "dacfbb1988ff93d705056a3befab0b60bafe58bd4bd0a5e92857db3a24e999b9"
|
|
end
|
|
|
|
depends_on "graphviz"
|
|
depends_on "qt@5"
|
|
|
|
fails_with gcc: "5"
|
|
|
|
def install
|
|
args = ["-config", "release", "-spec"]
|
|
os = OS.mac? ? "macx" : OS.kernel_name.downcase
|
|
compiler = ENV.compiler.to_s.start_with?("gcc") ? "g++" : ENV.compiler
|
|
arch = Hardware::CPU.intel? ? "" : "-#{Hardware::CPU.arch}"
|
|
args << "#{os}-#{compiler}#{arch}"
|
|
|
|
system Formula["qt@5"].opt_bin/"qmake", *args
|
|
system "make"
|
|
|
|
if OS.mac?
|
|
prefix.install "qcachegrind/qcachegrind.app"
|
|
bin.install_symlink prefix/"qcachegrind.app/Contents/MacOS/qcachegrind"
|
|
else
|
|
bin.install "qcachegrind/qcachegrind"
|
|
end
|
|
end
|
|
end
|