<pre style='margin:0'>
Dan Villiom Podlaski Christiansen (danchr) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/acba5d671f23e787ed9060fc33a75f492b46254b">https://github.com/macports/macports-ports/commit/acba5d671f23e787ed9060fc33a75f492b46254b</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit acba5d671f23e787ed9060fc33a75f492b46254b
</span>Author: Dan Villiom Podlaski Christiansen <danchr@macports.org>
AuthorDate: Sun Feb 19 00:29:30 2017 +0100
<span style='display:block; white-space:pre;color:#404040;'> virt-manager: new port
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> It's not terribly useful on a Mac, but it works!
</span>---
gnome/virt-manager/Portfile | 68 ++++++++++++++++++++++
.../catch-failure-to-setup-usbdev-manager.diff | 49 ++++++++++++++++
gnome/virt-manager/files/suppress-fork.diff | 14 +++++
3 files changed, 131 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gnome/virt-manager/Portfile b/gnome/virt-manager/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..c7cd1ca
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gnome/virt-manager/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,68 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup python 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup virt-manager virt-manager 1.4.0 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories gnome emulators
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {danchr @danchr} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://virt-manager.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://virt-manager.org/download/sources/virt-manager
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Desktop tool for managing virtual machines via libvirt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The virt-manager application is a GNOME desktop user interface for \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ managing virtual machines through libvirt. It primarily targets \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Linux KVM VMs, but also manages Xen and LXC (linux containers). It \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ presents a summary view of running domains, their live performance \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ & resource utilization statistics. Wizards enable the creation of \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ new domains, and configuration & adjustment of a domain’s resource \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ allocation & virtual hardware. An embedded VNC and SPICE client \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ viewer presents a full graphical console to the guest domain. \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The primary use on macOS is for remote administration of Linux boxes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 4aa2a0ee3410ad79d27a8d65f6edb90fee9b75e8 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 bf31a40cc48500cbf87a0e93a5838fc3f6ce4e2fa03f8bce6aa2615625e6caca
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+python.default_version 27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|/usr/bin/env python2|${python.bin}|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ virt-clone virt-convert virt-install virt-manager virt-xml
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles catch-failure-to-setup-usbdev-manager.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build port:intltool
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-gobject3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-libvirt \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-libxml2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-ipaddr \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:py${python.version}-requests \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libvirt-glib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:vte-gtk2-compat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:gtk-vnc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:spice-gtk \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:gtk2 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libosinfo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant quartz {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # forking at launch crashes 100% of the time - it should work in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # X11, but I haven't checked
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append suppress-fork.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.cmd ${build.cmd} configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args --prefix ${python.prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# stubs for checking dependencies in trace mode
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#test.cmd ${python.bin} virt-manager
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#test.args
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/gnome/virt-manager/files/catch-failure-to-setup-usbdev-manager.diff b/gnome/virt-manager/files/catch-failure-to-setup-usbdev-manager.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..628924d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gnome/virt-manager/files/catch-failure-to-setup-usbdev-manager.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,49 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# HG changeset patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# User Cole Robinson <crobinso@redhat.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Date 1466514092 14400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Tue Jun 21 09:01:32 2016 -0400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Node ID 8ee2439ccb6120cee4781630a632367ca31d7d97
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Parent 389fb0b3e120b226186e5a61214dd7d3dff3959b
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+viewers: spice: Catch failure to setup usbdev manager
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Since some distros like openbsd don't compile support for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+usb redirection, which makes this fail
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://bugzilla.redhat.com/show_bug.cgi?id=1348479
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git virtManager/viewers.py virtManager/viewers.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- virtManager/viewers.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ virtManager/viewers.py
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -538,16 +538,23 @@ class SpiceViewer(Viewer):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GObject.GObject.connect(self._spice_session, "channel-new",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self._channel_new_cb)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._usbdev_manager = SpiceClientGLib.UsbDeviceManager.get(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._spice_session)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._usbdev_manager.connect("auto-connect-failed",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._usbdev_redirect_error)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._usbdev_manager.connect("device-error",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self._usbdev_redirect_error)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Distros might have usb redirection compiled out, like OpenBSD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # https://bugzilla.redhat.com/show_bug.cgi?id=1348479
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._usbdev_manager = SpiceClientGLib.UsbDeviceManager.get(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._spice_session)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._usbdev_manager.connect("auto-connect-failed",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._usbdev_redirect_error)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._usbdev_manager.connect("device-error",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._usbdev_redirect_error)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- autoredir = self.config.get_auto_redirection()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if autoredir:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- gtk_session.set_property("auto-usbredir", True)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ autoredir = self.config.get_auto_redirection()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if autoredir:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ gtk_session.set_property("auto-usbredir", True)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ except:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self._usbdev_manager = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ logging.debug("Error initializing spice usb device manager",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exc_info=True)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #####################
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/gnome/virt-manager/files/suppress-fork.diff b/gnome/virt-manager/files/suppress-fork.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..52e2c93
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gnome/virt-manager/files/suppress-fork.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- virt-manager.orig 2017-02-19 00:13:01.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ virt-manager 2017-02-19 00:20:45.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -153,8 +153,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parser.add_argument("--debug", action="store_true", dest="debug",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ help="Print debug output to stdout (implies --no-fork)",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default=False)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- parser.add_argument("--no-fork", action="store_true", dest="nofork",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- help="Don't fork into background on startup")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ parser.add_argument("--fork", action="store_false", default=True,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ dest="nofork",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ help="Fork into background on startup")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parser.add_argument("--no-conn-autostart", action="store_true",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dest="skip_autostart", help="Do not autostart connections")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parser.add_argument("--spice-disable-auto-usbredir", action="store_true",
</span></pre><pre style='margin:0'>
</pre>