2014-12-23 03:33:45 +00:00
|
|
|
class VirtManager < Formula
|
2018-02-24 19:56:01 +00:00
|
|
|
include Language::Python::Virtualenv
|
|
|
|
|
2015-11-25 18:32:56 +00:00
|
|
|
desc "App for managing virtual machines"
|
2015-04-03 01:26:05 +00:00
|
|
|
homepage "https://virt-manager.org/"
|
2018-03-29 01:48:28 +00:00
|
|
|
url "https://virt-manager.org/download/sources/virt-manager/virt-manager-1.5.1.tar.gz"
|
|
|
|
sha256 "ee889d59110986391a394077f004f68125e01e216a5e7cfc29adb6ae49ab2dab"
|
2018-09-17 00:15:33 +00:00
|
|
|
revision 3
|
2014-12-23 03:33:45 +00:00
|
|
|
|
|
|
|
depends_on "intltool" => :build
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "pkg-config" => :build
|
2015-04-03 00:40:06 +00:00
|
|
|
|
2018-02-24 19:56:01 +00:00
|
|
|
depends_on "adwaita-icon-theme"
|
2018-08-08 00:04:59 +00:00
|
|
|
depends_on "dbus"
|
2014-12-23 03:33:45 +00:00
|
|
|
depends_on "gtk+3"
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "gtk-vnc"
|
|
|
|
depends_on "hicolor-icon-theme"
|
|
|
|
depends_on "libosinfo"
|
|
|
|
depends_on "libvirt"
|
2014-12-23 03:33:45 +00:00
|
|
|
depends_on "libvirt-glib"
|
2018-02-24 19:56:01 +00:00
|
|
|
depends_on "libxml2"
|
2018-08-08 00:04:59 +00:00
|
|
|
depends_on "osinfo-db"
|
|
|
|
depends_on "py2cairo"
|
2018-03-29 01:48:28 +00:00
|
|
|
depends_on "pygobject3" => "with-python@2"
|
2018-08-08 00:04:59 +00:00
|
|
|
depends_on "python@2" if MacOS.version <= :snow_leopard
|
2015-11-25 18:08:45 +00:00
|
|
|
depends_on "spice-gtk"
|
2014-12-23 03:33:45 +00:00
|
|
|
depends_on "vte3"
|
|
|
|
|
|
|
|
resource "libvirt-python" do
|
2018-09-17 00:15:33 +00:00
|
|
|
url "https://libvirt.org/sources/python/libvirt-python-4.7.0.tar.gz"
|
|
|
|
sha256 "e36fee5898de3550ed7e63d5d0a8447f9d78f06574634855dee59eae27930908"
|
2017-09-06 17:12:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "idna" do
|
2018-07-19 03:21:55 +00:00
|
|
|
url "https://pypi.io/packages/source/i/idna/idna-2.7.tar.gz"
|
|
|
|
sha256 "684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
|
2017-09-06 17:12:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "certifi" do
|
2018-07-19 03:21:55 +00:00
|
|
|
url "https://pypi.io/packages/source/c/certifi/certifi-2018.4.16.tar.gz"
|
|
|
|
sha256 "13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7"
|
2017-09-06 17:12:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "chardet" do
|
|
|
|
url "https://pypi.io/packages/source/c/chardet/chardet-3.0.4.tar.gz"
|
|
|
|
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "urllib3" do
|
2018-07-19 03:21:55 +00:00
|
|
|
url "https://pypi.io/packages/source/u/urllib3/urllib3-1.23.tar.gz"
|
|
|
|
sha256 "a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
2015-11-25 23:24:56 +00:00
|
|
|
resource "requests" do
|
2018-07-19 03:21:55 +00:00
|
|
|
url "https://pypi.io/packages/source/r/requests/requests-2.19.1.tar.gz"
|
|
|
|
sha256 "ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "ipaddr" do
|
2018-03-29 01:48:28 +00:00
|
|
|
url "https://pypi.io/packages/source/i/ipaddr/ipaddr-2.2.0.tar.gz"
|
|
|
|
sha256 "4092dfe667588d16aa12b59acb7c8a4024e5dcb23a681cd0b0b602373eca88d6"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
2017-09-06 17:12:44 +00:00
|
|
|
# virt-manager does not launch on macOS unless --no-fork flag is provided
|
|
|
|
patch :DATA
|
2014-12-23 03:33:45 +00:00
|
|
|
|
|
|
|
def install
|
2018-02-24 19:56:01 +00:00
|
|
|
venv = virtualenv_create(libexec)
|
|
|
|
venv.pip_install resources
|
2014-12-23 03:33:45 +00:00
|
|
|
|
2018-02-24 19:56:01 +00:00
|
|
|
# recommended venv.pip_install_and_link buildpath does not work due to --single-version-externally-managed
|
|
|
|
system "#{libexec}/bin/python", "setup.py",
|
2014-12-23 03:33:45 +00:00
|
|
|
"configure",
|
|
|
|
"--prefix=#{libexec}"
|
2018-02-24 19:56:01 +00:00
|
|
|
system "#{libexec}/bin/python", "setup.py",
|
2015-11-25 23:24:56 +00:00
|
|
|
"--no-user-cfg",
|
|
|
|
"--no-update-icon-cache",
|
|
|
|
"--no-compile-schemas",
|
2014-12-23 03:33:45 +00:00
|
|
|
"install",
|
|
|
|
"--prefix=#{libexec}"
|
|
|
|
|
2018-02-24 19:56:01 +00:00
|
|
|
# install virt-manager commands with PATH set to Python virtualenv environment
|
|
|
|
bin.install Dir[libexec/"bin/virt-*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PATH => "#{libexec}/bin:$PATH")
|
2015-01-05 14:37:10 +00:00
|
|
|
|
|
|
|
# install and link schemas
|
|
|
|
share.install Dir[libexec/"share/glib-2.0"]
|
|
|
|
|
|
|
|
# install and link icons
|
|
|
|
share.install Dir[libexec/"share/icons"]
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def post_install
|
|
|
|
# manual schema compile step
|
|
|
|
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
|
|
|
|
# manual icon cache update step
|
2015-09-07 02:19:05 +00:00
|
|
|
system "#{Formula["gtk+3"].opt_bin}/gtk3-update-icon-cache", "#{HOMEBREW_PREFIX}/share/icons/hicolor"
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
2018-02-24 19:56:01 +00:00
|
|
|
|
|
|
|
test do
|
2018-02-25 02:00:27 +00:00
|
|
|
system "#{bin}/virt-manager", "--version"
|
2018-02-24 19:56:01 +00:00
|
|
|
end
|
2014-12-23 03:33:45 +00:00
|
|
|
end
|
|
|
|
__END__
|
2017-09-06 17:12:44 +00:00
|
|
|
--- a/virt-manager
|
|
|
|
+++ b/virt-manager
|
|
|
|
@@ -156,7 +156,8 @@
|
|
|
|
help="Print debug output to stdout (implies --no-fork)",
|
|
|
|
default=False)
|
|
|
|
parser.add_argument("--no-fork", action="store_true",
|
|
|
|
- help="Don't fork into background on startup")
|
|
|
|
+ help="Don't fork into background on startup",
|
|
|
|
+ default=True)
|
|
|
|
parser.add_argument("--no-conn-autostart", action="store_true",
|
|
|
|
dest="skip_autostart", help="Do not autostart connections")
|
|
|
|
parser.add_argument("--spice-disable-auto-usbredir", action="store_true",
|