From: Benda Xu Date: Mon, 16 Dec 2019 14:11:14 +0000 (+0800) Subject: x11-wm/xpra: fix for USE=-dbus. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c4e62235cc5085750be9c498b95570f785cf2049;p=gentoo.git x11-wm/xpra: fix for USE=-dbus. This patch allows xpra to be started without Python dbus module when USE=-dbus. Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Benda Xu --- diff --git a/x11-wm/xpra/files/xpra-3.0.2-dbus.patch b/x11-wm/xpra/files/xpra-3.0.2-dbus.patch new file mode 100644 index 000000000000..e0f14b8ba59d --- /dev/null +++ b/x11-wm/xpra/files/xpra-3.0.2-dbus.patch @@ -0,0 +1,29 @@ +Remove dbus functionality if USE=dbus is not specified. + +Index: xpra-3.0.2/xpra/scripts/server.py +=================================================================== +--- xpra-3.0.2.orig/xpra/scripts/server.py ++++ xpra-3.0.2/xpra/scripts/server.py +@@ -748,14 +748,9 @@ def do_run_server(error_cb, opts, mode, + log("chdir(%s)", opts.chdir) + os.chdir(opts.chdir) + +- dbus_pid, dbus_env = 0, {} + if not shadowing and POSIX and not OSX and not clobber: + no_gtk() + assert starting or starting_desktop or proxying +- from xpra.server.dbus.dbus_start import start_dbus +- dbus_pid, dbus_env = start_dbus(opts.dbus_launch) +- if dbus_env: +- os.environ.update(dbus_env) + + display = None + if not proxying: +@@ -835,7 +830,6 @@ def do_run_server(error_cb, opts, mode, + app.display_name = display_name + app.init(opts) + app.init_sockets(sockets) +- app.init_dbus(dbus_pid, dbus_env) + if not shadowing and (xvfb_pid or clobber): + app.init_display_pid(xvfb_pid) + app.original_desktop_display = desktop_display diff --git a/x11-wm/xpra/xpra-3.0.2.ebuild b/x11-wm/xpra/xpra-3.0.2.ebuild index c57900d96ee6..f3cb1bc10dec 100644 --- a/x11-wm/xpra/xpra-3.0.2.ebuild +++ b/x11-wm/xpra/xpra-3.0.2.ebuild @@ -97,6 +97,8 @@ pkg_postinst() { } python_prepare_all() { + use dbus || eapply ${FILESDIR}/${PN}-3.0.2-dbus.patch + hprefixify -w '/os.path/' setup.py hprefixify tmpfiles.d/xpra.conf xpra/server/server_util.py \ xpra/platform{/xposix,}/paths.py xpra/scripts/server.py