aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorLarry Shaffer2014-11-02 20:02:13 -0700
committerMike McQuaid2014-11-03 08:18:50 +0000
commitbd35facdd92eaaf6e5264996f7c953d7410c6021 (patch)
treef078150769ad862cd16902ac4763d8ba2eb454fa /Library
parent643c0b9244ad36faf7260b06eada167f546d73ee (diff)
downloadhomebrew-bd35facdd92eaaf6e5264996f7c953d7410c6021.tar.bz2
gammaray 2.2.0 (new formula)
Closes #33850. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gammaray.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/gammaray.rb b/Library/Formula/gammaray.rb
new file mode 100644
index 000000000..35ebe92bd
--- /dev/null
+++ b/Library/Formula/gammaray.rb
@@ -0,0 +1,35 @@
+require "formula"
+
+class Gammaray < Formula
+ homepage "http://www.kdab.com/kdab-products/gammaray/"
+ url "https://github.com/KDAB/GammaRay/archive/v2.2.0.tar.gz"
+ sha1 "c6055ae24b67465528b1747f2ac291adcd805a8e"
+
+ option "without-qt4", "Build against Qt5 instead of Qt4 (default)"
+ option "with-vtk", "Build with VTK-with-Qt support, for object 3D visualizer"
+
+ needs :cxx11
+
+ depends_on "cmake" => :build
+ depends_on "qt" if build.with? "qt4"
+ depends_on "qt5" if build.without? "qt4"
+ depends_on "graphviz" => :recommended
+ # VTK needs to have Qt support, and it needs to match GammaRay's
+ depends_on "homebrew/science/vtk" => [:optional, ((build.with? "qt4") ? "with-qt" : "with-qt5")]
+
+ def install
+ args = std_cmake_args
+ args << "-DGAMMARAY_ENFORCE_QT4_BUILD=" + ((build.with? "qt4") ? "ON" : "OFF")
+ args << "-DCMAKE_DISABLE_FIND_PACKAGE_VTK=" + ((build.without? "vtk") ? "ON" : "OFF" )
+ args << "-DCMAKE_DISABLE_FIND_PACKAGE_Graphviz=" + ((build.without? "graphviz") ? "ON" : "OFF" )
+
+ mkdir "build" do
+ system "cmake", "..", *args
+ system "make", "install"
+ end
+ end
+
+ test do
+ assert_match /^qt/, %x[#{bin}/gammaray --list-probes].chomp
+ end
+end