diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch index e69de29..a5b8cdd 100644 --- a/ibus-HEAD.patch +++ b/ibus-HEAD.patch @@ -0,0 +1,343 @@ +From d47dc5520145110acc5567e98cd3b0694aa13dde Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 1 Aug 2023 23:21:33 +0900 +Subject: [PATCH 1/3] src/tests: Fix some tests + +- Delete ua(rstu) in org.freedesktop.ibus.gschema.xml +ua(rstu) has been available in xkeyboard-config 2.38 but deleted +in 2.39. + +- Use command -v rather than which in runtest + +Fixes: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/a9f7e47 + +BUG=https://github.com/ibus/ibus/issues/2542 +BUG=https://github.com/ibus/ibus/issues/2544 +--- + data/dconf/org.freedesktop.ibus.gschema.xml | 4 ++-- + src/tests/runtest | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/data/dconf/org.freedesktop.ibus.gschema.xml b/data/dconf/org.freedesktop.ibus.gschema.xml +index 5c96ce39..d115a436 100644 +--- a/data/dconf/org.freedesktop.ibus.gschema.xml ++++ b/data/dconf/org.freedesktop.ibus.gschema.xml +@@ -74,8 +74,8 @@ + 'ru(xal)', 'se(rus)', 'se(rus_nodeadkeys)', 'se(swl)', 'sy', + 'sy(syc)', 'sy(syc_phonetic)', 'th', 'th(pat)', 'th(tis)', + 'tj', 'tj(legacy)', 'tz', 'ua', 'ua(homophonic)', +- 'ua(legacy)', 'ua(phonetic)', 'ua(rstu)', 'ua(rstu_ru)', +- 'ua(typewriter)', 'ua(winkeys)', 'us(chr)', 'us(rus)', 'uz' ] ++ 'ua(legacy)', 'ua(phonetic)', 'ua(typewriter)', 'ua(winkeys)', ++ 'us(chr)', 'us(rus)', 'uz' ] + + Latin layouts which have no ASCII + US layout is appended to the Latin layouts. variant can be omitted. +diff --git a/src/tests/runtest b/src/tests/runtest +index 036dc771..e8487896 100755 +--- a/src/tests/runtest ++++ b/src/tests/runtest +@@ -44,8 +44,7 @@ MACHINE=`uname -m` + if test x"$MACHINE" = xx86_64 ; then + GTK_QUERY_MODULE=gtk-query-immodules-3.0-64 + fi +-which $GTK_QUERY_MODULE +-if [ $? -ne 0 ] ; then ++if ! command -v $GTK_QUERY_MODULE &> /dev/null ; then + GTK_QUERY_MODULE=gtk-query-immodules-3.0 + fi + +-- +2.41.0 + +From 4e644e8dff68c4f7d52c0fe5da8b3f3a89c74328 Mon Sep 17 00:00:00 2001 +From: fujiwarat +Date: Tue, 1 Aug 2023 23:25:35 +0900 +Subject: [PATCH 2/3] ui/gtk3: Fix configure --disable-appindicator + +Seems `automake` runs `valac` for all VALA files as the concept while +I could not find such a documentation and I added "#if INDICATOR" in +indicator.vala at the moment. + +BUG=https://github.com/ibus/ibus/issues/2543 +--- + ui/gtk3/Makefile.am | 56 ++++++++++++++++++++++-------------------- + ui/gtk3/indicator.vala | 3 +++ + ui/gtk3/panel.vala | 26 ++++++++++++++++++-- + 3 files changed, 56 insertions(+), 29 deletions(-) + +diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am +index 2cc72037..6f732271 100644 +--- a/ui/gtk3/Makefile.am ++++ b/ui/gtk3/Makefile.am +@@ -90,6 +90,32 @@ AM_VALAFLAGS = \ + --target-glib="$(VALA_TARGET_GLIB_VERSION)" \ + $(NULL) + ++libexec_PROGRAMS = ibus-ui-gtk3 ++ ++ibus_ui_gtk3_SOURCES = \ ++ application.vala \ ++ bindingcommon.vala \ ++ candidatearea.vala \ ++ candidatepanel.vala \ ++ emojier.vala \ ++ handle.vala \ ++ iconwidget.vala \ ++ keybindingmanager.vala \ ++ panel.vala \ ++ pango.vala \ ++ property.vala \ ++ propertypanel.vala \ ++ separator.vala \ ++ switcher.vala \ ++ xkblayout.vala \ ++ gen-notification-item.xml.c \ ++ gen-notification-watcher.xml.c \ ++ $(NULL) ++ ++ibus_ui_gtk3_LDADD = \ ++ $(AM_LDADD) \ ++ $(NULL) ++ + if ENABLE_LIBNOTIFY + AM_CFLAGS += \ + @LIBNOTIFY_CFLAGS@ \ +@@ -119,35 +145,11 @@ AM_LDADD += \ + @DBUSMENU_GLIB_LIBS@ \ + @DBUSMENU_GTK3_LIBS@ \ + $(NULL) ++ibus_ui_gtk3_SOURCES += \ ++ indicator.vala \ ++ $(NULL) + endif + +-libexec_PROGRAMS = ibus-ui-gtk3 +- +-ibus_ui_gtk3_SOURCES = \ +- application.vala \ +- bindingcommon.vala \ +- candidatearea.vala \ +- candidatepanel.vala \ +- emojier.vala \ +- handle.vala \ +- iconwidget.vala \ +- indicator.vala \ +- keybindingmanager.vala \ +- panel.vala \ +- pango.vala \ +- property.vala \ +- propertypanel.vala \ +- separator.vala \ +- switcher.vala \ +- xkblayout.vala \ +- gen-notification-item.xml.c \ +- gen-notification-watcher.xml.c \ +- $(NULL) +- +-ibus_ui_gtk3_LDADD = \ +- $(AM_LDADD) \ +- $(NULL) +- + gen-%.xml.c: %.xml + echo "Building $@ from $<" + echo "const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<)))) = " > $@ +diff --git a/ui/gtk3/indicator.vala b/ui/gtk3/indicator.vala +index cae6ce5e..b53fd753 100644 +--- a/ui/gtk3/indicator.vala ++++ b/ui/gtk3/indicator.vala +@@ -26,6 +26,8 @@ + * for left click on the indicator. + */ + ++// I have no idea to exempt this file to make ibus_ui_gtk3_vala.stamp ++#if INDICATOR + public extern string _notification_item; + public extern string _notification_watcher; + +@@ -644,3 +646,4 @@ class Indicator : IBus.Service + public signal void secondary_activate(); + public signal void registered_status_notifier_item(); + } ++#endif +diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala +index 7113460d..f1bbd720 100644 +--- a/ui/gtk3/panel.vala ++++ b/ui/gtk3/panel.vala +@@ -33,7 +33,9 @@ class Panel : IBus.PanelService { + private GLib.Settings m_settings_hotkey = null; + private GLib.Settings m_settings_panel = null; + private IconType m_icon_type = IconType.STATUS_ICON; ++#if INDICATOR + private Indicator m_indicator; ++#endif + private Gtk.StatusIcon m_status_icon; + private Gtk.Menu m_ime_menu; + private Gtk.Menu m_sys_menu; +@@ -685,7 +687,9 @@ class Panel : IBus.PanelService { + + m_status_icon.set_visible( + m_settings_panel.get_boolean("show-icon-on-systray")); +- } else if (m_icon_type == IconType.INDICATOR) { ++ } ++#if INDICATOR ++ else if (m_icon_type == IconType.INDICATOR) { + if (m_indicator == null) + return; + +@@ -694,6 +698,7 @@ class Panel : IBus.PanelService { + else + m_indicator.set_status(Indicator.Status.PASSIVE); + } ++#endif + } + + private void set_lookup_table_orientation() { +@@ -748,7 +753,9 @@ class Panel : IBus.PanelService { + if (m_status_icon != null && m_switcher != null) + state_changed(); + } +- } else if (m_icon_type == IconType.INDICATOR) { ++ } ++#if INDICATOR ++ else if (m_icon_type == IconType.INDICATOR) { + if (m_xkb_icon_image.size() > 0) { + m_xkb_icon_image.remove_all(); + +@@ -756,6 +763,7 @@ class Panel : IBus.PanelService { + state_changed(); + } + } ++#endif + } + + private void set_property_icon_delay_time() { +@@ -1550,11 +1558,13 @@ class Panel : IBus.PanelService { + Gdk.Pixbuf pixbuf = create_icon_pixbuf_with_string(symbol); + m_status_icon.set_from_pixbuf(pixbuf); + } ++#if INDICATOR + else if (m_icon_type == IconType.INDICATOR) { + Cairo.ImageSurface image = + create_cairo_image_surface_with_string(symbol, true); + m_indicator.set_cairo_image_surface_full(image, ""); + } ++#endif + + return false; + }); +@@ -1684,6 +1694,7 @@ class Panel : IBus.PanelService { + m_property_panel.set_properties(props); + set_properties(props); + ++#if INDICATOR + if (m_icon_type != IconType.INDICATOR) + return; + if (m_is_context_menu) +@@ -1699,6 +1710,7 @@ class Panel : IBus.PanelService { + m_indicator.set_menu(create_activate_menu ()); + return false; + }); ++#endif + } + + public override void update_property(IBus.Property prop) { +@@ -1752,11 +1764,13 @@ class Panel : IBus.PanelService { + if (m_switcher.is_running()) + return; + ++#if INDICATOR + if (m_icon_type == IconType.INDICATOR) { + // Wait for the callback of the session bus. + if (m_indicator == null) + return; + } ++#endif + + var icon_name = "ibus-keyboard"; + +@@ -1771,8 +1785,10 @@ class Panel : IBus.PanelService { + if (icon_name[0] == '/') { + if (m_icon_type == IconType.STATUS_ICON) + m_status_icon.set_from_file(icon_name); ++#if INDICATOR + else if (m_icon_type == IconType.INDICATOR) + m_indicator.set_icon_full(icon_name, ""); ++#endif + } else { + string language = null; + +@@ -1788,24 +1804,30 @@ class Panel : IBus.PanelService { + create_icon_pixbuf_with_string(language); + m_status_icon.set_from_pixbuf(pixbuf); + } ++#if INDICATOR + else if (m_icon_type == IconType.INDICATOR) { + Cairo.ImageSurface image = + create_cairo_image_surface_with_string(language, + true); + m_indicator.set_cairo_image_surface_full(image, ""); + } ++#endif + } else { + var theme = Gtk.IconTheme.get_default(); + if (theme.lookup_icon(icon_name, 48, 0) != null) { + if (m_icon_type == IconType.STATUS_ICON) + m_status_icon.set_from_icon_name(icon_name); ++#if INDICATOR + else if (m_icon_type == IconType.INDICATOR) + m_indicator.set_icon_full(icon_name, ""); ++#endif + } else { + if (m_icon_type == IconType.STATUS_ICON) + m_status_icon.set_from_icon_name("ibus-engine"); ++#if INDICATOR + else if (m_icon_type == IconType.INDICATOR) + m_indicator.set_icon_full("ibus-engine", ""); ++#endif + } + } + } +-- +2.41.0 + +From 98c6ee7297a72b30e49431061b653ffba1bdbdf7 Mon Sep 17 00:00:00 2001 +From: Gunnar Hjalmarsson +Date: Wed, 2 Aug 2023 16:56:59 +0200 +Subject: [PATCH 3/3] Fix typo in src/ibusservice.h + +"class" seems to be a reserved name in C++, so to make it possible to +build plasma-desktop, the name "class" in +ibus_service_class_free_interfaces() is replaced with "klass" in the +same way as in ibus_service_class_add_interfaces(). + +BUG=https://github.com/ibus/ibus/issues/2550 +--- + src/ibusservice.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ibusservice.h b/src/ibusservice.h +index 37fca0ee..72263cb2 100644 +--- a/src/ibusservice.h ++++ b/src/ibusservice.h +@@ -254,7 +254,7 @@ gboolean ibus_service_class_add_interfaces + + /** + * ibus_service_class_free_interfaces: +- * @class: An IBusServiceClass. ++ * @klass: An IBusServiceClass. + * @depth: The number of D-Bus introspection interfaces. + * + * Free the first @depth interfaces if @depth is positive. Free the last +@@ -266,7 +266,7 @@ gboolean ibus_service_class_add_interfaces + * returned but any interfaces are not freed. + */ + int ibus_service_class_free_interfaces +- (IBusServiceClass *class, ++ (IBusServiceClass *klass, + int depth); + + G_END_DECLS +-- +2.41.0 + diff --git a/ibus.spec b/ibus.spec index 4cf98d7..dcfb61d 100644 --- a/ibus.spec +++ b/ibus.spec @@ -52,7 +52,7 @@ Name: ibus Version: 1.5.29~beta1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPL-2.0-or-later URL: https://github.com/ibus/%name/wiki @@ -60,6 +60,7 @@ Source0: https://github.com/ibus/%name/releases/download/%{source_version Source1: %{name}-xinput Source2: %{name}.conf.5 # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch # Under testing #1349148 #1385349 #1350291 #1406699 #1432252 #1601577 Patch1: %{name}-1385349-segv-bus-proxy.patch %if 0%{?fedora:0}%{?rhel:1} @@ -557,6 +558,11 @@ dconf update || : %{_datadir}/installed-tests/ibus %changelog +* Thu Aug 03 2023 Takao Fujiwara - 1.5.29~beta1-2 +- Fix some source tests +- Fix configure --disable-appindicator +- Fix typo in src/ibusservice.h + * Fri Jul 28 2023 Takao Fujiwara - 1.5.29~beta1-1 - Implement Plasma Wayland