4d8deb73d3
- Delete upstreamed ibus-xx-cross-compile.patch - Fix missing ibusenumtypes.h with parallel build - Fix to build libibus-1.0.la twice
2339 lines
77 KiB
Diff
2339 lines
77 KiB
Diff
From a140924e437346ebb7cd30c6e4d316ab5d447871 Mon Sep 17 00:00:00 2001
|
|
From: Simon Deziel <simon@sdeziel.info>
|
|
Date: Wed, 22 Feb 2023 19:05:17 +0900
|
|
Subject: [PATCH] src/services: use a shell exec in systemd service files
|
|
|
|
exec sub-command avoids keeping the parent shell around. Refer sh(1)
|
|
Fedora sh is bash.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2453
|
|
---
|
|
bus/services/org.freedesktop.IBus.session.GNOME.service.in | 2 +-
|
|
bus/services/org.freedesktop.IBus.session.generic.service.in | 3 +--
|
|
2 files changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/bus/services/org.freedesktop.IBus.session.GNOME.service.in b/bus/services/org.freedesktop.IBus.session.GNOME.service.in
|
|
index 7f718e3c..858cf10d 100644
|
|
--- a/bus/services/org.freedesktop.IBus.session.GNOME.service.in
|
|
+++ b/bus/services/org.freedesktop.IBus.session.GNOME.service.in
|
|
@@ -18,7 +18,7 @@ Conflicts=gnome-session@gnome-login.target
|
|
[Service]
|
|
Type=dbus
|
|
# Only pull --xim in X11 session, it is done via Xwayland-session.d on Wayland
|
|
-ExecStart=sh -c '@bindir@/ibus-daemon --panel disable $([ "$XDG_SESSION_TYPE" = "x11" ] && echo "--xim")'
|
|
+ExecStart=sh -c 'exec @bindir@/ibus-daemon --panel disable $([ "$XDG_SESSION_TYPE" = "x11" ] && echo "--xim")'
|
|
Restart=on-abnormal
|
|
BusName=org.freedesktop.IBus
|
|
TimeoutStopSec=5
|
|
diff --git a/bus/services/org.freedesktop.IBus.session.generic.service.in b/bus/services/org.freedesktop.IBus.session.generic.service.in
|
|
index 9d493159..e7b7ce4f 100644
|
|
--- a/bus/services/org.freedesktop.IBus.session.generic.service.in
|
|
+++ b/bus/services/org.freedesktop.IBus.session.generic.service.in
|
|
@@ -7,8 +7,7 @@ Conflicts=gnome-session-initialized.target
|
|
|
|
[Service]
|
|
Type=dbus
|
|
-# Only pull --xim in X11 session, it is done via Xwayland-session.d on Wayland
|
|
-ExecStart=sh -c '@bindir@/ibus-daemon $IBUS_DAEMON_ARGS'
|
|
+ExecStart=sh -c 'exec @bindir@/ibus-daemon $IBUS_DAEMON_ARGS'
|
|
Restart=on-abnormal
|
|
BusName=org.freedesktop.IBus
|
|
TimeoutStopSec=5
|
|
--
|
|
2.39.2
|
|
|
|
From 7da18d08ce85405e41ba7bf363661292bc97ca39 Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Wed, 22 Feb 2023 23:53:35 +0900
|
|
Subject: [PATCH] src: Call IBUS_TYPE_EMOJI_DATA in ibus_init()
|
|
|
|
Seems the evaluation of IBUS_EMOJI_DATA() depends on the compiler
|
|
optimization.
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2476
|
|
---
|
|
src/ibusshare.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/ibusshare.c b/src/ibusshare.c
|
|
index 340168c8..bb59f3cb 100644
|
|
--- a/src/ibusshare.c
|
|
+++ b/src/ibusshare.c
|
|
@@ -308,12 +308,15 @@ ibus_init (void)
|
|
IBUS_TYPE_TEXT;
|
|
IBUS_TYPE_ATTRIBUTE;
|
|
IBUS_TYPE_ATTR_LIST;
|
|
- IBUS_TYPE_LOOKUP_TABLE;
|
|
IBUS_TYPE_COMPONENT;
|
|
+ IBUS_TYPE_EMOJI_DATA;
|
|
IBUS_TYPE_ENGINE_DESC;
|
|
+ IBUS_TYPE_LOOKUP_TABLE;
|
|
IBUS_TYPE_OBSERVED_PATH;
|
|
IBUS_TYPE_REGISTRY;
|
|
IBUS_TYPE_X_EVENT;
|
|
+ IBUS_TYPE_UNICODE_BLOCK;
|
|
+ IBUS_TYPE_UNICODE_DATA;
|
|
_ibus_register_resource ();
|
|
}
|
|
|
|
--
|
|
2.38.1
|
|
|
|
From ce5e2bb43ea4c2f5780f4a3bfd7509f812b60afa Mon Sep 17 00:00:00 2001
|
|
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
|
|
Date: Tue, 28 Feb 2023 18:05:29 +0900
|
|
Subject: [PATCH] src: Define X11_LOCALEDATADIR for BSD Compose data
|
|
|
|
FreeBSD and NetBSD have X11 locale Compose data directories in
|
|
${X11_PREFIX}/lib/X11/locale instead of ${X11_PREFIX}/share/X11/locale:
|
|
https://github.com/freedesktop/xorg-lib-libX11/blob/20a3f99/configure.ac#L336-L340
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2478
|
|
---
|
|
configure.ac | 8 ++++++++
|
|
src/Makefile.am | 2 +-
|
|
src/gencomposetable.c | 6 ++----
|
|
src/ibuscomposetable.c | 5 ++---
|
|
src/ibusenginesimple.c | 5 ++---
|
|
src/tests/Makefile.am | 2 +-
|
|
src/tests/ibus-compose.c | 3 +--
|
|
7 files changed, 17 insertions(+), 14 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index f446ae92..ece1d9ee 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -349,6 +349,14 @@ else
|
|
fi
|
|
AC_SUBST(X11_PREFIX)
|
|
|
|
+# Check locale dir for Compose files.
|
|
+AC_CHECK_FILE($X11_PREFIX/share/X11/locale/locale.dir,
|
|
+ X11_LOCALEDATADIR="$X11_PREFIX/share/X11/locale",
|
|
+ [AC_CHECK_FILE($X11_PREFIX/lib/X11/locale/locale.dir,
|
|
+ X11_LOCALEDATADIR="$X11_PREFIX/lib/X11/locale",
|
|
+ X11_LOCALEDATADIR="$(datadir)/X11/locale")])
|
|
+AC_SUBST(X11_LOCALEDATADIR)
|
|
+
|
|
if test x"$enable_wayland" = x"yes"; then
|
|
# Check for wayland
|
|
PKG_CHECK_MODULES(WAYLAND, [
|
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
index 426376dd..c2e8daa6 100644
|
|
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -54,7 +54,7 @@ AM_CPPFLAGS = \
|
|
-DIBUS_DISABLE_DEPRECATION_WARNINGS \
|
|
-DIBUS_COMPILATION \
|
|
-DISOCODES_PREFIX=\"$(ISOCODES_PREFIX)\" \
|
|
- -DX11_DATA_PREFIX=\"$(X11_PREFIX)\" \
|
|
+ -DX11_LOCALEDATADIR=\"$(X11_LOCALEDATADIR)\" \
|
|
$(NULL)
|
|
|
|
# ibus library
|
|
diff --git a/src/gencomposetable.c b/src/gencomposetable.c
|
|
index 3fe6ff86..6e52d6a6 100644
|
|
--- a/src/gencomposetable.c
|
|
+++ b/src/gencomposetable.c
|
|
@@ -28,8 +28,6 @@
|
|
#include "ibuscomposetable.h"
|
|
#include "ibusenginesimpleprivate.h"
|
|
|
|
-#define X11_DATADIR X11_DATA_PREFIX "/share/X11/locale"
|
|
-
|
|
|
|
static void
|
|
save_compose_table_endianness (IBusComposeTableEx *compose_table,
|
|
@@ -84,7 +82,7 @@ main (int argc, char *argv[])
|
|
if (!path || !g_file_test (path, G_FILE_TEST_EXISTS)) {
|
|
g_clear_pointer (&path, g_free);
|
|
for (sys_lang = sys_langs; *sys_lang; sys_lang++) {
|
|
- path = g_build_filename (X11_DATADIR, *sys_lang,
|
|
+ path = g_build_filename (X11_LOCALEDATADIR, *sys_lang,
|
|
"Compose", NULL);
|
|
if (!path)
|
|
continue;
|
|
@@ -93,7 +91,7 @@ main (int argc, char *argv[])
|
|
}
|
|
}
|
|
if (!path) {
|
|
- g_warning ("en_US compose file is not found in %s.", X11_DATADIR);
|
|
+ g_warning ("en_US compose file is not found in %s.", X11_LOCALEDATADIR);
|
|
return 1;
|
|
} else {
|
|
g_debug ("Create a cache of %s", path);
|
|
diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c
|
|
index 3e7b0f41..fc486692 100644
|
|
--- a/src/ibuscomposetable.c
|
|
+++ b/src/ibuscomposetable.c
|
|
@@ -39,7 +39,6 @@
|
|
|
|
#define IBUS_COMPOSE_TABLE_MAGIC "IBusComposeTable"
|
|
#define IBUS_COMPOSE_TABLE_VERSION (4)
|
|
-#define X11_DATADIR X11_DATA_PREFIX "/share/X11/locale"
|
|
#define IBUS_MAX_COMPOSE_ALGORITHM_LEN 9
|
|
|
|
typedef struct {
|
|
@@ -285,7 +284,7 @@ expand_include_path (const char *include_path) {
|
|
case 'S': /* system compose dir */
|
|
o = out;
|
|
former = g_strndup (head, i - head);
|
|
- out = g_strdup_printf ("%s%s%s", o, former, X11_DATADIR);
|
|
+ out = g_strdup_printf ("%s%s%s", o, former, X11_LOCALEDATADIR);
|
|
head = i + 2;
|
|
g_free (o);
|
|
g_free (former);
|
|
@@ -397,7 +396,7 @@ get_en_compose_file (void)
|
|
char * const *sys_lang = NULL;
|
|
char *path = NULL;
|
|
for (sys_lang = sys_langs; *sys_lang; sys_lang++) {
|
|
- path = g_build_filename (X11_DATADIR, *sys_lang, "Compose", NULL);
|
|
+ path = g_build_filename (X11_LOCALEDATADIR, *sys_lang, "Compose", NULL);
|
|
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
|
break;
|
|
g_clear_pointer (&path, g_free);
|
|
diff --git a/src/ibusenginesimple.c b/src/ibusenginesimple.c
|
|
index 409d5a56..585d7870 100644
|
|
--- a/src/ibusenginesimple.c
|
|
+++ b/src/ibusenginesimple.c
|
|
@@ -37,7 +37,6 @@
|
|
#include <memory.h>
|
|
#include <stdlib.h>
|
|
|
|
-#define X11_DATADIR X11_DATA_PREFIX "/share/X11/locale"
|
|
#define IBUS_ENGINE_SIMPLE_GET_PRIVATE(o) \
|
|
((IBusEngineSimplePrivate *)ibus_engine_simple_get_instance_private (o))
|
|
|
|
@@ -1440,7 +1439,7 @@ ibus_engine_simple_add_table_by_locale (IBusEngineSimple *simple,
|
|
for (sys_lang = sys_langs; *sys_lang; sys_lang++) {
|
|
if (g_ascii_strncasecmp (*lang, *sys_lang,
|
|
strlen (*sys_lang)) == 0) {
|
|
- path = g_build_filename (X11_DATADIR,
|
|
+ path = g_build_filename (X11_LOCALEDATADIR,
|
|
*lang, "Compose", NULL);
|
|
break;
|
|
}
|
|
@@ -1462,7 +1461,7 @@ ibus_engine_simple_add_table_by_locale (IBusEngineSimple *simple,
|
|
ibus_engine_simple_add_compose_file (simple, path);
|
|
g_clear_pointer(&path, g_free);
|
|
} else {
|
|
- path = g_build_filename (X11_DATADIR, locale, "Compose", NULL);
|
|
+ path = g_build_filename (X11_LOCALEDATADIR, locale, "Compose", NULL);
|
|
do {
|
|
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
|
break;
|
|
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
|
|
index ca5285bd..8d1d16e3 100644
|
|
--- a/src/tests/Makefile.am
|
|
+++ b/src/tests/Makefile.am
|
|
@@ -30,7 +30,7 @@ AM_CPPFLAGS = \
|
|
@GLIB2_CFLAGS@ \
|
|
@GIO2_CFLAGS@ \
|
|
-DIBUS_DISABLE_DEPRECATION_WARNINGS \
|
|
- -DX11_DATA_PREFIX=\"$(X11_PREFIX)\" \
|
|
+ -DX11_LOCALEDATADIR=\"$(X11_LOCALEDATADIR)\" \
|
|
-I$(top_srcdir)/src \
|
|
-I$(top_builddir)/src \
|
|
$(NULL)
|
|
diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c
|
|
index 0be01d27..da1a1298 100644
|
|
--- a/src/tests/ibus-compose.c
|
|
+++ b/src/tests/ibus-compose.c
|
|
@@ -6,7 +6,6 @@
|
|
#define GREEN "\033[0;32m"
|
|
#define RED "\033[0;31m"
|
|
#define NC "\033[0m"
|
|
-#define X11_DATADIR X11_DATA_PREFIX "/share/X11/locale"
|
|
|
|
IBusBus *m_bus;
|
|
gchar *m_compose_file;
|
|
@@ -36,7 +35,7 @@ get_compose_path ()
|
|
break;
|
|
if (g_strcmp0 (*l, "C") == 0)
|
|
break;
|
|
- compose_path = g_build_filename (X11_DATADIR,
|
|
+ compose_path = g_build_filename (X11_LOCALEDATADIR,
|
|
*l,
|
|
"Compose",
|
|
NULL);
|
|
--
|
|
2.39.2
|
|
|
|
From 9d9dca9e103e88b33e786c4a46f44123a6cf11c6 Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Wed, 8 Mar 2023 19:44:16 +0900
|
|
Subject: [PATCH] client/x11: Fix Key typing order
|
|
|
|
ibus-x11 now also uses the hybrid process key events with
|
|
IBUS_ENABLE_SYNC_MODE=2 and it waits for the async API
|
|
with GSource and g_main_context_iteration() in xim_forward_event().
|
|
|
|
But g_main_context_iteration() calls gdk_event_source_dispatch()
|
|
and it can call another xim_forward_event() and the callbacks
|
|
of ibus_input_context_process_key_event_async() can be nested.
|
|
So if the forwarding API is called out of the callbacks of
|
|
ibus_input_context_process_key_event_async(), the key events
|
|
order is swapped due to the delayed return of
|
|
g_main_context_iteration().
|
|
|
|
To resolve this issue, the forwarding API should be called in
|
|
the callbacks of ibus_input_context_process_key_event_async().
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2480
|
|
---
|
|
client/x11/main.c | 160 ++++++++++++++++++++++++----------------------
|
|
1 file changed, 83 insertions(+), 77 deletions(-)
|
|
|
|
diff --git a/client/x11/main.c b/client/x11/main.c
|
|
index 905fd251..83d95cb7 100644
|
|
--- a/client/x11/main.c
|
|
+++ b/client/x11/main.c
|
|
@@ -2,7 +2,7 @@
|
|
/* vim:set et sts=4: */
|
|
/* ibus
|
|
* Copyright (C) 2007-2015 Peng Huang <shawn.p.huang@gmail.com>
|
|
- * Copyright (C) 2015-2022 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
+ * Copyright (C) 2015-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
* Copyright (C) 2007-2015 Red Hat, Inc.
|
|
*
|
|
* main.c:
|
|
@@ -49,6 +49,8 @@
|
|
#include <getopt.h>
|
|
|
|
#define ESC_SEQUENCE_ISO10646_1 "\033%G"
|
|
+/* Wait for about 120 secs to return a key from async process-key-event. */
|
|
+#define MAX_WAIT_KEY_TIME 120000
|
|
|
|
#define LOG(level, fmt_args...) \
|
|
if (g_debug_level >= (level)) { \
|
|
@@ -461,11 +463,39 @@ xim_unset_ic_focus (XIMS xims, IMChangeFocusStruct *call_data)
|
|
|
|
}
|
|
|
|
+static void
|
|
+_xim_forward_key_event_done (X11IC *x11ic,
|
|
+ XEvent *event,
|
|
+ gboolean processed)
|
|
+{
|
|
+ IMForwardEventStruct fe;
|
|
+ if (processed) {
|
|
+ if (!x11ic->has_preedit_area) {
|
|
+ _xim_set_cursor_location (x11ic);
|
|
+ }
|
|
+ return;
|
|
+ }
|
|
+ g_assert (x11ic);
|
|
+ g_assert (event);
|
|
+
|
|
+ memset (&fe, 0, sizeof (fe));
|
|
+ fe.major_code = XIM_FORWARD_EVENT;
|
|
+ fe.icid = x11ic->icid;
|
|
+ fe.connect_id = x11ic->connect_id;
|
|
+ fe.sync_bit = 0;
|
|
+ fe.serial_number = 0L;
|
|
+ fe.event = *event;
|
|
+ IMForwardEvent (_xims, (XPointer) &fe);
|
|
+}
|
|
+
|
|
+
|
|
typedef struct {
|
|
- IMForwardEventStruct *pfe;
|
|
int count;
|
|
guint count_cb_id;
|
|
gboolean retval;
|
|
+ X11IC *x11ic;
|
|
+ CARD16 connect_id;
|
|
+ XEvent event;
|
|
} ProcessKeyEventReplyData;
|
|
|
|
static void
|
|
@@ -474,7 +504,7 @@ _process_key_event_done (GObject *object,
|
|
gpointer user_data)
|
|
{
|
|
IBusInputContext *context = (IBusInputContext *)object;
|
|
- IMForwardEventStruct *pfe = (IMForwardEventStruct*) user_data;
|
|
+ ProcessKeyEventReplyData *data = (ProcessKeyEventReplyData *)user_data;
|
|
|
|
GError *error = NULL;
|
|
gboolean retval = ibus_input_context_process_key_event_async_finish (
|
|
@@ -488,16 +518,15 @@ _process_key_event_done (GObject *object,
|
|
}
|
|
|
|
if (g_hash_table_lookup (_connections,
|
|
- GINT_TO_POINTER ((gint) pfe->connect_id))
|
|
+ GINT_TO_POINTER ((gint)data->connect_id))
|
|
== NULL) {
|
|
- g_slice_free (IMForwardEventStruct, pfe);
|
|
+ g_slice_free (ProcessKeyEventReplyData, data);
|
|
return;
|
|
}
|
|
|
|
- if (retval == FALSE) {
|
|
- IMForwardEvent (_xims, (XPointer) pfe);
|
|
- }
|
|
- g_slice_free (IMForwardEventStruct, pfe);
|
|
+ if (retval == FALSE)
|
|
+ _xim_forward_key_event_done (data->x11ic, &data->event, retval);
|
|
+ g_slice_free (ProcessKeyEventReplyData, data);
|
|
}
|
|
|
|
static void
|
|
@@ -518,6 +547,21 @@ _process_key_event_reply_done (GObject *object,
|
|
}
|
|
g_return_if_fail (data);
|
|
data->retval = retval;
|
|
+ if (g_hash_table_lookup (_connections,
|
|
+ GINT_TO_POINTER ((gint)data->connect_id))
|
|
+ == NULL) {
|
|
+ return;
|
|
+ }
|
|
+ /* _xim_forward_key_event_done() should be called in
|
|
+ * _process_key_event_reply_done() because g_main_context_iteration()
|
|
+ * can call another xim_forward_event() and xim_forward_event() can be
|
|
+ * nested and the first _process_key_event_reply_done() is returned
|
|
+ * at last with g_main_context_iteration() so
|
|
+ * if _xim_forward_key_event_done() is called out of
|
|
+ * _process_key_event_reply_done(), the key events order
|
|
+ * can be swapped.
|
|
+ */
|
|
+ _xim_forward_key_event_done (data->x11ic, &data->event, retval);
|
|
data->count = 0;
|
|
g_source_remove (data->count_cb_id);
|
|
}
|
|
@@ -529,9 +573,8 @@ _process_key_event_count_cb (gpointer user_data)
|
|
g_return_val_if_fail (data, G_SOURCE_REMOVE);
|
|
if (!data->count)
|
|
return G_SOURCE_REMOVE;
|
|
- /* Wait for about 10 secs. */
|
|
- if (data->count++ == 10000) {
|
|
- data->count = 0;
|
|
+ if (data->count++ == MAX_WAIT_KEY_TIME) {
|
|
+ g_warning ("Key event is not returned for %usecs.", MAX_WAIT_KEY_TIME);
|
|
return G_SOURCE_REMOVE;
|
|
}
|
|
return G_SOURCE_CONTINUE;
|
|
@@ -571,32 +614,13 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
|
|
event.keyval,
|
|
event.hardware_keycode - 8,
|
|
event.state);
|
|
- if (retval) {
|
|
- if (!x11ic->has_preedit_area) {
|
|
- _xim_set_cursor_location (x11ic);
|
|
- }
|
|
- return 1;
|
|
- }
|
|
-
|
|
- IMForwardEventStruct fe;
|
|
- memset (&fe, 0, sizeof (fe));
|
|
-
|
|
- fe.major_code = XIM_FORWARD_EVENT;
|
|
- fe.icid = x11ic->icid;
|
|
- fe.connect_id = x11ic->connect_id;
|
|
- fe.sync_bit = 0;
|
|
- fe.serial_number = 0L;
|
|
- fe.event = call_data->event;
|
|
-
|
|
- IMForwardEvent (_xims, (XPointer) &fe);
|
|
-
|
|
+ _xim_forward_key_event_done (x11ic, &call_data->event, retval);
|
|
retval = 1;
|
|
break;
|
|
}
|
|
case 2: {
|
|
GSource *source = g_timeout_source_new (1);
|
|
ProcessKeyEventReplyData *data = NULL;
|
|
- IMForwardEventStruct fe;
|
|
|
|
if (source)
|
|
data = g_slice_new0 (ProcessKeyEventReplyData);
|
|
@@ -610,11 +634,13 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
|
|
if (source)
|
|
g_source_destroy (source);
|
|
} else {
|
|
- CARD16 connect_id = x11ic->connect_id;
|
|
data->count = 1;
|
|
g_source_attach (source, NULL);
|
|
g_source_unref (source);
|
|
data->count_cb_id = g_source_get_id (source);
|
|
+ data->connect_id = call_data->connect_id;
|
|
+ data->x11ic = x11ic;
|
|
+ data->event = *((XEvent*)xevent);
|
|
ibus_input_context_process_key_event_async (
|
|
x11ic->context,
|
|
event.keyval,
|
|
@@ -626,7 +652,7 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
|
|
data);
|
|
g_source_set_callback (source, _process_key_event_count_cb,
|
|
data, NULL);
|
|
- while (data->count)
|
|
+ while (data->count > 0 && data->count < MAX_WAIT_KEY_TIME)
|
|
g_main_context_iteration (NULL, TRUE);
|
|
if (source->ref_count > 0) {
|
|
/* g_source_get_id() could causes a SEGV */
|
|
@@ -634,46 +660,33 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
|
|
"issue in %p.", source);
|
|
}
|
|
retval = data->retval;
|
|
- g_slice_free (ProcessKeyEventReplyData, data);
|
|
-
|
|
- if (g_hash_table_lookup (_connections,
|
|
- GINT_TO_POINTER ((gint)connect_id))
|
|
- == NULL) {
|
|
+ if (data->count == 0) {
|
|
+ g_slice_free (ProcessKeyEventReplyData, data);
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
- if (retval) {
|
|
- if (! x11ic->has_preedit_area) {
|
|
- _xim_set_cursor_location (x11ic);
|
|
- }
|
|
- return 1;
|
|
+ g_slice_free (ProcessKeyEventReplyData, data);
|
|
+ if (g_hash_table_lookup (_connections,
|
|
+ GINT_TO_POINTER ((gint)call_data->connect_id))
|
|
+ == NULL) {
|
|
+ return 1;
|
|
}
|
|
-
|
|
- memset (&fe, 0, sizeof (fe));
|
|
-
|
|
- fe.major_code = XIM_FORWARD_EVENT;
|
|
- fe.icid = x11ic->icid;
|
|
- fe.connect_id = x11ic->connect_id;
|
|
- fe.sync_bit = 0;
|
|
- fe.serial_number = 0L;
|
|
- fe.event = call_data->event;
|
|
-
|
|
- IMForwardEvent (_xims, (XPointer) &fe);
|
|
-
|
|
+ _xim_forward_key_event_done (x11ic, &call_data->event, retval);
|
|
retval = 1;
|
|
break;
|
|
}
|
|
default: {
|
|
- IMForwardEventStruct *pfe;
|
|
+ ProcessKeyEventReplyData *data;
|
|
|
|
- pfe = g_slice_new0 (IMForwardEventStruct);
|
|
- pfe->major_code = XIM_FORWARD_EVENT;
|
|
- pfe->icid = x11ic->icid;
|
|
- pfe->connect_id = x11ic->connect_id;
|
|
- pfe->sync_bit = 0;
|
|
- pfe->serial_number = 0L;
|
|
- pfe->event = call_data->event;
|
|
+ if (!(data = g_slice_new0 (ProcessKeyEventReplyData))) {
|
|
+ g_warning ("Cannot allocate async data");
|
|
+ _xim_forward_key_event_done (x11ic, &call_data->event, 0);
|
|
+ return 1;
|
|
+ }
|
|
+ data->connect_id = call_data->connect_id;
|
|
+ data->x11ic = x11ic;
|
|
+ data->event = call_data->event;
|
|
|
|
ibus_input_context_process_key_event_async (
|
|
x11ic->context,
|
|
@@ -683,7 +696,7 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
|
|
-1,
|
|
NULL,
|
|
_process_key_event_done,
|
|
- pfe);
|
|
+ data);
|
|
retval = 1;
|
|
}
|
|
}
|
|
@@ -962,11 +975,10 @@ _xim_forward_key_event (X11IC *x11ic,
|
|
guint keycode,
|
|
guint state)
|
|
{
|
|
- g_return_if_fail (x11ic != NULL);
|
|
-
|
|
- IMForwardEventStruct fe = {0};
|
|
XEvent xkp = {0};
|
|
|
|
+ g_return_if_fail (x11ic != NULL);
|
|
+
|
|
xkp.xkey.type = (state & IBUS_RELEASE_MASK) ? KeyRelease : KeyPress;
|
|
xkp.xkey.serial = 0L;
|
|
xkp.xkey.send_event = False;
|
|
@@ -975,20 +987,14 @@ _xim_forward_key_event (X11IC *x11ic,
|
|
xkp.xkey.window =
|
|
x11ic->focus_window ? x11ic->focus_window : x11ic->client_window;
|
|
xkp.xkey.subwindow = None;
|
|
- xkp.xkey.root = DefaultRootWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
|
+ xkp.xkey.root = DefaultRootWindow (
|
|
+ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
|
|
|
xkp.xkey.time = 0;
|
|
xkp.xkey.state = state;
|
|
xkp.xkey.keycode = (keycode == 0) ? 0 : keycode + 8;
|
|
|
|
- fe.major_code = XIM_FORWARD_EVENT;
|
|
- fe.icid = x11ic->icid;
|
|
- fe.connect_id = x11ic->connect_id;
|
|
- fe.sync_bit = 0;
|
|
- fe.serial_number = 0L;
|
|
- fe.event = xkp;
|
|
-
|
|
- IMForwardEvent (_xims, (XPointer) & fe);
|
|
+ _xim_forward_key_event_done (x11ic, &xkp, FALSE);
|
|
}
|
|
|
|
static void
|
|
--
|
|
2.38.1
|
|
|
|
From 5b5d0795f297e330fdc84b6be6beab1305b0cda9 Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Wed, 15 Mar 2023 10:22:05 +0900
|
|
Subject: [PATCH] util/IMdkit: Disable while loop before call
|
|
ForwardEventMessageProc()
|
|
|
|
Seems ProcessQueue() had a wrong XFree() with async process-key-event.
|
|
Fixes: c0fec89ae76f9522319f58107ab234992b249ec6
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2484
|
|
---
|
|
util/IMdkit/i18nPtHdr.c | 9 +++------
|
|
1 file changed, 3 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/util/IMdkit/i18nPtHdr.c b/util/IMdkit/i18nPtHdr.c
|
|
index 8dc52714..ec20e322 100644
|
|
--- a/util/IMdkit/i18nPtHdr.c
|
|
+++ b/util/IMdkit/i18nPtHdr.c
|
|
@@ -1747,11 +1747,13 @@ static void ProcessQueue (XIMS ims, CARD16 connect_id)
|
|
XimProtoHdr *hdr = (XimProtoHdr *) client->pending->p;
|
|
unsigned char *p1 = (unsigned char *) (hdr + 1);
|
|
IMProtocol call_data;
|
|
+ XIMPending *old = client->pending;
|
|
|
|
call_data.major_code = hdr->major_opcode;
|
|
call_data.any.minor_code = hdr->minor_opcode;
|
|
call_data.any.connect_id = connect_id;
|
|
|
|
+ client->pending = old->next;
|
|
switch (hdr->major_opcode)
|
|
{
|
|
case XIM_FORWARD_EVENT:
|
|
@@ -1760,12 +1762,7 @@ static void ProcessQueue (XIMS ims, CARD16 connect_id)
|
|
}
|
|
/*endswitch*/
|
|
XFree (hdr);
|
|
- {
|
|
- XIMPending *old = client->pending;
|
|
-
|
|
- client->pending = old->next;
|
|
- XFree (old);
|
|
- }
|
|
+ XFree (old);
|
|
}
|
|
/*endwhile*/
|
|
return;
|
|
--
|
|
2.39.2
|
|
|
|
From f82140b1368c5ec4c0b70e5caea2931ceed5589c Mon Sep 17 00:00:00 2001
|
|
From: Sibo Dong <46512211+dongsibo@users.noreply.github.com>
|
|
Date: Tue, 21 Feb 2023 16:38:03 -0500
|
|
Subject: [PATCH] ui/gtk3: Update Emoji shortcut key in ibus-emoji(7)
|
|
|
|
The default Emoji shortcut key was changed but not updated in the
|
|
ibus-emoji.7 man page.
|
|
|
|
Fixes: https://github.com/ibus/ibus/commit/1520c39
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2475
|
|
---
|
|
ui/gtk3/ibus-emoji.7.in | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/ui/gtk3/ibus-emoji.7.in b/ui/gtk3/ibus-emoji.7.in
|
|
index b4d941ec..31074300 100644
|
|
--- a/ui/gtk3/ibus-emoji.7.in
|
|
+++ b/ui/gtk3/ibus-emoji.7.in
|
|
@@ -51,7 +51,7 @@ E.g. "Noto Color Emoji", "Android Emoji" font.
|
|
|
|
.SH "KEYBOARD OPERATIONS"
|
|
.TP
|
|
-\fBControl-Period or Control-Semicolon\fR
|
|
+\fBSuper-Period\fR
|
|
Launch IBus Emojier. The shortcut key can be customized by
|
|
.B ibus\-setup (1).
|
|
.TP
|
|
--
|
|
2.40.0
|
|
|
|
From 9553dbf12ec42a58beb671a7039827fbd652e14d Mon Sep 17 00:00:00 2001
|
|
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
|
|
Date: Mon, 27 Mar 2023 19:45:37 +0900
|
|
Subject: [PATCH] Portability fixes for preparation of NetBSD CI
|
|
|
|
- Makefile: Ignore errors on $(RM) -r "`uname -i`"
|
|
|
|
- autogen: Replace make with $MAKE
|
|
|
|
- data/dconf: BSD does not support the --tmpdir long option
|
|
in mktemp. Also add the cleanup function.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2482
|
|
---
|
|
Makefile.am | 2 +-
|
|
autogen.sh | 7 ++++---
|
|
data/dconf/make-dconf-override-db.sh | 11 ++++++++---
|
|
3 files changed, 13 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index 17e56b38..16548d25 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -139,7 +139,7 @@ srpm: dist @PACKAGE_NAME@.spec
|
|
@PACKAGE_NAME@.spec
|
|
|
|
clean-rpm:
|
|
- $(RM) -r "`uname -i`"
|
|
+ -$(RM) -r "`uname -i`"
|
|
|
|
clean-local: clean-rpm
|
|
|
|
diff --git a/autogen.sh b/autogen.sh
|
|
index 9b1d8342..4ea8d757 100755
|
|
--- a/autogen.sh
|
|
+++ b/autogen.sh
|
|
@@ -4,6 +4,7 @@
|
|
: ${srcdir=$(dirname $0)}
|
|
: ${srcdir:=.}
|
|
: ${SAVE_DIST_FILES:=0}
|
|
+: ${MAKE:=make}
|
|
|
|
olddir=$(pwd)
|
|
# shellcheck disable=SC2016
|
|
@@ -73,7 +74,7 @@ cd "$olddir"
|
|
(test "$1" = "--help" ) && {
|
|
exit 0
|
|
} || {
|
|
- echo "Now type 'make' to compile $PKG_NAME" || exit 1
|
|
+ echo "Now type '$MAKE' to compile $PKG_NAME" || exit 1
|
|
}
|
|
} || {
|
|
echo "Skipping configure process."
|
|
@@ -83,8 +84,8 @@ cd "$srcdir"
|
|
(test "x$SAVE_DIST_FILES" = "x0" ) && {
|
|
# rm engine/simple.xml.in src/ibusemojigen.h src/ibusunicodegen.h
|
|
for d in engine src src/compose; do
|
|
- echo "make -C $d maintainer-clean-generic"
|
|
- make -C $d maintainer-clean-generic
|
|
+ echo "$MAKE -C $d maintainer-clean-generic"
|
|
+ $MAKE -C $d maintainer-clean-generic
|
|
done
|
|
} || :
|
|
cd "$olddir"
|
|
diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh
|
|
index 601c1c3f..32cb1530 100755
|
|
--- a/data/dconf/make-dconf-override-db.sh
|
|
+++ b/data/dconf/make-dconf-override-db.sh
|
|
@@ -1,4 +1,4 @@
|
|
-#!/bin/bash
|
|
+#!/bin/sh
|
|
|
|
set -e
|
|
|
|
@@ -6,7 +6,7 @@ set -e
|
|
# breaks dbus-launch. There's dbus-run-session which is
|
|
# better, but not everyone has it yet.
|
|
export DBUS_FATAL_WARNINGS=0
|
|
-export TMPDIR=$(mktemp -d --tmpdir="$PWD")
|
|
+export TMPDIR=$(mktemp -d -p "$PWD")
|
|
export XDG_CONFIG_HOME="$TMPDIR/config"
|
|
export XDG_CACHE_HOME="$TMPDIR/cache"
|
|
export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas"
|
|
@@ -14,7 +14,12 @@ mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR
|
|
|
|
eval `dbus-launch --sh-syntax`
|
|
|
|
-trap 'rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID' ERR
|
|
+trap cleanup EXIT
|
|
+
|
|
+cleanup() {
|
|
+ test $? -eq 0 && exit
|
|
+ rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID
|
|
+}
|
|
|
|
# in case that schema is not installed on the system
|
|
glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD"
|
|
--
|
|
2.39.2
|
|
|
|
From 630f3f73f62a121abb1af5b215d193aec4e0053c Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Wed, 5 Apr 2023 14:28:49 +0900
|
|
Subject: [PATCH] configure: Use AC_C_BIGENDIAN for BSD systems
|
|
|
|
NetBSD does not define __BYTE_ORDER and use AC_C_BIGENDIAN instead.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2477
|
|
---
|
|
configure.ac | 31 ++++---------------------------
|
|
1 file changed, 4 insertions(+), 27 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index ece1d9ee..b3eacbcb 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -152,35 +152,12 @@ AC_CHECK_LIB(c, dlclose, LIBDL="", [AC_CHECK_LIB(dl, dlclose, LIBDL="-ldl")])
|
|
AC_SUBST(LIBDL)
|
|
|
|
# Check endianness.
|
|
-AC_MSG_CHECKING([build system endianness])
|
|
-ENDIAN=unknown
|
|
-AC_RUN_IFELSE(
|
|
- [AC_LANG_PROGRAM(
|
|
- [[
|
|
- #include <endian.h>
|
|
- #if __BYTE_ORDER != __LITTLE_ENDIAN
|
|
- #error
|
|
- #endif
|
|
- ]]
|
|
- )],
|
|
- [ENDIAN=little]
|
|
-)
|
|
-AC_RUN_IFELSE(
|
|
- [AC_LANG_PROGRAM(
|
|
- [[
|
|
- #include <endian.h>
|
|
- #if __BYTE_ORDER != __BIG_ENDIAN
|
|
- #error
|
|
- #endif
|
|
- ]]
|
|
- )],
|
|
- [ENDIAN=big]
|
|
-)
|
|
+AC_C_BIGENDIAN([ENDIAN=big], [ENDIAN=little], [ENDIAN=unknown], [ENDIAN=big])
|
|
if test x"$ENDIAN" != xlittle -a x"$ENDIAN" != xbig; then
|
|
- AC_MSG_ERROR([Cannot deermine endianness without endian.h])
|
|
+ AC_MSG_ERROR([Cannot determine endianness. Use ac_cv_c_bigendian to yes or no])
|
|
fi
|
|
-AC_MSG_RESULT($ENDIAN)
|
|
AC_SUBST(ENDIAN)
|
|
+ENDIAN_MSG="$ENDIAN (ac_cv_c_bigendian=$ac_cv_c_bigendian)"
|
|
|
|
# Check packages.
|
|
# Check glib2.
|
|
@@ -902,7 +879,7 @@ Build options:
|
|
Install prefix $prefix
|
|
Build shared libs $enable_shared
|
|
Build static libs $enable_static
|
|
- Build endianness $ENDIAN
|
|
+ Build endianness $ENDIAN_MSG
|
|
CFLAGS $CFLAGS
|
|
PYTHON $PYTHON
|
|
PYTHON2 $PYTHON2
|
|
--
|
|
2.39.2
|
|
|
|
From 67a0f36de029fe3adc21c90c7fb8669d0d68cbe2 Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Thu, 13 Apr 2023 12:22:50 +0900
|
|
Subject: [PATCH] src: Generate ibusenumtypes.h for gen-internal-compose-table
|
|
|
|
`make clean` deletes ibusenumtypes.h and ibus.h incudes ibusenumtypes.h
|
|
and it's required by the gen-internal-compose-table build.
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2501
|
|
---
|
|
src/Makefile.am | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
index c2e8daa6..adc7f04a 100644
|
|
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -194,6 +194,7 @@ gen_internal_compose_table_SOURCES = \
|
|
ibuserror.c \
|
|
ibuskeynames.c \
|
|
ibuskeyuni.c \
|
|
+ ibusenumtypes.h \
|
|
$(NULL)
|
|
gen_internal_compose_table_CFLAGS = $(AM_CFLAGS)
|
|
gen_internal_compose_table_LDADD = \
|
|
--
|
|
2.39.2
|
|
|
|
From 310c442b62b569255ffc39bca557920d06881ade Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Tue, 2 May 2023 10:00:03 +0900
|
|
Subject: [PATCH] ui/gtk3: Add workaround Emojier can be launched
|
|
|
|
gnome-shell 44 prevents ibus from launching Emojier GUI.
|
|
This workaround can launch the Emojier but still cannot output
|
|
the selected emoji character to the focused application.
|
|
|
|
So another workaround is needed with this patch.
|
|
I.e. Type Ctrl-Shift-c keys to copy the seleted emoji instead of
|
|
Enter key.
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2509
|
|
BUG=https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6518
|
|
---
|
|
ui/gtk3/emojier.vala | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/ui/gtk3/emojier.vala b/ui/gtk3/emojier.vala
|
|
index 69fb8abe..c9cf4469 100644
|
|
--- a/ui/gtk3/emojier.vala
|
|
+++ b/ui/gtk3/emojier.vala
|
|
@@ -2,7 +2,7 @@
|
|
*
|
|
* ibus - The Input Bus
|
|
*
|
|
- * Copyright (c) 2017-2021 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
+ * Copyright (c) 2017-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
@@ -1799,12 +1799,12 @@ public class IBusEmojier : Gtk.ApplicationWindow {
|
|
|
|
m_rebuilding_gui = true;
|
|
m_rebuilding_gui_timeout_id =
|
|
- GLib.Timeout.add_seconds(10, () => {
|
|
+ GLib.Timeout.add_seconds(5, () => {
|
|
if (!m_rebuilding_gui) {
|
|
m_rebuilding_gui_timeout_id = 0;
|
|
return false;
|
|
}
|
|
- warning("Rebuilding GUI is time out.");
|
|
+ debug("Rebuilding GUI is time out.");
|
|
m_rebuilding_gui = false;
|
|
m_rebuilding_gui_timeout_id = 0;
|
|
return false;
|
|
@@ -2459,7 +2459,6 @@ public class IBusEmojier : Gtk.ApplicationWindow {
|
|
|
|
|
|
public override bool focus_in_event(Gdk.EventFocus event) {
|
|
- m_rebuilding_gui = false;
|
|
return base.focus_in_event(event);
|
|
}
|
|
|
|
--
|
|
2.40.0
|
|
|
|
From 1a25975d9f55f18eab609e4d147dd32689e367f3 Mon Sep 17 00:00:00 2001
|
|
From: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Date: Sun, 11 Jun 2023 16:16:35 +0900
|
|
Subject: [PATCH 1/2] makefile: don't gzip the man pages
|
|
|
|
Drop the gzip step from the manpages - distributions already do that as
|
|
needed. In addition this resolves the final reproducibility issue with
|
|
ibus.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2514
|
|
---
|
|
bus/Makefile.am | 6 +-----
|
|
data/dconf/Makefile.am | 6 +-----
|
|
setup/Makefile.am | 6 +-----
|
|
tools/Makefile.am | 6 +-----
|
|
ui/gtk3/Makefile.am | 6 +-----
|
|
5 files changed, 5 insertions(+), 25 deletions(-)
|
|
|
|
diff --git a/bus/Makefile.am b/bus/Makefile.am
|
|
index e173ee25..d0445d02 100644
|
|
--- a/bus/Makefile.am
|
|
+++ b/bus/Makefile.am
|
|
@@ -169,7 +169,6 @@ EXTRA_DIST = \
|
|
|
|
CLEANFILES = \
|
|
$(man_one_DATA) \
|
|
- $(man_one_files) \
|
|
$(NULL)
|
|
|
|
$(libibus):
|
|
@@ -181,14 +180,11 @@ test: ibus-daemon
|
|
$(builddir)/ibus-daemon -v
|
|
|
|
man_one_in_files = ibus-daemon.1.in
|
|
-man_one_files = $(man_one_in_files:.1.in=.1)
|
|
-man_one_DATA =$(man_one_files:.1=.1.gz)
|
|
+man_one_DATA = $(man_one_in_files:.1.in=.1)
|
|
man_onedir = $(mandir)/man1
|
|
%.1: %.1.in
|
|
$(AM_V_GEN) sed \
|
|
-e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
mv $@.tmp $@
|
|
-%.1.gz: %.1
|
|
- $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
|
|
|
|
-include $(top_srcdir)/git.mk
|
|
diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am
|
|
index 5360f033..2352f770 100644
|
|
--- a/data/dconf/Makefile.am
|
|
+++ b/data/dconf/Makefile.am
|
|
@@ -38,15 +38,12 @@ dconfdb_DATA = 00-upstream-settings
|
|
{ rc=$$?; $(RM) -rf $@; exit $$rc; }
|
|
|
|
man_5_in_files = 00-upstream-settings.5.in ibus.5.in
|
|
-man_5_files = $(man_5_in_files:.5.in=.5)
|
|
-man_5_DATA =$(man_5_files:.5=.5.gz)
|
|
+man_5_DATA = $(man_5_in_files:.5.in=.5)
|
|
man_5dir = $(mandir)/man5
|
|
%.5: %.5.in
|
|
$(AM_V_GEN) sed \
|
|
-e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
mv $@.tmp $@
|
|
-%.5.gz: %.5
|
|
- $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
|
|
|
|
install-data-hook:
|
|
if test -z "$(DESTDIR)"; then \
|
|
@@ -63,7 +60,6 @@ EXTRA_DIST = \
|
|
|
|
CLEANFILES = \
|
|
$(man_5_DATA) \
|
|
- $(man_5_files) \
|
|
$(NULL)
|
|
|
|
MAINTAINERCLEANFILES = \
|
|
diff --git a/setup/Makefile.am b/setup/Makefile.am
|
|
index 34c8f136..b34aa8fc 100644
|
|
--- a/setup/Makefile.am
|
|
+++ b/setup/Makefile.am
|
|
@@ -56,20 +56,16 @@ org.freedesktop.IBus.Setup.desktop: ibus-setup.desktop
|
|
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
|
|
|
|
man_one_in_files = ibus-setup.1.in
|
|
-man_one_files = $(man_one_in_files:.1.in=.1)
|
|
-man_one_DATA =$(man_one_files:.1=.1.gz)
|
|
+man_one_DATA = $(man_one_in_files:.1.in=.1)
|
|
man_onedir = $(mandir)/man1
|
|
%.1: %.1.in
|
|
$(AM_V_GEN) sed \
|
|
-e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
mv $@.tmp $@
|
|
-%.1.gz: %.1
|
|
- $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
|
|
|
|
CLEANFILES = \
|
|
$(desktop_DATA) \
|
|
$(man_one_DATA) \
|
|
- $(man_one_files) \
|
|
*.pyc \
|
|
ibus-setup \
|
|
$(NULL)
|
|
diff --git a/tools/Makefile.am b/tools/Makefile.am
|
|
index e300f9f3..0d00abed 100644
|
|
--- a/tools/Makefile.am
|
|
+++ b/tools/Makefile.am
|
|
@@ -113,15 +113,12 @@ libibusimmodule_la_LDFLAGS = \
|
|
$(NULL)
|
|
|
|
man_one_in_files = ibus.1.in
|
|
-man_one_files = $(man_one_in_files:.1.in=.1)
|
|
-man_one_DATA =$(man_one_files:.1=.1.gz)
|
|
+man_one_DATA = $(man_one_in_files:.1.in=.1)
|
|
man_onedir = $(mandir)/man1
|
|
%.1: %.1.in
|
|
$(AM_V_GEN) sed \
|
|
-e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
mv $@.tmp $@
|
|
-%.1.gz: %.1
|
|
- $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
|
|
|
|
EXTRA_DIST = \
|
|
$(ibus_immodule_vapi) \
|
|
@@ -133,7 +130,6 @@ EXTRA_DIST = \
|
|
|
|
CLEANFILES = \
|
|
$(man_one_DATA) \
|
|
- $(man_one_files) \
|
|
$(NULL)
|
|
|
|
if ENABLE_EMOJI_DICT
|
|
diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am
|
|
index 2a9cabde..5e1a8510 100644
|
|
--- a/ui/gtk3/Makefile.am
|
|
+++ b/ui/gtk3/Makefile.am
|
|
@@ -257,15 +257,12 @@ panelbinding.o: $(srcdir)/panelbinding.c
|
|
|
|
MAINTAINERCLEANFILES += extension.c panelbinding.c
|
|
|
|
-man_seven_files = $(man_seven_in_files:.7.in=.7)
|
|
-man_seven_DATA =$(man_seven_files:.7=.7.gz)
|
|
+man_seven_DATA = $(man_seven_in_files:.7.in=.7)
|
|
man_sevendir = $(mandir)/man7
|
|
%.7: %.7.in
|
|
$(AM_V_GEN) sed \
|
|
-e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
mv $@.tmp $@
|
|
-%.7.gz: %.7
|
|
- $(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
|
|
|
|
desktop_in_files = \
|
|
ibus-ui-emojier.desktop.in \
|
|
@@ -293,7 +290,6 @@ CLEANFILES += \
|
|
$(desktop_DATA) \
|
|
$(desktop_notrans_files) \
|
|
$(man_seven_DATA) \
|
|
- $(man_seven_files) \
|
|
$(NULL)
|
|
|
|
endif
|
|
--
|
|
2.40.0
|
|
|
|
From 03a486c1ec98647e7f8c7dbb70e6e4d3898c9322 Mon Sep 17 00:00:00 2001
|
|
From: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Date: Sun, 11 Jun 2023 16:16:40 +0900
|
|
Subject: [PATCH 2/2] makefile: manage the manpages via AC_CONFIG_FILES()
|
|
|
|
The AC_CONFIG_FILES macro already known how to handle @VERSION@
|
|
substitution, while also ensuring the input files are in the tarball
|
|
(EXTRA_DIST) and substituted files are removed on make distclean
|
|
(CONFIG_CLEAN_FILES).
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2514
|
|
---
|
|
bus/Makefile.am | 12 +-----------
|
|
configure.ac | 6 ++++++
|
|
data/dconf/Makefile.am | 12 +-----------
|
|
setup/Makefile.am | 9 +--------
|
|
tools/Makefile.am | 12 +-----------
|
|
ui/gtk3/Makefile.am | 10 +---------
|
|
6 files changed, 11 insertions(+), 50 deletions(-)
|
|
|
|
diff --git a/bus/Makefile.am b/bus/Makefile.am
|
|
index d0445d02..99715a15 100644
|
|
--- a/bus/Makefile.am
|
|
+++ b/bus/Makefile.am
|
|
@@ -163,14 +163,9 @@ test_stress_LDADD = \
|
|
$(NULL)
|
|
|
|
EXTRA_DIST = \
|
|
- $(man_one_in_files) \
|
|
marshalers.list \
|
|
$(NULL)
|
|
|
|
-CLEANFILES = \
|
|
- $(man_one_DATA) \
|
|
- $(NULL)
|
|
-
|
|
$(libibus):
|
|
$(MAKE) -C $(top_builddir)/src
|
|
|
|
@@ -179,12 +174,7 @@ test: ibus-daemon
|
|
G_DEBUG=fatal_warnings \
|
|
$(builddir)/ibus-daemon -v
|
|
|
|
-man_one_in_files = ibus-daemon.1.in
|
|
-man_one_DATA = $(man_one_in_files:.1.in=.1)
|
|
+man_one_DATA = ibus-daemon.1
|
|
man_onedir = $(mandir)/man1
|
|
-%.1: %.1.in
|
|
- $(AM_V_GEN) sed \
|
|
- -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
- mv $@.tmp $@
|
|
|
|
-include $(top_srcdir)/git.mk
|
|
diff --git a/configure.ac b/configure.ac
|
|
index b3eacbcb..73583bab 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -831,6 +831,7 @@ bindings/Makefile
|
|
bindings/pygobject/Makefile
|
|
bindings/vala/Makefile
|
|
bus/Makefile
|
|
+bus/ibus-daemon.1
|
|
bus/services/Makefile
|
|
client/Makefile
|
|
client/gtk2/Makefile
|
|
@@ -847,6 +848,8 @@ data/icons/Makefile
|
|
data/its/Makefile
|
|
data/keymaps/Makefile
|
|
data/dconf/Makefile
|
|
+data/dconf/00-upstream-settings.5
|
|
+data/dconf/ibus.5
|
|
docs/Makefile
|
|
docs/reference/Makefile
|
|
docs/reference/ibus/ibus-docs.sgml
|
|
@@ -858,13 +861,16 @@ ibus/interface/Makefile
|
|
m4/Makefile
|
|
portal/Makefile
|
|
setup/Makefile
|
|
+setup/ibus-setup.1
|
|
src/Makefile
|
|
src/compose/Makefile
|
|
src/ibusversion.h
|
|
src/tests/Makefile
|
|
tools/Makefile
|
|
+tools/ibus.1
|
|
ui/Makefile
|
|
ui/gtk3/Makefile
|
|
+ui/gtk3/ibus-emoji.7
|
|
util/Makefile
|
|
util/IMdkit/Makefile
|
|
Makefile
|
|
diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am
|
|
index 2352f770..b0601aa8 100644
|
|
--- a/data/dconf/Makefile.am
|
|
+++ b/data/dconf/Makefile.am
|
|
@@ -37,13 +37,8 @@ dconfdb_DATA = 00-upstream-settings
|
|
$(AM_V_GEN) $(srcdir)/make-dconf-override-db.sh > $@ || \
|
|
{ rc=$$?; $(RM) -rf $@; exit $$rc; }
|
|
|
|
-man_5_in_files = 00-upstream-settings.5.in ibus.5.in
|
|
-man_5_DATA = $(man_5_in_files:.5.in=.5)
|
|
+man_5_DATA = 00-upstream-settings.5 ibus.5
|
|
man_5dir = $(mandir)/man5
|
|
-%.5: %.5.in
|
|
- $(AM_V_GEN) sed \
|
|
- -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
- mv $@.tmp $@
|
|
|
|
install-data-hook:
|
|
if test -z "$(DESTDIR)"; then \
|
|
@@ -52,16 +47,11 @@ install-data-hook:
|
|
|
|
EXTRA_DIST = \
|
|
$(gsettings_SCHEMAS) \
|
|
- $(man_5_in_files) \
|
|
make-dconf-override-db.sh \
|
|
profile/ibus \
|
|
00-upstream-settings \
|
|
$(NULL)
|
|
|
|
-CLEANFILES = \
|
|
- $(man_5_DATA) \
|
|
- $(NULL)
|
|
-
|
|
MAINTAINERCLEANFILES = \
|
|
00-upstream-settings \
|
|
$(NULL)
|
|
diff --git a/setup/Makefile.am b/setup/Makefile.am
|
|
index b34aa8fc..831f883c 100644
|
|
--- a/setup/Makefile.am
|
|
+++ b/setup/Makefile.am
|
|
@@ -55,24 +55,17 @@ desktopdir = $(datadir)/applications
|
|
org.freedesktop.IBus.Setup.desktop: ibus-setup.desktop
|
|
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
|
|
|
|
-man_one_in_files = ibus-setup.1.in
|
|
-man_one_DATA = $(man_one_in_files:.1.in=.1)
|
|
+man_one_DATA = ibus-setup.1
|
|
man_onedir = $(mandir)/man1
|
|
-%.1: %.1.in
|
|
- $(AM_V_GEN) sed \
|
|
- -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
- mv $@.tmp $@
|
|
|
|
CLEANFILES = \
|
|
$(desktop_DATA) \
|
|
- $(man_one_DATA) \
|
|
*.pyc \
|
|
ibus-setup \
|
|
$(NULL)
|
|
|
|
EXTRA_DIST = \
|
|
$(desktop_notrans_files) \
|
|
- $(man_one_in_files) \
|
|
ibus-setup.in \
|
|
setup.ui \
|
|
$(NULL)
|
|
diff --git a/tools/Makefile.am b/tools/Makefile.am
|
|
index 0d00abed..daf18f28 100644
|
|
--- a/tools/Makefile.am
|
|
+++ b/tools/Makefile.am
|
|
@@ -112,26 +112,16 @@ libibusimmodule_la_LDFLAGS = \
|
|
-export-symbols-regex "ibus_.*" \
|
|
$(NULL)
|
|
|
|
-man_one_in_files = ibus.1.in
|
|
-man_one_DATA = $(man_one_in_files:.1.in=.1)
|
|
+man_one_DATA = ibus.1
|
|
man_onedir = $(mandir)/man1
|
|
-%.1: %.1.in
|
|
- $(AM_V_GEN) sed \
|
|
- -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
- mv $@.tmp $@
|
|
|
|
EXTRA_DIST = \
|
|
$(ibus_immodule_vapi) \
|
|
$(ibusimmodule_gir) \
|
|
- $(man_one_in_files) \
|
|
ibus.bash \
|
|
IBusIMModule-1.0.metadata \
|
|
$(NULL)
|
|
|
|
-CLEANFILES = \
|
|
- $(man_one_DATA) \
|
|
- $(NULL)
|
|
-
|
|
if ENABLE_EMOJI_DICT
|
|
if ENABLE_UI
|
|
AM_VALAFLAGS += \
|
|
diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am
|
|
index 5e1a8510..4a6506fe 100644
|
|
--- a/ui/gtk3/Makefile.am
|
|
+++ b/ui/gtk3/Makefile.am
|
|
@@ -147,8 +147,6 @@ emoji_headers = \
|
|
ibusemojidialog.h \
|
|
$(NULL)
|
|
|
|
-man_seven_in_files = ibus-emoji.7.in
|
|
-
|
|
# References:
|
|
# libappindicator/src/notification-item.xml
|
|
# libappindicator/src/notification-watcher.xml
|
|
@@ -156,7 +154,6 @@ man_seven_in_files = ibus-emoji.7.in
|
|
# kdelibs/kdeui/knotifications/src/org.kde.StatusNotifierWatcher.xml
|
|
EXTRA_DIST = \
|
|
$(emoji_headers) \
|
|
- $(man_seven_in_files) \
|
|
emojierapp.vala \
|
|
extension.vala \
|
|
gtkextension.xml.in \
|
|
@@ -257,12 +254,8 @@ panelbinding.o: $(srcdir)/panelbinding.c
|
|
|
|
MAINTAINERCLEANFILES += extension.c panelbinding.c
|
|
|
|
-man_seven_DATA = $(man_seven_in_files:.7.in=.7)
|
|
+man_seven_DATA = ibus-emoji.7
|
|
man_sevendir = $(mandir)/man7
|
|
-%.7: %.7.in
|
|
- $(AM_V_GEN) sed \
|
|
- -e 's|@VERSION[@]|$(VERSION)|g' $< > $@.tmp && \
|
|
- mv $@.tmp $@
|
|
|
|
desktop_in_files = \
|
|
ibus-ui-emojier.desktop.in \
|
|
@@ -289,7 +282,6 @@ org.freedesktop.IBus.Panel.Extension.Gtk3.desktop: ibus-extension-gtk3.desktop
|
|
CLEANFILES += \
|
|
$(desktop_DATA) \
|
|
$(desktop_notrans_files) \
|
|
- $(man_seven_DATA) \
|
|
$(NULL)
|
|
|
|
endif
|
|
--
|
|
2.40.0
|
|
|
|
From 4831ed595b346f1ab9224b44e571532785ca86c7 Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Sun, 11 Jun 2023 16:25:56 +0900
|
|
Subject: [PATCH] setup: Unselect Add button in Select Input Method dialog
|
|
|
|
After click "More" ListBoxRow cell in the "Select an input method"
|
|
dialog, "Add" button is sensitive but clicking "Add" button causes
|
|
a SEGV in enginedialog.py:get_selected_engine() because the more cell
|
|
has no engine memmber.
|
|
|
|
BUG=rhbz#2213145
|
|
---
|
|
setup/enginedialog.py | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/setup/enginedialog.py b/setup/enginedialog.py
|
|
index 470f801c..ba6a4819 100644
|
|
--- a/setup/enginedialog.py
|
|
+++ b/setup/enginedialog.py
|
|
@@ -4,7 +4,7 @@
|
|
# ibus - The Input Bus
|
|
#
|
|
# Copyright (c) 2015 Peng Huang <shawn.p.huang@gmail.com>
|
|
-# Copyright (c) 2015-2021 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
+# Copyright (c) 2015-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
# Copyright (c) 2013-2015 Red Hat, Inc.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
@@ -145,6 +145,8 @@ class EngineDialog(Gtk.Dialog):
|
|
|
|
def __row_activated(self, box, row):
|
|
if row == self.__more_row:
|
|
+ # Undo sensitive Gtk.ResponseType.APPLY button
|
|
+ self.__list.unselect_row(row)
|
|
self.__show_more()
|
|
return
|
|
if row.back:
|
|
--
|
|
2.40.0
|
|
|
|
From 76f2f4a3aa25b399d65c947d76d61d5ae4723bc7 Mon Sep 17 00:00:00 2001
|
|
From: Matt Turner <mattst88@gmail.com>
|
|
Date: Sun, 11 Jun 2023 19:59:17 +0900
|
|
Subject: [PATCH 1/2] configure: Run autoupdate
|
|
|
|
Avoids these warnings when running autogen.sh:
|
|
|
|
configure.ac:67: warning: The macro `AC_GNU_SOURCE' is obsolete.
|
|
configure.ac:67: You should run autoupdate.
|
|
./lib/autoconf/specific.m4:311: AC_GNU_SOURCE is expanded from...
|
|
configure.ac:67: the top level
|
|
configure.ac:129: warning: The macro `AC_PROG_CC_STDC' is obsolete.
|
|
configure.ac:129: You should run autoupdate.
|
|
./lib/autoconf/c.m4:1671: AC_PROG_CC_STDC is expanded from...
|
|
configure.ac:129: the top level
|
|
configure.ac:139: warning: The macro `AM_DISABLE_STATIC' is obsolete.
|
|
configure.ac:139: You should run autoupdate.
|
|
m4/ltoptions.m4:260: AM_DISABLE_STATIC is expanded from...
|
|
configure.ac:139: the top level
|
|
configure.ac:140: warning: The macro `AC_ISC_POSIX' is obsolete.
|
|
configure.ac:140: You should run autoupdate.
|
|
./lib/autoconf/specific.m4:549: AC_ISC_POSIX is expanded from...
|
|
configure.ac:140: the top level
|
|
configure.ac:141: warning: The macro `AC_HEADER_STDC' is obsolete.
|
|
configure.ac:141: You should run autoupdate.
|
|
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
|
|
configure.ac:141: the top level
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2519
|
|
---
|
|
configure.ac | 9 ++++-----
|
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 73583bab..cbdfbd05 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -64,7 +64,7 @@ AC_SUBST(VALA_TARGET_GLIB_VERSION)
|
|
# Init automake.
|
|
AM_INIT_AUTOMAKE([1.11.1 parallel-tests])
|
|
AM_MAINTAINER_MODE([enable])
|
|
-AC_GNU_SOURCE
|
|
+AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
# Support silent build rules. Disable
|
|
# by either passing --disable-silent-rules to configure or passing V=1
|
|
@@ -126,7 +126,6 @@ AC_SUBST(DATE_DISPLAY)
|
|
# Check for programs.
|
|
AC_PROG_CC
|
|
AM_PROG_CC_C_O
|
|
-AC_PROG_CC_STDC
|
|
AM_PROG_VALAC([0.20])
|
|
AC_PROG_INSTALL
|
|
AC_PROG_MAKE_SET
|
|
@@ -136,9 +135,9 @@ AM_GNU_GETTEXT_VERSION([0.19.8])
|
|
AM_GNU_GETTEXT([external])
|
|
|
|
# Define PACKAGE_VERSION_* variables.
|
|
-AM_DISABLE_STATIC
|
|
-AC_ISC_POSIX
|
|
-AC_HEADER_STDC
|
|
+AC_DISABLE_STATIC([])
|
|
+AC_SEARCH_LIBS([strerror],[cposix])
|
|
+
|
|
LT_INIT
|
|
|
|
# Check header filess.
|
|
--
|
|
2.40.0
|
|
|
|
From b97e6669ea8127dd50ce49d061edd4ce579bbb42 Mon Sep 17 00:00:00 2001
|
|
From: Matt Turner <mattst88@gmail.com>
|
|
Date: Sun, 11 Jun 2023 19:59:18 +0900
|
|
Subject: [PATCH 2/2] src/ibuscomposetable: Fix unaligned accesses
|
|
|
|
Fixes: https://github.com/ibus/ibus/commit/19ca1065
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2518
|
|
---
|
|
src/ibuscomposetable.c | 23 +++++++++++++----------
|
|
1 file changed, 13 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c
|
|
index fc486692..c807c751 100644
|
|
--- a/src/ibuscomposetable.c
|
|
+++ b/src/ibuscomposetable.c
|
|
@@ -732,8 +732,8 @@ compose_data_to_variant (gconstpointer compose_data,
|
|
gboolean reverse_endianness,
|
|
GError **error)
|
|
{
|
|
- guint16 *compose_data16 = NULL;
|
|
- guint32 *compose_data32 = NULL;
|
|
+ guint16 data16;
|
|
+ guint32 data32;
|
|
guint16 *target_data16 = NULL;
|
|
guint32 *target_data32 = NULL;
|
|
gsize i, length;
|
|
@@ -759,18 +759,20 @@ compose_data_to_variant (gconstpointer compose_data,
|
|
"Failed to malloc");
|
|
return NULL;
|
|
}
|
|
- compose_data32 = (guint32*)compose_data;
|
|
- for (i = 0; i < length; i++)
|
|
- target_data32[i] = GUINT32_SWAP_LE_BE (compose_data32[i]);
|
|
+ for (i = 0; i < length; i++) {
|
|
+ memcpy(&data32, (char *)compose_data + i * sizeof (data32), sizeof (data32));
|
|
+ target_data32[i] = GUINT32_SWAP_LE_BE (data32);
|
|
+ }
|
|
} else {
|
|
if (!(target_data16 = g_new0 (guint16, length))) {
|
|
g_set_error (error, IBUS_ERROR, IBUS_ERROR_FAILED,
|
|
"Failed to malloc");
|
|
return NULL;
|
|
}
|
|
- compose_data16 = (guint16*)compose_data;
|
|
- for (i = 0; i < length; i++)
|
|
- target_data16[i] = GUINT16_SWAP_LE_BE (compose_data16[i]);
|
|
+ for (i = 0; i < length; i++) {
|
|
+ memcpy(&data16, (char *)compose_data + i * sizeof (data16), sizeof (data16));
|
|
+ target_data16[i] = GUINT16_SWAP_LE_BE (data16);
|
|
+ }
|
|
}
|
|
} else {
|
|
if (is_32bit)
|
|
@@ -1365,8 +1367,9 @@ ibus_compose_table_new_with_list (GList *compose_list,
|
|
if (is_32bit) {
|
|
for (j = 0; compose_data->values[j]; j++) {
|
|
g_assert (v_index_32bit + j < v_size_32bit);
|
|
- ibus_compose_seqs_32bit_second[v_index_32bit + j] =
|
|
- compose_data->values[j];
|
|
+ memcpy(&ibus_compose_seqs_32bit_second[v_index_32bit + j],
|
|
+ &compose_data->values[j],
|
|
+ sizeof *ibus_compose_seqs_32bit_second);
|
|
}
|
|
g_assert (m + 1 < (s_size_total - s_size_16bit) * n_index_stride);
|
|
ibus_compose_seqs_32bit_first[m++] = j;
|
|
--
|
|
2.40.0
|
|
|
|
From f0492c86f7c42d35bedff1a1910075617243d1f0 Mon Sep 17 00:00:00 2001
|
|
From: Matt Turner <mattst88@gmail.com>
|
|
Date: Sun, 18 Jun 2023 10:59:35 +0900
|
|
Subject: [PATCH] m4: Update m4 files
|
|
|
|
- Revert .gitignore because m4 files cannot be added
|
|
- Delete as-version.m4 which has been unused since 2010
|
|
- Update the latest introspection.m4
|
|
- Update the latest vapigen.m4
|
|
|
|
Fixes: https://github.com/ibus/ibus/commit/d23bbdd
|
|
Fixes: https://github.com/ibus/ibus/commit/3b3f56d
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2527
|
|
---
|
|
m4/Makefile.am | 1 -
|
|
m4/as-version.m4 | 71 ---------------------------------------------
|
|
m4/introspection.m4 | 60 ++++++++++++++++++++++++++++++++++----
|
|
m4/vapigen.m4 | 19 +++++++-----
|
|
5 files changed, 66 insertions(+), 86 deletions(-)
|
|
delete mode 100644 m4/as-version.m4
|
|
|
|
diff --git a/m4/Makefile.am b/m4/Makefile.am
|
|
index dcf84ac3..49ecbb89 100644
|
|
--- a/m4/Makefile.am
|
|
+++ b/m4/Makefile.am
|
|
@@ -21,7 +21,6 @@
|
|
# USA
|
|
|
|
EXTRA_DIST = \
|
|
- as-version.m4 \
|
|
ibuslocale.m4 \
|
|
vapigen.m4 \
|
|
$(NULL)
|
|
diff --git a/m4/as-version.m4 b/m4/as-version.m4
|
|
deleted file mode 100644
|
|
index a5b43990..00000000
|
|
--- a/m4/as-version.m4
|
|
+++ /dev/null
|
|
@@ -1,71 +0,0 @@
|
|
-dnl as-version.m4 0.2.0
|
|
-
|
|
-dnl autostars m4 macro for versioning
|
|
-
|
|
-dnl Thomas Vander Stichele <thomas at apestaart dot org>
|
|
-
|
|
-dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $
|
|
-
|
|
-dnl AS_VERSION
|
|
-
|
|
-dnl example
|
|
-dnl AS_VERSION
|
|
-
|
|
-dnl this macro
|
|
-dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO
|
|
-dnl - AC_SUBST's PACKAGE_VERSION_RELEASE,
|
|
-dnl which can be used for rpm release fields
|
|
-dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents
|
|
-dnl maintainer mode from running correctly
|
|
-dnl
|
|
-dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h
|
|
-dnl if you use acconfig.h
|
|
-
|
|
-AC_DEFUN([AS_VERSION],
|
|
-[
|
|
- PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1)
|
|
- PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2)
|
|
- PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3)
|
|
-
|
|
- AC_SUBST(PACKAGE_VERSION_MAJOR)
|
|
- AC_SUBST(PACKAGE_VERSION_MINOR)
|
|
- AC_SUBST(PACKAGE_VERSION_MICRO)
|
|
-])
|
|
-
|
|
-dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO])
|
|
-
|
|
-dnl requires AC_INIT to be called before
|
|
-dnl For projects using a fourth or nano number in your versioning to indicate
|
|
-dnl development or prerelease snapshots, this macro allows the build to be
|
|
-dnl set up differently accordingly.
|
|
-
|
|
-dnl this macro:
|
|
-dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number
|
|
-dnl - sets the variable PACKAGE_VERSION_NANO
|
|
-dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used
|
|
-dnl for rpm release fields
|
|
-dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO
|
|
-
|
|
-dnl example:
|
|
-dnl AS_NANO(RELEASE="yes", RELEASE="no")
|
|
-
|
|
-AC_DEFUN([AS_NANO],
|
|
-[
|
|
- AC_MSG_CHECKING(nano version)
|
|
-
|
|
- NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4)
|
|
-
|
|
- if test x"$NANO" = x || test "x$NANO" = "x0" ; then
|
|
- AC_MSG_RESULT([0 (release)])
|
|
- NANO=0
|
|
- PACKAGE_VERSION_RELEASE=1
|
|
- ifelse([$1], , :, [$1])
|
|
- else
|
|
- AC_MSG_RESULT($NANO)
|
|
- PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S`
|
|
- ifelse([$2], , :, [$2])
|
|
- fi
|
|
- PACKAGE_VERSION_NANO=$NANO
|
|
- AC_SUBST(PACKAGE_VERSION_NANO)
|
|
- AC_SUBST(PACKAGE_VERSION_RELEASE)
|
|
-])
|
|
diff --git a/m4/introspection.m4 b/m4/introspection.m4
|
|
index 589721c5..b0ccd689 100644
|
|
--- a/m4/introspection.m4
|
|
+++ b/m4/introspection.m4
|
|
@@ -8,6 +8,47 @@ dnl
|
|
|
|
# serial 1
|
|
|
|
+dnl This is a copy of AS_AC_EXPAND
|
|
+dnl
|
|
+dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
|
|
+dnl Copying and distribution of this file, with or without modification,
|
|
+dnl are permitted in any medium without royalty provided the copyright
|
|
+dnl notice and this notice are preserved.
|
|
+m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND],
|
|
+[
|
|
+ EXP_VAR=[$1]
|
|
+ FROM_VAR=[$2]
|
|
+
|
|
+ dnl first expand prefix and exec_prefix if necessary
|
|
+ prefix_save=$prefix
|
|
+ exec_prefix_save=$exec_prefix
|
|
+
|
|
+ dnl if no prefix given, then use /usr/local, the default prefix
|
|
+ if test "x$prefix" = "xNONE"; then
|
|
+ prefix="$ac_default_prefix"
|
|
+ fi
|
|
+ dnl if no exec_prefix given, then use prefix
|
|
+ if test "x$exec_prefix" = "xNONE"; then
|
|
+ exec_prefix=$prefix
|
|
+ fi
|
|
+
|
|
+ full_var="$FROM_VAR"
|
|
+ dnl loop until it doesn't change anymore
|
|
+ while true; do
|
|
+ new_full_var="`eval echo $full_var`"
|
|
+ if test "x$new_full_var" = "x$full_var"; then break; fi
|
|
+ full_var=$new_full_var
|
|
+ done
|
|
+
|
|
+ dnl clean up
|
|
+ full_var=$new_full_var
|
|
+ AC_SUBST([$1], "$full_var")
|
|
+
|
|
+ dnl restore prefix and exec_prefix
|
|
+ prefix=$prefix_save
|
|
+ exec_prefix=$exec_prefix_save
|
|
+])
|
|
+
|
|
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
|
[
|
|
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
|
@@ -41,6 +82,8 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
|
],dnl
|
|
[auto],[dnl
|
|
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
|
|
+ dnl Canonicalize enable_introspection
|
|
+ enable_introspection=$found_introspection
|
|
],dnl
|
|
[dnl
|
|
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
|
|
@@ -48,20 +91,25 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
|
|
|
AC_MSG_RESULT([$found_introspection])
|
|
|
|
+ dnl expand datadir/libdir so we can pass them to pkg-config
|
|
+ dnl and get paths relative to our target directories
|
|
+ _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir")
|
|
+ _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir")
|
|
+
|
|
INTROSPECTION_SCANNER=
|
|
INTROSPECTION_COMPILER=
|
|
INTROSPECTION_GENERATE=
|
|
INTROSPECTION_GIRDIR=
|
|
INTROSPECTION_TYPELIBDIR=
|
|
if test "x$found_introspection" = "xyes"; then
|
|
- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
|
- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
|
- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
|
- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
|
- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
|
+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
|
+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
|
+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
|
+ INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0`
|
|
+ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)"
|
|
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
|
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
|
- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
|
+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
|
fi
|
|
AC_SUBST(INTROSPECTION_SCANNER)
|
|
AC_SUBST(INTROSPECTION_COMPILER)
|
|
diff --git a/m4/vapigen.m4 b/m4/vapigen.m4
|
|
index 051ccd2e..6228991a 100644
|
|
--- a/m4/vapigen.m4
|
|
+++ b/m4/vapigen.m4
|
|
@@ -16,15 +16,20 @@ dnl You should have received a copy of the GNU Lesser General Public
|
|
dnl License along with this library; if not, write to the Free Software
|
|
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
-# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
|
|
+# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT])
|
|
# --------------------------------------
|
|
# Check vapigen existence and version
|
|
#
|
|
# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
|
|
AC_DEFUN([VAPIGEN_CHECK],
|
|
[
|
|
- AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
|
|
- AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
|
|
+ AS_IF([test "x$3" != "xyes"], [
|
|
+ m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [
|
|
+ m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [
|
|
+ AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]])
|
|
+ ])
|
|
+ ])
|
|
+ ])
|
|
|
|
AC_ARG_ENABLE([vala],
|
|
[AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
|
|
@@ -77,12 +82,12 @@ AC_DEFUN([VAPIGEN_CHECK],
|
|
|
|
AS_CASE([$enable_vala],
|
|
[yes], [
|
|
- VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
|
|
- VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
|
|
+ VAPIGEN=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
|
|
+ VAPIGEN_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
|
|
AS_IF([test "x$2" = "x"], [
|
|
- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
|
|
+ VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
|
|
], [
|
|
- VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
|
|
+ VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
|
|
])
|
|
])
|
|
|
|
--
|
|
2.41.0
|
|
|
|
From 18f0d9f5f245f92dee086ce57a5bb94e63f1c222 Mon Sep 17 00:00:00 2001
|
|
From: oreo639 <oreo6391@gmail.com>
|
|
Date: Sun, 18 Jun 2023 11:08:59 +0900
|
|
Subject: [PATCH] configure: Fix cross compiling
|
|
|
|
Use AX_PROG_CC_FOR_BUILD to get build CC/CFLAGS/LDFLAGS/etc.
|
|
Use PKG_PROG_PKG_CONFIG_FOR_BUILD to find build pkg-config binary.
|
|
|
|
https://sourceware.org/autobook/autobook/autobook_143.html#Supporting-Cross-Compiler-in-Make
|
|
|
|
BUG=https://github.com/ibus/ibus/issues/2479
|
|
---
|
|
configure.ac | 12 +++
|
|
m4/Makefile.am | 2 +
|
|
m4/ax_prog_cc_for_build.m4 | 155 +++++++++++++++++++++++++++++++++++++
|
|
m4/pkg_config_for_build.m4 | 20 +++++
|
|
src/Makefile.am | 67 ++++++++++++----
|
|
5 files changed, 240 insertions(+), 16 deletions(-)
|
|
create mode 100644 m4/ax_prog_cc_for_build.m4
|
|
create mode 100644 m4/pkg_config_for_build.m4
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index cbdfbd05..fb51367f 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -129,6 +129,7 @@ AM_PROG_CC_C_O
|
|
AM_PROG_VALAC([0.20])
|
|
AC_PROG_INSTALL
|
|
AC_PROG_MAKE_SET
|
|
+AX_PROG_CC_FOR_BUILD
|
|
|
|
# i18n stuff
|
|
AM_GNU_GETTEXT_VERSION([0.19.8])
|
|
@@ -150,6 +151,9 @@ AC_CHECK_FUNCS(daemon)
|
|
AC_CHECK_LIB(c, dlclose, LIBDL="", [AC_CHECK_LIB(dl, dlclose, LIBDL="-ldl")])
|
|
AC_SUBST(LIBDL)
|
|
|
|
+# Check if cross compiling.
|
|
+AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
|
+
|
|
# Check endianness.
|
|
AC_C_BIGENDIAN([ENDIAN=big], [ENDIAN=little], [ENDIAN=unknown], [ENDIAN=big])
|
|
if test x"$ENDIAN" != xlittle -a x"$ENDIAN" != xbig; then
|
|
@@ -183,6 +187,14 @@ AH_BOTTOM([
|
|
#endif
|
|
])
|
|
|
|
+if test "x$cross_compiling" = "xyes"; then
|
|
+PKG_PROG_PKG_CONFIG_FOR_BUILD
|
|
+GLIB_CFLAGS_FOR_BUILD=`$PKG_CONFIG_FOR_BUILD --cflags glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0 gthread-2.0`
|
|
+GLIB_LIBS_FOR_BUILD=`$PKG_CONFIG_FOR_BUILD --libs glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0 gthread-2.0`
|
|
+AC_SUBST(GLIB_CFLAGS_FOR_BUILD)
|
|
+AC_SUBST(GLIB_LIBS_FOR_BUILD)
|
|
+fi
|
|
+
|
|
# --disable-tests option.
|
|
AC_ARG_ENABLE(tests,
|
|
AS_HELP_STRING([--disable-tests],
|
|
diff --git a/m4/Makefile.am b/m4/Makefile.am
|
|
index 49ecbb89..8ea759e6 100644
|
|
--- a/m4/Makefile.am
|
|
+++ b/m4/Makefile.am
|
|
@@ -21,7 +21,9 @@
|
|
# USA
|
|
|
|
EXTRA_DIST = \
|
|
+ ax_prog_cc_for_build.m4 \
|
|
ibuslocale.m4 \
|
|
+ pkg_config_for_build.m4 \
|
|
vapigen.m4 \
|
|
$(NULL)
|
|
|
|
diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4
|
|
new file mode 100644
|
|
index 00000000..1db8d73f
|
|
--- /dev/null
|
|
+++ b/m4/ax_prog_cc_for_build.m4
|
|
@@ -0,0 +1,155 @@
|
|
+# ===========================================================================
|
|
+# https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
|
|
+# ===========================================================================
|
|
+#
|
|
+# SYNOPSIS
|
|
+#
|
|
+# AX_PROG_CC_FOR_BUILD
|
|
+#
|
|
+# DESCRIPTION
|
|
+#
|
|
+# This macro searches for a C compiler that generates native executables,
|
|
+# that is a C compiler that surely is not a cross-compiler. This can be
|
|
+# useful if you have to generate source code at compile-time like for
|
|
+# example GCC does.
|
|
+#
|
|
+# The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
|
|
+# needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
|
|
+# The value of these variables can be overridden by the user by specifying
|
|
+# a compiler with an environment variable (like you do for standard CC).
|
|
+#
|
|
+# It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
|
|
+# file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
|
|
+# the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
|
|
+# substituted in the Makefile.
|
|
+#
|
|
+# LICENSE
|
|
+#
|
|
+# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
|
|
+#
|
|
+# Copying and distribution of this file, with or without modification, are
|
|
+# permitted in any medium without royalty provided the copyright notice
|
|
+# and this notice are preserved. This file is offered as-is, without any
|
|
+# warranty.
|
|
+
|
|
+#serial 21
|
|
+
|
|
+AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
|
|
+AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
|
|
+AC_REQUIRE([AC_PROG_CC])dnl
|
|
+AC_REQUIRE([AC_PROG_CPP])dnl
|
|
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
|
+
|
|
+dnl Use the standard macros, but make them use other variable names
|
|
+dnl
|
|
+pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
|
|
+pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl
|
|
+pushdef([ac_cv_prog_cc_c99], ac_cv_build_prog_cc_c99)dnl
|
|
+pushdef([ac_cv_prog_cc_c11], ac_cv_build_prog_cc_c11)dnl
|
|
+pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
|
|
+pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
|
|
+pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
|
|
+pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
|
|
+pushdef([ac_cv_c_compiler_gnu], ac_cv_build_c_compiler_gnu)dnl
|
|
+pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
|
|
+pushdef([ac_cv_objext], ac_cv_build_objext)dnl
|
|
+pushdef([ac_exeext], ac_build_exeext)dnl
|
|
+pushdef([ac_objext], ac_build_objext)dnl
|
|
+pushdef([CC], CC_FOR_BUILD)dnl
|
|
+pushdef([CPP], CPP_FOR_BUILD)dnl
|
|
+pushdef([GCC], GCC_FOR_BUILD)dnl
|
|
+pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
|
|
+pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
|
|
+pushdef([EXEEXT], BUILD_EXEEXT)dnl
|
|
+pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
|
|
+pushdef([OBJEXT], BUILD_OBJEXT)dnl
|
|
+pushdef([host], build)dnl
|
|
+pushdef([host_alias], build_alias)dnl
|
|
+pushdef([host_cpu], build_cpu)dnl
|
|
+pushdef([host_vendor], build_vendor)dnl
|
|
+pushdef([host_os], build_os)dnl
|
|
+pushdef([ac_cv_host], ac_cv_build)dnl
|
|
+pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
|
|
+pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
|
|
+pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
|
|
+pushdef([ac_cv_host_os], ac_cv_build_os)dnl
|
|
+pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl
|
|
+pushdef([am_cv_CC_dependencies_compiler_type], am_cv_build_CC_dependencies_compiler_type)dnl
|
|
+pushdef([am_cv_prog_cc_c_o], am_cv_build_prog_cc_c_o)dnl
|
|
+pushdef([cross_compiling], cross_compiling_build)dnl
|
|
+
|
|
+cross_compiling_build=no
|
|
+
|
|
+ac_build_tool_prefix=
|
|
+AS_IF([test -n "$build"], [ac_build_tool_prefix="$build-"],
|
|
+ [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
|
|
+
|
|
+AC_LANG_PUSH([C])
|
|
+
|
|
+dnl The pushdef([ac_cv_c_compiler_gnu], ...) currently does not cover
|
|
+dnl the use of this variable in _AC_LANG_COMPILER_GNU called by
|
|
+dnl AC_PROG_CC. Unset this cache variable temporarily as a workaround.
|
|
+was_set_c_compiler_gnu=${[ac_cv_c_compiler_gnu]+y}
|
|
+AS_IF([test ${was_set_c_compiler_gnu}],
|
|
+ [saved_c_compiler_gnu=$[ac_cv_c_compiler_gnu]
|
|
+ AS_UNSET([[ac_cv_c_compiler_gnu]])])
|
|
+
|
|
+AC_PROG_CC
|
|
+
|
|
+dnl Restore ac_cv_c_compiler_gnu
|
|
+AS_IF([test ${was_set_c_compiler_gnu}],
|
|
+ [[ac_cv_c_compiler_gnu]=$[saved_c_compiler_gnu]])
|
|
+
|
|
+_AC_COMPILER_EXEEXT
|
|
+_AC_COMPILER_OBJEXT
|
|
+AC_PROG_CPP
|
|
+
|
|
+dnl Restore the old definitions
|
|
+dnl
|
|
+popdef([cross_compiling])dnl
|
|
+popdef([am_cv_prog_cc_c_o])dnl
|
|
+popdef([am_cv_CC_dependencies_compiler_type])dnl
|
|
+popdef([ac_tool_prefix])dnl
|
|
+popdef([ac_cv_host_os])dnl
|
|
+popdef([ac_cv_host_vendor])dnl
|
|
+popdef([ac_cv_host_cpu])dnl
|
|
+popdef([ac_cv_host_alias])dnl
|
|
+popdef([ac_cv_host])dnl
|
|
+popdef([host_os])dnl
|
|
+popdef([host_vendor])dnl
|
|
+popdef([host_cpu])dnl
|
|
+popdef([host_alias])dnl
|
|
+popdef([host])dnl
|
|
+popdef([OBJEXT])dnl
|
|
+popdef([LDFLAGS])dnl
|
|
+popdef([EXEEXT])dnl
|
|
+popdef([CPPFLAGS])dnl
|
|
+popdef([CFLAGS])dnl
|
|
+popdef([GCC])dnl
|
|
+popdef([CPP])dnl
|
|
+popdef([CC])dnl
|
|
+popdef([ac_objext])dnl
|
|
+popdef([ac_exeext])dnl
|
|
+popdef([ac_cv_objext])dnl
|
|
+popdef([ac_cv_exeext])dnl
|
|
+popdef([ac_cv_c_compiler_gnu])dnl
|
|
+popdef([ac_cv_prog_cc_g])dnl
|
|
+popdef([ac_cv_prog_cc_cross])dnl
|
|
+popdef([ac_cv_prog_cc_works])dnl
|
|
+popdef([ac_cv_prog_cc_c89])dnl
|
|
+popdef([ac_cv_prog_gcc])dnl
|
|
+popdef([ac_cv_prog_CPP])dnl
|
|
+
|
|
+dnl restore global variables ac_ext, ac_cpp, ac_compile,
|
|
+dnl ac_link, ac_compiler_gnu (dependant on the current
|
|
+dnl language after popping):
|
|
+AC_LANG_POP([C])
|
|
+
|
|
+dnl Finally, set Makefile variables
|
|
+dnl
|
|
+AC_SUBST(BUILD_EXEEXT)dnl
|
|
+AC_SUBST(BUILD_OBJEXT)dnl
|
|
+AC_SUBST([CFLAGS_FOR_BUILD])dnl
|
|
+AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
|
|
+AC_SUBST([LDFLAGS_FOR_BUILD])dnl
|
|
+])
|
|
diff --git a/m4/pkg_config_for_build.m4 b/m4/pkg_config_for_build.m4
|
|
new file mode 100644
|
|
index 00000000..0422f482
|
|
--- /dev/null
|
|
+++ b/m4/pkg_config_for_build.m4
|
|
@@ -0,0 +1,20 @@
|
|
+# PKG_PROG_PKG_CONFIG_FOR_BUILD([MIN-VERSION])
|
|
+# ----------------------------------
|
|
+AC_DEFUN([PKG_PROG_PKG_CONFIG_FOR_BUILD],
|
|
+[m4_pattern_allow([^PKG_CONFIG_FOR_BUILD$])
|
|
+AC_ARG_VAR([PKG_CONFIG_FOR_BUILD], [path to build system's pkg-config utility])
|
|
+
|
|
+if test "x$ac_cv_env_PKG_CONFIG_FOR_BUILD_set" != "xset"; then
|
|
+ AC_PATH_PROG([PKG_CONFIG_FOR_BUILD], [pkg-config])
|
|
+fi
|
|
+if test -n "$PKG_CONFIG_FOR_BUILD"; then
|
|
+ _pkg_for_build_min_version=m4_default([$1], [0.9.0])
|
|
+ AC_MSG_CHECKING([build system's pkg-config is at least version $_pkg_min_version])
|
|
+ if $PKG_CONFIG_FOR_BUILD --atleast-pkgconfig-version $_pkg_min_version; then
|
|
+ AC_MSG_RESULT([yes])
|
|
+ else
|
|
+ AC_MSG_RESULT([no])
|
|
+ PKG_CONFIG_FOR_BUILD=""
|
|
+ fi
|
|
+fi[]dnl
|
|
+])# PKG_PROG_PKG_CONFIG_FOR_BUILD
|
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
index adc7f04a..68dde2f3 100644
|
|
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -46,9 +46,6 @@ noinst_PROGRAMS = gen-internal-compose-table
|
|
# C preprocessor flags
|
|
AM_CPPFLAGS = \
|
|
-DG_LOG_DOMAIN=\"IBUS\" \
|
|
- @GLIB2_CFLAGS@ \
|
|
- @GOBJECT2_CFLAGS@ \
|
|
- @GIO2_CFLAGS@ \
|
|
-DIBUS_CACHE_DIR=\""$(localstatedir)/cache/ibus"\" \
|
|
-DIBUS_DATA_DIR=\"$(pkgdatadir)\" \
|
|
-DIBUS_DISABLE_DEPRECATION_WARNINGS \
|
|
@@ -65,6 +62,11 @@ libibus_1_0_la_LIBADD = \
|
|
@GOBJECT2_LIBS@ \
|
|
@GIO2_LIBS@ \
|
|
$(NULL)
|
|
+libibus_1_0_la_CFLAGS = \
|
|
+ @GLIB2_CFLAGS@ \
|
|
+ @GOBJECT2_CFLAGS@ \
|
|
+ @GIO2_CFLAGS@ \
|
|
+ $(NULL)
|
|
libibus_1_0_la_LDFLAGS = \
|
|
-no-undefined \
|
|
-export-symbols-regex "ibus_.*" \
|
|
@@ -107,7 +109,7 @@ ibus_sources = \
|
|
ibusxevent.c \
|
|
ibusxml.c \
|
|
$(NULL)
|
|
-libibus_1_0_la_SOURCES = \
|
|
+libibus_sources = \
|
|
ibuscomposetable.c \
|
|
ibusenumtypes.c \
|
|
ibusmarshalers.c \
|
|
@@ -166,6 +168,7 @@ ibus_headers = \
|
|
ibusxevent.h \
|
|
ibusxml.h \
|
|
$(NULL)
|
|
+libibus_1_0_la_SOURCES = $(libibus_sources)
|
|
ibusincludedir = $(includedir)/ibus-@IBUS_API_VERSION@
|
|
ibus_public_headers = \
|
|
$(ibus_headers) \
|
|
@@ -188,6 +191,35 @@ noinst_HEADERS = \
|
|
$(ibus_private_headers) \
|
|
$(NULL)
|
|
|
|
+if CROSS_COMPILING
|
|
+# Avoid libtool when building native libraries
|
|
+libnativeibus =
|
|
+parser_extra_sources = $(libibus_sources)
|
|
+
|
|
+glib_cflags = @GLIB_CFLAGS_FOR_BUILD@
|
|
+glib_libs = @GLIB_LIBS_FOR_BUILD@
|
|
+
|
|
+$(noinst_PROGRAMS): CC=$(CC_FOR_BUILD)
|
|
+$(noinst_PROGRAMS): CCLD=$(CC_FOR_BUILD)
|
|
+$(noinst_PROGRAMS): CFLAGS=$(CFLAGS_FOR_BUILD)
|
|
+$(noinst_PROGRAMS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
|
|
+$(noinst_PROGRAMS): LDFLAGS=$(LDFLAGS_FOR_BUILD)
|
|
+else
|
|
+libnativeibus = $(libibus)
|
|
+parser_extra_sources =
|
|
+
|
|
+glib_libs = \
|
|
+ @GLIB2_LIBS@ \
|
|
+ @GOBJECT2_LIBS@ \
|
|
+ @GIO2_LIBS@ \
|
|
+ $(NULL)
|
|
+glib_cflags = \
|
|
+ @GLIB2_CFLAGS@ \
|
|
+ @GOBJECT2_CFLAGS@ \
|
|
+ @GIO2_CFLAGS@ \
|
|
+ $(NULL)
|
|
+endif
|
|
+
|
|
gen_internal_compose_table_SOURCES = \
|
|
gencomposetable.c \
|
|
ibuscomposetable.c \
|
|
@@ -196,11 +228,12 @@ gen_internal_compose_table_SOURCES = \
|
|
ibuskeyuni.c \
|
|
ibusenumtypes.h \
|
|
$(NULL)
|
|
-gen_internal_compose_table_CFLAGS = $(AM_CFLAGS)
|
|
+gen_internal_compose_table_CFLAGS = \
|
|
+ $(AM_CFLAGS) \
|
|
+ $(glib_cflags) \
|
|
+ $(NULL)
|
|
gen_internal_compose_table_LDADD = \
|
|
- @GLIB2_LIBS@ \
|
|
- @GOBJECT2_LIBS@ \
|
|
- @GIO2_LIBS@ \
|
|
+ $(glib_libs) \
|
|
$(NULL)
|
|
|
|
BUILT_SOURCES = \
|
|
@@ -363,15 +396,15 @@ install-data-hook:
|
|
|
|
emoji_parser_SOURCES = \
|
|
emoji-parser.c \
|
|
+ $(parser_extra_sources) \
|
|
$(NULL)
|
|
emoji_parser_CFLAGS = \
|
|
- $(GLIB2_CFLAGS) \
|
|
- $(GOBJECT2_CFLAGS) \
|
|
+ $(AM_CFLAGS) \
|
|
+ $(glib_cflags) \
|
|
$(NULL)
|
|
emoji_parser_LDADD = \
|
|
- $(libibus) \
|
|
- $(GLIB2_LIBS) \
|
|
- $(GOBJECT2_LIBS) \
|
|
+ $(libnativeibus) \
|
|
+ $(glib_libs) \
|
|
$(NULL)
|
|
endif
|
|
|
|
@@ -408,13 +441,15 @@ ibusunicodegen.h:
|
|
|
|
unicode_parser_SOURCES = \
|
|
unicode-parser.c \
|
|
+ $(parser_extra_sources) \
|
|
$(NULL)
|
|
unicode_parser_CFLAGS = \
|
|
- $(GLIB2_CFLAGS) \
|
|
+ $(AM_CFLAGS) \
|
|
+ $(glib_cflags) \
|
|
$(NULL)
|
|
unicode_parser_LDADD = \
|
|
- $(GLIB2_LIBS) \
|
|
- $(libibus) \
|
|
+ $(glib_libs) \
|
|
+ $(libnativeibus) \
|
|
$(NULL)
|
|
endif
|
|
|
|
--
|
|
2.41.0
|
|
|
|
From 25a2dfc12410fff5f32a3caf793a958d7e41dc4c Mon Sep 17 00:00:00 2001
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
Date: Tue, 4 Jul 2023 22:46:31 +0900
|
|
Subject: [PATCH] bus: Avoid to hang the process with SIGUSR1 signal
|
|
|
|
Seems multiple `Xephyr -query` to a remote GDM login session causes
|
|
to leave the some processes of ibus-daemon even if the Xephyr sessions
|
|
are terminated and the issue is caused by calling bus_server_quit()
|
|
with SIGUSR1 signal.
|
|
|
|
I cannot reproduce the issue but calling the unsafe code from a signal
|
|
handler might lead to hangs and this is another signal connection
|
|
not to hang ibus-daemon.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2499
|
|
---
|
|
bus/main.c | 11 ++++++-----
|
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/bus/main.c b/bus/main.c
|
|
index e80185b1..c4b8d651 100644
|
|
--- a/bus/main.c
|
|
+++ b/bus/main.c
|
|
@@ -2,8 +2,8 @@
|
|
/* vim:set et sts=4: */
|
|
/* ibus - The Input Bus
|
|
* Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
|
|
- * Copyright (C) 2013-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
- * Copyright (C) 2008-2018 Red Hat, Inc.
|
|
+ * Copyright (C) 2013-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
+ * Copyright (C) 2008-2023 Red Hat, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
@@ -166,11 +166,12 @@ daemon (gint nochdir, gint noclose)
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_PRCTL_H
|
|
-static void
|
|
-_sig_usr1_handler (int sig)
|
|
+static gboolean
|
|
+_on_sigusr1 (void)
|
|
{
|
|
g_warning ("The parent process died.");
|
|
bus_server_quit (FALSE);
|
|
+ return G_SOURCE_REMOVE;
|
|
}
|
|
#endif
|
|
|
|
@@ -350,7 +351,7 @@ main (gint argc, gchar **argv)
|
|
if (prctl (PR_SET_PDEATHSIG, SIGUSR1))
|
|
g_printerr ("Cannot bind SIGUSR1 for parent death\n");
|
|
else
|
|
- signal (SIGUSR1, _sig_usr1_handler);
|
|
+ g_unix_signal_add (SIGUSR1, (GSourceFunc)_on_sigusr1, NULL);
|
|
#endif
|
|
}
|
|
bus_server_run ();
|
|
--
|
|
2.41.0
|
|
|
|
From be1f1d0da86006b019aaf78781d8c0c9c68fd46d Mon Sep 17 00:00:00 2001
|
|
From: Matt Turner <mattst88@gmail.com>
|
|
Date: Wed, 5 Jul 2023 13:33:25 +0900
|
|
Subject: [PATCH 1/2] src: Fix missing ibusenumtypes.h with parallel build
|
|
|
|
When `./autogen.sh && make -C src ibusresources.c -j2` runs,
|
|
it causes a build failure due to no ibusenumtypes.h file.
|
|
|
|
The chained dependencies are:
|
|
ibusresources.c -> compose/sequences-$(ENDIAN)-endian
|
|
-> gen-internal-compose-table -> gencomposetable.c
|
|
|
|
gencomposetable.c includes ibus.h and it causes no ibusenumtypes.h with
|
|
the parallel build with multi CPUs.
|
|
|
|
ibusenumtypes.h is in BUILT_SOURCES so it is built (with other files in
|
|
BUILT_SOURCES) before any other rules.
|
|
But ibus.h is included by gencomposetable.c which is needed to generate
|
|
ibusresources.c in BUILT_SOURCES.
|
|
|
|
Since gencomposetable.c is an internal build source file and
|
|
it doesn't have to include ibus.h but can include each ibus header
|
|
files.
|
|
Deleting ibus.h in gencomposetable.c can fix the build failure.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2523
|
|
---
|
|
src/gencomposetable.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/gencomposetable.c b/src/gencomposetable.c
|
|
index 6e52d6a6..35d6ce83 100644
|
|
--- a/src/gencomposetable.c
|
|
+++ b/src/gencomposetable.c
|
|
@@ -20,7 +20,7 @@
|
|
* USA
|
|
*/
|
|
|
|
-#include <ibus.h>
|
|
+/* #2523 Should not include <ibus.h> but each IBus header file. */
|
|
#include <glib.h>
|
|
#include <glib/gstdio.h>
|
|
#include <errno.h>
|
|
--
|
|
2.41.0
|
|
|
|
From f25c48a1989be221e98b863c947e52eaf80dc4a3 Mon Sep 17 00:00:00 2001
|
|
From: Matt Turner <mattst88@gmail.com>
|
|
Date: Wed, 5 Jul 2023 13:41:33 +0900
|
|
Subject: [PATCH 2/2] src: Fix to build libibus-1.0.la twice
|
|
|
|
The purpose of autotools is to automatically handle dependencies. By
|
|
calling $(MAKE) manually and without specifying any dependencies below,
|
|
we are going out of our way to prevent automake from doing its job.
|
|
|
|
ibusunicodegen.h:
|
|
$(MAKE) $(AM_MAKEFLAGS) dicts/unicode-blocks.dict
|
|
|
|
This avoids a build error whereby libibus-1.0.la is built twice
|
|
simultaneously, races with itself, and breaks the build.
|
|
|
|
dicts/unicode-blocks.dict ibusunicodegen.h: unicode-parser
|
|
|
|
The two build targets let `make ibusunicodegen.h` try to make
|
|
`dicts/unicode-blocks.dict` and `ibusunicodegen.h` with unicode-parser.
|
|
|
|
Unlike `ibusunicodegen.h`, we cannot add `ibusemojigen.h` to the rule
|
|
that produces it (as a side-effect) because the rule is specified with
|
|
GNU Make syntax:
|
|
|
|
dicts/emoji-%.dict: emoji-parser
|
|
|
|
and doing so yields an error:
|
|
|
|
config.status: error: Something went wrong bootstrapping makefile
|
|
fragments for automatic dependency tracking. If GNU make was
|
|
not used, consider re-running the configure script with
|
|
MAKE="gmake" (or whatever is necessary). You can also try
|
|
re-running configure with the '--disable-dependency-tracking'
|
|
option to at least be able to build the package (albeit without
|
|
support for automatic dependency tracking).
|
|
|
|
So instead, add a prerequisite to the rule.
|
|
|
|
Both emoji-parser and unicode-parser has $(libibus) in LDADD
|
|
and $(libibus) is built before emoji-parser and unicode-parser are
|
|
built.
|
|
|
|
BUG=https://github.com/ibus/ibus/pull/2523
|
|
---
|
|
src/Makefile.am | 11 +++++------
|
|
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
|
index 68dde2f3..fee0b3ee 100644
|
|
--- a/src/Makefile.am
|
|
+++ b/src/Makefile.am
|
|
@@ -372,8 +372,9 @@ dicts/emoji-%.dict: emoji-parser
|
|
echo "Skip $$plus_comment $@"; \
|
|
fi;
|
|
|
|
-ibusemojigen.h:
|
|
- $(MAKE) $(AM_MAKEFLAGS) dicts/emoji-en.dict
|
|
+# #2523 Should use autotool dependency
|
|
+ibusemojigen.h: dicts/emoji-en.dict
|
|
+ $(MAKE) $(AM_MAKEFLAGS) $^
|
|
|
|
# We put dicts/emoji-%.dict as the make target for the parallel build
|
|
# and the make target has to be genarated even if the file size is zero.
|
|
@@ -424,7 +425,8 @@ dicts/unicode-names.dict: unicode-parser
|
|
echo "Generated $@"; \
|
|
fi;
|
|
|
|
-dicts/unicode-blocks.dict: unicode-parser
|
|
+# #2523 Should use autotool dependency
|
|
+dicts/unicode-blocks.dict ibusunicodegen.h: unicode-parser
|
|
$(AM_V_at)input_file="$(UCD_DIR)/Blocks.txt"; \
|
|
if test ! -f "$$input_file" ; then \
|
|
echo "WARNING: Not found $$input_file" 1>&2; \
|
|
@@ -436,9 +438,6 @@ dicts/unicode-blocks.dict: unicode-parser
|
|
echo "Generated $@"; \
|
|
fi;
|
|
|
|
-ibusunicodegen.h:
|
|
- $(MAKE) $(AM_MAKEFLAGS) dicts/unicode-blocks.dict
|
|
-
|
|
unicode_parser_SOURCES = \
|
|
unicode-parser.c \
|
|
$(parser_extra_sources) \
|
|
--
|
|
2.41.0
|
|
|