From c3495b4515feb0f06c961e5f1b1e151a00854c50 Mon Sep 17 00:00:00 2001 From: Jeffrey Wildman Date: Fri, 3 Apr 2015 13:31:08 -0400 Subject: [PATCH] Add virt-viewer formula --- virt-viewer.rb | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 virt-viewer.rb diff --git a/virt-viewer.rb b/virt-viewer.rb new file mode 100644 index 0000000..b755197 --- /dev/null +++ b/virt-viewer.rb @@ -0,0 +1,37 @@ +class VirtViewer < Formula + homepage "https://virt-manager.org/" + url "https://virt-manager.org/download/sources/virt-viewer/virt-viewer-2.0.tar.gz" + sha256 "e9c583bcb5acdabac6a8a13eff6ce4e093a3050645771628f832e15ce685d437" + + depends_on "pkg-config" => :build + depends_on "intltool" => :build + depends_on "libtool" => :build + + depends_on "gtk+3" + depends_on :x11 + + # TODO: audio + depends_on "gtk-vnc" + # TODO: spice-gtk + #depends_on "spice-gtk" + + depends_on "libvirt" + depends_on "hicolor-icon-theme" + depends_on "shared-mime-info" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--disable-update-mimedb", + "--with-gtk=3.0", + "--prefix=#{prefix}" + system "make", "install" + end + + def post_install + # manual update of mime database + system "#{Formula["shared-mime-info"].opt_bin}/update-mime-database", "#{HOMEBREW_PREFIX}/share/mime" + # manual icon cache update step + system "#{Formula["gtk+"].opt_bin}/gtk-update-icon-cache", "#{HOMEBREW_PREFIX}/share/icons/hicolor" + end +end