diff --git a/ibus-vala-0.36.patch b/ibus-vala-0.36.patch new file mode 100644 index 0000000..00fd895 --- /dev/null +++ b/ibus-vala-0.36.patch @@ -0,0 +1,62 @@ +diff --git a/ui/gtk3/indicator.vala b/ui/gtk3/indicator.vala +index dac72b49..7da0fa92 100644 +--- a/ui/gtk3/indicator.vala ++++ b/ui/gtk3/indicator.vala +@@ -139,12 +139,17 @@ class Indicator : IBus.Service + m_watcher_interface_info = + m_watcher_node_info.lookup_interface( + NOTIFICATION_WATCHER_DBUS_IFACE); +- check_connect(); ++ try { ++ check_connect(); ++ } catch (GLib.IOError e) { ++ warning("Failed to call dbus proxy: " + e.message); ++ return; ++ } + } + +- private void check_connect() { ++ private async void check_connect() throws IOError { + if (m_proxy == null) { +- GLib.DBusProxy.new.begin( ++ m_proxy = yield new GLib.DBusProxy( + connection, + GLib.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES | + GLib.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS, +@@ -152,23 +157,7 @@ class Indicator : IBus.Service + NOTIFICATION_WATCHER_DBUS_ADDR, + NOTIFICATION_WATCHER_DBUS_OBJ, + NOTIFICATION_WATCHER_DBUS_IFACE, +- null, +- (obj, res) => { +- bus_watcher_ready(obj, res); +- }); +- } else { +- bus_watcher_ready(null, null); +- } +- } +- +- private void bus_watcher_ready(GLib.Object? obj, GLib.AsyncResult? res) { +- if (res != null) { +- try { +- m_proxy = GLib.DBusProxy.new.end(res); +- } catch (GLib.IOError e) { +- warning("Failed to call dbus proxy: " + e.message); +- return; +- } ++ null); + + m_proxy.notify["g-name-owner"].connect((obj, pspec) => { + var name = m_proxy.get_name_owner(); +@@ -176,7 +165,10 @@ class Indicator : IBus.Service + check_connect(); + }); + } ++ bus_watcher_ready(); ++ } + ++ private void bus_watcher_ready() { + var name = m_proxy.get_name_owner(); + // KDE panel does not run yet if name == null + if (name == null) + diff --git a/ibus.changes b/ibus.changes index 05dd4aa..516a8e9 100644 --- a/ibus.changes +++ b/ibus.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 1 13:16:08 UTC 2017 - dimstar@opensuse.org + +- Add ibus-vala-0.36.patch: Fix build with vala 0.36, which is + stricter in its binding usage. Patch only respective vala + versions. + ------------------------------------------------------------------- Wed Dec 28 15:04:47 UTC 2016 - hillwood@opensuse.org diff --git a/ibus.spec b/ibus.spec index 31329e8..a7b7983 100644 --- a/ibus.spec +++ b/ibus.spec @@ -1,7 +1,7 @@ # # spec file for package ibus # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -73,6 +73,8 @@ Patch10: hide-setup-menu.patch # PATCH-FIX-SLE setup-switch-im.patch bnc#899259 qzhao@suse.com # switch to ibus when ibus not running. Patch11: setup-switch-im.patch +# PATCH-FIX-UPSTREAM ibus-vala-0.36.patch dimstar@opensuse.org -- Fix build with vala 0.36 +Patch12: ibus-vala-0.36.patch BuildRequires: dbus-1-glib-devel BuildRequires: dbus-1-python-devel >= 0.83.0 BuildRequires: dconf-devel >= 0.7.5 @@ -262,6 +264,9 @@ sed -i \ %patch10 -p1 %patch11 -p1 %endif +if pkg-config --atleast-version 0.35 vapigen; then +%patch12 -p1 +fi cp -r %{SOURCE2} . cp -r %{SOURCE3} .