homebrew-core/Formula/qcachegrind.rb

47 lines
2.0 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.08.2/src/kcachegrind-22.08.2.tar.xz"
sha256 "4c9a06469d6eeeff9fd4f5fd50004e710791c171d7ae99ca507ea383cce40215"
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_monterey: "4129842b931762f8968bb8fbe9f3a2331e84ba22a1d0e874dad534680f545a9f"
sha256 cellar: :any, arm64_big_sur: "629bc35134f5d03c741881b21936a0de4dc923646780622824721d03eb6f553f"
sha256 cellar: :any, monterey: "b96f81c384b827326989a8bde1d2e298512ef0d075eaa388d4e46647b016d1f6"
sha256 cellar: :any, big_sur: "914996185539c4f9786d5a962cea0164fda961d4a57ea6d144680fdaba5b1bc5"
sha256 cellar: :any, catalina: "929a784c0f3c273fd010f85d9d53999a810338dc42ff3477cd50d9f8174d5af1"
sha256 cellar: :any_skip_relocation, x86_64_linux: "2a17ee355b217871f86a2077a5f95f3e98343281fbe4c1f6e1ccef5cb9d1f183"
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