diff -Nru ibus-1.5.19/debian/changelog ibus-1.5.19/debian/changelog --- ibus-1.5.19/debian/changelog 2018-08-24 18:51:25.000000000 +0000 +++ ibus-1.5.19/debian/changelog 2018-09-01 21:10:11.000000000 +0000 @@ -1,3 +1,10 @@ +ibus (1.5.19-1+rpi1) buster-staging; urgency=medium + + * Apply upstream patch to allow build without wayland. + * Remove ibus/ui/gtk3/panelbinding.c to force regeneration. + + -- Peter Michael Green Sat, 01 Sep 2018 21:10:11 +0000 + ibus (1.5.19-1) unstable; urgency=medium [ Jeremy Bicha ] diff -Nru ibus-1.5.19/debian/patches/build-without-wayland.patch ibus-1.5.19/debian/patches/build-without-wayland.patch --- ibus-1.5.19/debian/patches/build-without-wayland.patch 1970-01-01 00:00:00.000000000 +0000 +++ ibus-1.5.19/debian/patches/build-without-wayland.patch 2018-09-01 21:09:33.000000000 +0000 @@ -0,0 +1,84 @@ +commit aa0f4252ff965729b871c91b4ed089bf98963c0b +Author: fujiwarat +Date: Fri Aug 10 15:43:58 2018 +0900 + + ui/gtk3: Check if gdk-wayland is installed + + BUG=https://github.com/ibus/ibus/issues/2035 + +diff --git a/configure.ac b/configure.ac +index 091e20f2..4b6a7a21 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -237,12 +237,21 @@ if test x"$enable_gtk3" = x"yes"; then + PKG_CHECK_MODULES(GTK3, [ + gtk+-3.0 + ]) ++ PKG_CHECK_EXISTS([gdk-wayland-3.0], ++ [enable_gdk3_wayland=yes], ++ [enable_gdk3_wayland=no] ++ ) + + gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0` + GTK3_IM_MODULEDIR="$libdir"/gtk-3.0/$gtk3_binary_version/immodules + else + enable_gtk3="no (disabled, use --enable-gtk3 to enable)" ++ enable_gdk3_wayland=no ++fi ++if test x"$enable_gdk3_wayland" != x"yes"; then ++ enable_gdk3_wayland="no (disabled, need to install gdk-wayland-3.0.pc)" + fi ++AM_CONDITIONAL([ENABLE_GDK3_WAYLAND], [test x"$enable_gdk3_wayland" = x"yes"]) + + if test x"$enable_xim" = x"yes"; then + # Check for x11 +@@ -785,6 +794,7 @@ Build options: + Build gtk3 immodule $enable_gtk3 + Build XIM agent server $enable_xim + Build wayland support $enable_wayland ++ Build gdk3 wayland support $enable_gdk3_wayland + Build appindicator support $enable_appindicator + Build appindicator engine icon $enable_appindicator_engine_icon + Build python library $enable_python_library +diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am +index aaba7a4d..6ebc96ce 100644 +--- a/ui/gtk3/Makefile.am ++++ b/ui/gtk3/Makefile.am +@@ -78,7 +78,6 @@ AM_VALAFLAGS = \ + --pkg=ibus-1.0 \ + --pkg=config \ + --pkg=xi \ +- --pkg=gdk-wayland \ + --target-glib="$(VALA_TARGET_GLIB_VERSION)" \ + $(NULL) + +@@ -105,6 +104,10 @@ if ENABLE_APPINDICATOR_ENGINE_ICON + AM_VALAFLAGS += --define=INDICATOR_ENGINE_ICON + endif + ++if ENABLE_GDK3_WAYLAND ++AM_VALAFLAGS += --pkg=gdk-wayland --define=USE_GDK_WAYLAND ++endif ++ + libexec_PROGRAMS = ibus-ui-gtk3 + + ibus_ui_gtk3_SOURCES = \ +diff --git a/ui/gtk3/panelbinding.vala b/ui/gtk3/panelbinding.vala +index 95115b13..981b5509 100644 +--- a/ui/gtk3/panelbinding.vala ++++ b/ui/gtk3/panelbinding.vala +@@ -237,9 +237,14 @@ class PanelBinding : IBus.PanelService { + GLib.Object(connection : bus.get_connection(), + object_path : IBus.PATH_PANEL_EXTENSION_EMOJI); + ++#if USE_GDK_WAYLAND + Type instance_type = Gdk.Display.get_default().get_type(); + Type wayland_type = typeof(GdkWayland.Display); + m_is_wayland = instance_type.is_a(wayland_type); ++#else ++ m_is_wayland = false; ++ warning("Checking Wayland is disabled"); ++#endif + + m_bus = bus; + m_application = application; diff -Nru ibus-1.5.19/debian/patches/series ibus-1.5.19/debian/patches/series --- ibus-1.5.19/debian/patches/series 2018-08-24 18:51:25.000000000 +0000 +++ ibus-1.5.19/debian/patches/series 2018-09-01 21:09:51.000000000 +0000 @@ -0,0 +1 @@ +build-without-wayland.patch diff -Nru ibus-1.5.19/debian/rules ibus-1.5.19/debian/rules --- ibus-1.5.19/debian/rules 2018-08-24 18:51:25.000000000 +0000 +++ ibus-1.5.19/debian/rules 2018-09-01 21:10:11.000000000 +0000 @@ -61,3 +61,6 @@ override_dh_auto_test: -dh_auto_test -- V=1 # disabled due to FAIL: ibus-compose +override_dh_auto_clean: + dh_auto_clean + rm -f ibus/ui/gtk3/panelbinding.c \ No newline at end of file