diff options
author | tsutsui <tsutsui@pkgsrc.org> | 2019-09-14 04:26:39 +0000 |
---|---|---|
committer | tsutsui <tsutsui@pkgsrc.org> | 2019-09-14 04:26:39 +0000 |
commit | 5b1c92bc3660f86a3c076ac1724f77b058f3d78d (patch) | |
tree | bd942a4bc9ca1b2f22b93522a7dbe918873d0924 /inputmethod | |
parent | 36336861d45a698379094ac01639d04012dd54c1 (diff) | |
download | pkgsrc-5b1c92bc3660f86a3c076ac1724f77b058f3d78d.tar.gz |
ibus, ibus-python: update to 1.5.21.
pkgsrc changes:
- pull upstream fixes (will appear in the next version):
- bus: Implement GDBusAuthObserver callback (to avoid #2116 conflicts)
https://github.com/ibus/ibus/commit/3d442dbf936d197aa11ca0a71663c2bc61696151
- g_dbus_server_new_sync() is failed with address unix:tmpdir=/tmp/ibus
https://github.com/ibus/ibus/issues/2116
- Save address file in XDG_RUNTIME_DIR
https://github.com/ibus/ibus/pull/2128
- explicitly pull Unicode 12.0 packages to avoid unexpected inconsistency
- drop obsolete gconf from CONFIGURE_ARGS
Upstream changes:
https://github.com/ibus/ibus/releases/tag/1.5.21
1.5.21
* Enable to run ibus-setup with a different python
* Update ibusunicodegen.h for Unicode UCD 12.0
* Fixes build issues
* Enhance tests
* Add ibus.its for IME's component files
* Make ISO 639 language names with title
* Keep preedit cursor_pos and visible in clearing preedit text
* Support long sequences and multiple output characters for compose table
* Disable panel extension for gnome-initial-setup user
* Exit ibus-daemon with parent's death
* Update Wayland input-method protocol to unstable v1
* Indistinguishable address of ibus-daemon (Gunnar Hjalmarsson)
* Update LOCALES_STRING (Hodong Kim)
* Fix typos (Changwoo Ryu)
Diffstat (limited to 'inputmethod')
-rw-r--r-- | inputmethod/ibus/Makefile | 10 | ||||
-rw-r--r-- | inputmethod/ibus/Makefile.common | 4 | ||||
-rw-r--r-- | inputmethod/ibus/PLIST | 42 | ||||
-rw-r--r-- | inputmethod/ibus/distinfo | 16 | ||||
-rw-r--r-- | inputmethod/ibus/patches/patch-bus_global.c | 31 | ||||
-rw-r--r-- | inputmethod/ibus/patches/patch-bus_server.c | 269 | ||||
-rw-r--r-- | inputmethod/ibus/patches/patch-config.h.in | 18 | ||||
-rw-r--r-- | inputmethod/ibus/patches/patch-configure | 87 | ||||
-rw-r--r-- | inputmethod/ibus/patches/patch-configure.ac | 47 | ||||
-rw-r--r-- | inputmethod/ibus/patches/patch-src_ibusshare.c | 17 |
10 files changed, 509 insertions, 32 deletions
diff --git a/inputmethod/ibus/Makefile b/inputmethod/ibus/Makefile index 3bb74d1e17c..b10a5104e5c 100644 --- a/inputmethod/ibus/Makefile +++ b/inputmethod/ibus/Makefile @@ -1,14 +1,13 @@ -# $NetBSD: Makefile,v 1.65 2019/07/21 22:25:09 wiz Exp $ +# $NetBSD: Makefile,v 1.66 2019/09/14 04:26:39 tsutsui Exp $ -PKGREVISION= 3 .include "Makefile.common" COMMENT= Intelligent Input Bus DEPENDS+= ${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3 -BUILD_DEPENDS+= cldr-emoji-annotation>=34.0.0.0:../../textproc/cldr-emoji-annotation -BUILD_DEPENDS+= unicode-character-database-[0-9]*:../../textproc/unicode-character-database -BUILD_DEPENDS+= unicode-emoji-[0-9]*:../../textproc/unicode-emoji +BUILD_DEPENDS+= cldr-emoji-annotation>=35.12.14971.0:../../textproc/cldr-emoji-annotation +BUILD_DEPENDS+= unicode-character-database>=12.0.0:../../textproc/unicode-character-database +BUILD_DEPENDS+= unicode-emoji>=12.0:../../textproc/unicode-emoji GNU_CONFIGURE= yes USE_LIBTOOL= yes @@ -24,7 +23,6 @@ PKGCONFIG_OVERRIDE+= ibus-1.0.pc.in CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASEDIR} CONFIGURE_ARGS+= --localedir=${PREFIX}/${PKGLOCALEDIR}/locale CONFIGURE_ARGS+= --enable-dconf -CONFIGURE_ARGS+= --enable-gconf CONFIGURE_ARGS+= --enable-gtk2 CONFIGURE_ARGS+= --enable-gtk3 CONFIGURE_ARGS+= --enable-surrounding-text diff --git a/inputmethod/ibus/Makefile.common b/inputmethod/ibus/Makefile.common index 27b0e53abf4..cb4d50ce7de 100644 --- a/inputmethod/ibus/Makefile.common +++ b/inputmethod/ibus/Makefile.common @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.common,v 1.14 2019/03/02 02:16:32 tsutsui Exp $ +# $NetBSD: Makefile.common,v 1.15 2019/09/14 04:26:39 tsutsui Exp $ # # used by inputmethod/ibus/Makefile # used by inputmethod/ibus-python/Makefile -DISTNAME= ibus-1.5.20 +DISTNAME= ibus-1.5.21 CATEGORIES= inputmethod MASTER_SITES= https://github.com/ibus/ibus/releases/download/${PKGVERSION_NOREV}/ diff --git a/inputmethod/ibus/PLIST b/inputmethod/ibus/PLIST index c8d5803dc0c..25d4fbb209f 100644 --- a/inputmethod/ibus/PLIST +++ b/inputmethod/ibus/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.14 2019/03/02 02:16:32 tsutsui Exp $ +@comment $NetBSD: PLIST,v 1.15 2019/09/14 04:26:39 tsutsui Exp $ bin/ibus bin/ibus-daemon bin/ibus-setup @@ -69,6 +69,8 @@ share/dbus-1/services/org.freedesktop.IBus.service share/dbus-1/services/org.freedesktop.portal.IBus.service share/examples/ibus/dconf/db/ibus.d/00-upstream-settings share/examples/ibus/dconf/profile/ibus +share/gettext/its/ibus.its +share/gettext/its/ibus.loc share/gir-1.0/IBus-1.0.gir share/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml share/gtk-doc/html/ibus/IBusAttrList.html @@ -245,33 +247,33 @@ share/ibus/keymaps/jp share/ibus/keymaps/kr share/ibus/keymaps/modifiers share/ibus/keymaps/us -share/ibus/setup/emojilang.py -share/ibus/setup/emojilang.pyc share/ibus/setup/emojilang.pyo -share/ibus/setup/engineabout.py -share/ibus/setup/engineabout.pyc +share/ibus/setup/emojilang.pyc share/ibus/setup/engineabout.pyo -share/ibus/setup/enginecombobox.py -share/ibus/setup/enginecombobox.pyc +share/ibus/setup/engineabout.pyc share/ibus/setup/enginecombobox.pyo -share/ibus/setup/enginedialog.py -share/ibus/setup/enginedialog.pyc +share/ibus/setup/enginecombobox.pyc share/ibus/setup/enginedialog.pyo -share/ibus/setup/enginetreeview.py -share/ibus/setup/enginetreeview.pyc +share/ibus/setup/enginedialog.pyc share/ibus/setup/enginetreeview.pyo -share/ibus/setup/i18n.py -share/ibus/setup/i18n.pyc +share/ibus/setup/enginetreeview.pyc share/ibus/setup/i18n.pyo -share/ibus/setup/icon.py -share/ibus/setup/icon.pyc +share/ibus/setup/i18n.pyc share/ibus/setup/icon.pyo -share/ibus/setup/keyboardshortcut.py -share/ibus/setup/keyboardshortcut.pyc +share/ibus/setup/icon.pyc share/ibus/setup/keyboardshortcut.pyo -share/ibus/setup/main.py -share/ibus/setup/main.pyc +share/ibus/setup/keyboardshortcut.pyc share/ibus/setup/main.pyo +share/ibus/setup/main.pyc +share/ibus/setup/emojilang.py +share/ibus/setup/engineabout.py +share/ibus/setup/enginecombobox.py +share/ibus/setup/enginedialog.py +share/ibus/setup/enginetreeview.py +share/ibus/setup/i18n.py +share/ibus/setup/icon.py +share/ibus/setup/keyboardshortcut.py +share/ibus/setup/main.py share/ibus/setup/setup.ui share/icons/hicolor/16x16/apps/ibus-keyboard.png share/icons/hicolor/22x22/apps/ibus-keyboard.png @@ -303,6 +305,7 @@ share/locale/he/LC_MESSAGES/ibus10.mo share/locale/hi/LC_MESSAGES/ibus10.mo share/locale/hu/LC_MESSAGES/ibus10.mo share/locale/ia/LC_MESSAGES/ibus10.mo +share/locale/id/LC_MESSAGES/ibus10.mo share/locale/it/LC_MESSAGES/ibus10.mo share/locale/ja/LC_MESSAGES/ibus10.mo share/locale/kn/LC_MESSAGES/ibus10.mo @@ -325,6 +328,7 @@ share/locale/sv/LC_MESSAGES/ibus10.mo share/locale/ta/LC_MESSAGES/ibus10.mo share/locale/te/LC_MESSAGES/ibus10.mo share/locale/tg/LC_MESSAGES/ibus10.mo +share/locale/tr/LC_MESSAGES/ibus10.mo share/locale/uk/LC_MESSAGES/ibus10.mo share/locale/ur/LC_MESSAGES/ibus10.mo share/locale/vi/LC_MESSAGES/ibus10.mo diff --git a/inputmethod/ibus/distinfo b/inputmethod/ibus/distinfo index ed87f49d54d..ffa74340cbc 100644 --- a/inputmethod/ibus/distinfo +++ b/inputmethod/ibus/distinfo @@ -1,10 +1,16 @@ -$NetBSD: distinfo,v 1.21 2019/03/02 02:16:32 tsutsui Exp $ +$NetBSD: distinfo,v 1.22 2019/09/14 04:26:39 tsutsui Exp $ -SHA1 (ibus-1.5.20.tar.gz) = 3d4e919bc9a2d4aa3e68570cf55647167c6be560 -RMD160 (ibus-1.5.20.tar.gz) = 51c290b2e52235988c0ad4831d581d884dc42f2a -SHA512 (ibus-1.5.20.tar.gz) = 2bbcc19742882fa55d9c8704251f133c5be9f36a93cf52d70c460a4713419868deb634f965e67c1d5c45b615de388b92c0fbb863b118a546fbb89370a38eb77b -Size (ibus-1.5.20.tar.gz) = 3393487 bytes +SHA1 (ibus-1.5.21.tar.gz) = 3073a6bde235e8f9e80272b7e3fc7804fde82b15 +RMD160 (ibus-1.5.21.tar.gz) = 58b0e80e4a888cbbce517ef57af1490ae22625cb +SHA512 (ibus-1.5.21.tar.gz) = c7c06e13e78fb4d4d26ce8975b6db4f7914efb325a903999a82197229e13d5ebb4afc876ef67e1d86db58f08c16350dc095aaea050b2f69c2bfc4c452adc5331 +Size (ibus-1.5.21.tar.gz) = 3463069 bytes +SHA1 (patch-bus_global.c) = e077fa736d555f4ded92c7b74c59d6cdbd4a66e0 +SHA1 (patch-bus_server.c) = 061cb3949b9a401297fa946294a325d5be6aca81 SHA1 (patch-client_gtk2_ibusimcontext.c) = 14ab1d048e3052b547ca181e098adbe3c23ab5bd SHA1 (patch-client_gtk3_ibusimcontext.c) = de369bcc2945190b1a30833be4b49f8b6d68c005 +SHA1 (patch-config.h.in) = 9e22cde5eef6b514fd43eb5835b372e1bbccb0ed +SHA1 (patch-configure) = e2da88347ce529e478d589435181df096e0ebcb9 +SHA1 (patch-configure.ac) = 01dcd2f60d16577e11ca570348876e79a314b81f +SHA1 (patch-src_ibusshare.c) = 58e1f93ed2a3f4cd2982997c87648e511441aaca SHA1 (patch-ui_gtk3_Makefile.am) = dd0c6bc9383b57c1451e4f8c96e41f7398e3e650 SHA1 (patch-ui_gtk3_Makefile.in) = 8e7391e77eefe78c69db7814df9ae536ccdc14b4 diff --git a/inputmethod/ibus/patches/patch-bus_global.c b/inputmethod/ibus/patches/patch-bus_global.c new file mode 100644 index 00000000000..a0b06e1e1bc --- /dev/null +++ b/inputmethod/ibus/patches/patch-bus_global.c @@ -0,0 +1,31 @@ +$NetBSD: patch-bus_global.c,v 1.1 2019/09/14 04:26:39 tsutsui Exp $ + +- pull upstream fix + g_dbus_server_new_sync() is failed with address unix:tmpdir=/tmp/ibus + https://github.com/ibus/ibus/issues/2116 + +--- bus/global.c.orig 2019-08-23 11:08:34.000000000 +0000 ++++ bus/global.c +@@ -2,7 +2,7 @@ + /* vim:set et sts=4: */ + /* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> +- * Copyright (C) 2008-2010 Red Hat, Inc. ++ * Copyright (C) 2008-2019 Red Hat, Inc. + * Copyright (c) 2012 Google, Inc. + * + * This library is free software; you can redistribute it and/or +@@ -21,10 +21,12 @@ + * USA + */ + ++#include <config.h> ++ + #include "global.h" + + gchar **g_argv = NULL; +-gchar *g_address = "unix:tmpdir=/tmp/ibus"; ++gchar *g_address = IBUS_SOCKET_DIR; + gchar *g_cache = "auto"; + gboolean g_mempro = FALSE; + gboolean g_verbose = FALSE; diff --git a/inputmethod/ibus/patches/patch-bus_server.c b/inputmethod/ibus/patches/patch-bus_server.c new file mode 100644 index 00000000000..fcfe2dc9560 --- /dev/null +++ b/inputmethod/ibus/patches/patch-bus_server.c @@ -0,0 +1,269 @@ +$NetBSD: patch-bus_server.c,v 1.1 2019/09/14 04:26:39 tsutsui Exp $ + +- pull upstream fixes + - g_dbus_server_new_sync() is failed with address unix:tmpdir=/tmp/ibus + https://github.com/ibus/ibus/issues/2116 + - bus: Implement GDBusAuthObserver callback + https://github.com/ibus/ibus/commit/3d442dbf936d197aa11ca0a71663c2bc61696151 + +--- bus/server.c.orig 2019-08-23 11:08:34.000000000 +0000 ++++ bus/server.c +@@ -2,7 +2,8 @@ + /* vim:set et sts=4: */ + /* bus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> +- * Copyright (C) 2008-2010 Red Hat, Inc. ++ * Copyright (C) 2011-2019 Takao Fujiwara <takao.fujiwara1@gmail.com> ++ * Copyright (C) 2008-2019 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 +@@ -21,6 +22,8 @@ + */ + #include "server.h" + ++#include <errno.h> ++#include <glib/gstdio.h> + #include <gio/gio.h> + #include <stdlib.h> + #include <string.h> +@@ -70,16 +73,63 @@ _restart_server (void) + } + + /** ++ * bus_allow_mechanism_cb: ++ * @observer: A #GDBusAuthObserver. ++ * @mechanism: The name of the mechanism. ++ * @user_data: always %NULL. ++ * ++ * Check if @mechanism can be used to authenticate the other peer. ++ * Returns: %TRUE if the peer's mechanism is allowed. ++ */ ++static gboolean ++bus_allow_mechanism_cb (GDBusAuthObserver *observer, ++ const gchar *mechanism, ++ G_GNUC_UNUSED gpointer user_data) ++{ ++ if (g_strcmp0 (mechanism, "EXTERNAL") == 0) ++ return TRUE; ++ return FALSE; ++} ++ ++/** ++ * bus_authorize_authenticated_peer_cb: ++ * @observer: A #GDBusAuthObserver. ++ * @stream: A #GIOStream. ++ * @credentials: A #GCredentials. ++ * @user_data: always %NULL. ++ * ++ * Check if a peer who has already authenticated should be authorized. ++ * Returns: %TRUE if the peer's credential is authorized. ++ */ ++static gboolean ++bus_authorize_authenticated_peer_cb (GDBusAuthObserver *observer, ++ GIOStream *stream, ++ GCredentials *credentials, ++ G_GNUC_UNUSED gpointer user_data) ++{ ++ gboolean authorized = FALSE; ++ if (credentials) { ++ GCredentials *own_credentials = g_credentials_new (); ++ if (g_credentials_is_same_user (credentials, own_credentials, NULL)) ++ authorized = TRUE; ++ g_object_unref (own_credentials); ++ } ++ return authorized; ++} ++ ++/** + * bus_new_connection_cb: +- * @user_data: always NULL. +- * @returns: TRUE when the function can handle the connection. ++ * @observer: A #GDBusAuthObserver. ++ * @dbus_connection: A #GDBusconnection. ++ * @user_data: always %NULL. + * + * Handle incoming connections. ++ * Returns: %TRUE when the function can handle the connection. + */ + static gboolean +-bus_new_connection_cb (GDBusServer *server, +- GDBusConnection *dbus_connection, +- gpointer user_data) ++bus_new_connection_cb (GDBusServer *server, ++ GDBusConnection *dbus_connection, ++ G_GNUC_UNUSED gpointer user_data) + { + BusConnection *connection = bus_connection_new (dbus_connection); + bus_dbus_impl_new_connection (dbus, connection); +@@ -94,9 +144,9 @@ bus_new_connection_cb (GDBusServer * + } + + static void +-_server_connect_start_portal_cb (GObject *source_object, +- GAsyncResult *res, +- gpointer user_data) ++_server_connect_start_portal_cb (GObject *source_object, ++ GAsyncResult *res, ++ G_GNUC_UNUSED gpointer user_data) + { + GVariant *result; + GError *error = NULL; +@@ -113,9 +163,9 @@ _server_connect_start_portal_cb (GObject + } + + static void +-bus_acquired_handler (GDBusConnection *connection, +- const gchar *name, +- gpointer user_data) ++bus_acquired_handler (GDBusConnection *connection, ++ const gchar *name, ++ G_GNUC_UNUSED gpointer user_data) + { + g_dbus_connection_call (connection, + IBUS_SERVICE_PORTAL, +@@ -132,37 +182,121 @@ bus_acquired_handler (GDBusConnection *c + NULL); + } + ++static gchar * ++_bus_extract_address (void) ++{ ++ gchar *socket_address = g_strdup (g_address); ++ gchar *p; ++ ++#define IF_REPLACE_VARIABLE_WITH_FUNC(variable, func, format) \ ++ if ((p = g_strstr_len (socket_address, -1, (variable)))) { \ ++ gchar *sub1 = g_strndup (socket_address, p - socket_address); \ ++ gchar *sub2 = g_strdup (p + strlen (variable)); \ ++ gchar *tmp = g_strdup_printf ("%s" format "%s", \ ++ sub1, (func) (), sub2); \ ++ g_free (sub1); \ ++ g_free (sub2); \ ++ g_free (socket_address); \ ++ socket_address = tmp; \ ++ } ++ ++ IF_REPLACE_VARIABLE_WITH_FUNC ("$XDG_RUNTIME_DIR", ++ g_get_user_runtime_dir, ++ "%s") ++ else ++ IF_REPLACE_VARIABLE_WITH_FUNC ("$XDG_CACHE_HOME", ++ g_get_user_cache_dir, ++ "%s") ++ else ++ IF_REPLACE_VARIABLE_WITH_FUNC ("$UID", getuid, "%d") ++ ++#undef IF_REPLACE_VARIABLE_WITH_FUNC ++ ++ return socket_address; ++} ++ + void + bus_server_init (void) + { ++#define IBUS_UNIX_TMPDIR "unix:tmpdir=" ++#define IBUS_UNIX_PATH "unix:path=" ++#define IBUS_UNIX_ABSTRACT "unix:abstract=" ++#define IBUS_UNIX_DIR "unix:dir=" ++ ++ gchar *socket_address; ++ GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_NONE; ++ gchar *guid; ++ GDBusAuthObserver *observer; + GError *error = NULL; ++ gchar *unix_dir = NULL; + + dbus = bus_dbus_impl_get_default (); + ibus = bus_ibus_impl_get_default (); + bus_dbus_impl_register_object (dbus, (IBusService *)ibus); + + /* init server */ +- GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS; +- gchar *guid = g_dbus_generate_guid (); +- if (!g_str_has_prefix (g_address, "unix:tmpdir=") && +- !g_str_has_prefix (g_address, "unix:path=")) { +- g_error ("Your socket address does not have the format unix:tmpdir=$DIR " +- "or unix:path=$FILE; %s", g_address); ++ socket_address = _bus_extract_address (); ++ ++#define IF_GET_UNIX_DIR(prefix) \ ++ if (g_str_has_prefix (socket_address, (prefix))) { \ ++ unix_dir = g_strdup (socket_address + strlen (prefix)); \ + } ++ ++ IF_GET_UNIX_DIR (IBUS_UNIX_TMPDIR) ++ else ++ IF_GET_UNIX_DIR (IBUS_UNIX_PATH) ++ else ++ IF_GET_UNIX_DIR (IBUS_UNIX_ABSTRACT) ++ else ++ IF_GET_UNIX_DIR (IBUS_UNIX_DIR) ++ else { ++ g_error ("Your socket address \"%s\" does not correspond with " ++ "one of the following formats; " ++ IBUS_UNIX_TMPDIR "DIR, " IBUS_UNIX_PATH "FILE, " ++ IBUS_UNIX_ABSTRACT "FILE, " IBUS_UNIX_DIR "DIR.", ++ socket_address); ++ } ++ if (!g_file_test (unix_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { ++ /* Require mkdir for BSD system. */ ++ if (g_mkdir_with_parents (unix_dir, 0) != 0) { ++ g_error ("mkdir is failed in: %s: %s", ++ unix_dir, g_strerror (errno)); ++ } ++ /* The mode 0700 can eliminate malicious users change the mode. ++ * `chmod` runs for the last directory only not to change the modes ++ * of the parent directories. E.g. "/tmp/ibus". ++ */ ++ if (g_chmod (unix_dir, 0700) != 0) { ++ g_error ("chmod(700) is failed in: %s: %s", ++ unix_dir, g_strerror (errno)); ++ } ++ } ++ g_free (unix_dir); ++ guid = g_dbus_generate_guid (); ++ observer = g_dbus_auth_observer_new (); + server = g_dbus_server_new_sync ( +- g_address, /* the place where the socket file lives, e.g. /tmp, abstract namespace, etc. */ ++ /* the place where the socket file lives, e.g. /tmp, ++ * abstract namespace, etc. */ ++ socket_address, + flags, guid, +- NULL /* observer */, ++ observer, + NULL /* cancellable */, + &error); + if (server == NULL) { + g_error ("g_dbus_server_new_sync() is failed with address %s " + "and guid %s: %s", +- g_address, guid, error->message); ++ socket_address, guid, error->message); + } ++ g_free (socket_address); + g_free (guid); + +- g_signal_connect (server, "new-connection", G_CALLBACK (bus_new_connection_cb), NULL); ++ g_signal_connect (observer, "allow-mechanism", ++ G_CALLBACK (bus_allow_mechanism_cb), NULL); ++ g_signal_connect (observer, "authorize-authenticated-peer", ++ G_CALLBACK (bus_authorize_authenticated_peer_cb), NULL); ++ g_object_unref (observer); ++ g_signal_connect (server, "new-connection", ++ G_CALLBACK (bus_new_connection_cb), NULL); + + g_dbus_server_start (server); + +@@ -178,6 +312,12 @@ bus_server_init (void) + G_BUS_NAME_OWNER_FLAGS_NONE, + bus_acquired_handler, + NULL, NULL, NULL, NULL); ++ ++#undef IF_GET_UNIX_DIR ++#undef IBUS_UNIX_TMPDIR ++#undef IBUS_UNIX_PATH ++#undef IBUS_UNIX_ABSTRACT ++#undef IBUS_UNIX_DIR + } + + const gchar * diff --git a/inputmethod/ibus/patches/patch-config.h.in b/inputmethod/ibus/patches/patch-config.h.in new file mode 100644 index 00000000000..9f089810149 --- /dev/null +++ b/inputmethod/ibus/patches/patch-config.h.in @@ -0,0 +1,18 @@ +$NetBSD: patch-config.h.in,v 1.1 2019/09/14 04:26:39 tsutsui Exp $ + +- pull upstream fix + g_dbus_server_new_sync() is failed with address unix:tmpdir=/tmp/ibus + https://github.com/ibus/ibus/issues/2116 + +--- config.h.in.orig 2019-08-23 11:08:50.000000000 +0000 ++++ config.h.in +@@ -73,6 +73,9 @@ + /* Define to 1 if you have the <X11/XKBlib.h> header file. */ + #undef HAVE_X11_XKBLIB_H + ++/* The default socket directory to connect ibus-daemon. */ ++#undef IBUS_SOCKET_DIR ++ + /* Define the location where the catalogs will be installed */ + #undef LOCALEDIR + diff --git a/inputmethod/ibus/patches/patch-configure b/inputmethod/ibus/patches/patch-configure new file mode 100644 index 00000000000..40bd8393514 --- /dev/null +++ b/inputmethod/ibus/patches/patch-configure @@ -0,0 +1,87 @@ +$NetBSD: patch-configure,v 1.4 2019/09/14 04:26:39 tsutsui Exp $ + +- pull upstream fix + g_dbus_server_new_sync() is failed with address unix:tmpdir=/tmp/ibus + https://github.com/ibus/ibus/issues/2116 + +--- configure.orig 2019-08-23 11:08:50.000000000 +0000 ++++ configure +@@ -1047,6 +1047,7 @@ with_unicode_emoji_dir + with_emoji_annotation_dir + enable_unicode_dict + with_ucd_dir ++with_socket_dir + ' + ac_precious_vars='build_alias + host_alias +@@ -1806,6 +1807,19 @@ Optional Packages: + "/usr/share/unicode/cldr/common/annotations") + --with-ucd-dir=DIR Set the directory of UCD (Unicode Character + Database) files. (default: "/usr/share/unicode/ucd") ++ --with-socket-dir=DIR Set the default socket directory to connect ++ ibus-daemon with D-Bus connections (default: ++ "$XDG_RUNTIME_DIR/ibus"). The best practice of the ++ socket directory would be unique per user not to ++ modify by malicious users but XDG_RUNTIME_DIR is not ++ integrated in BSD systems and the BSD's default is ++ "/tmp". "$XDG_RUMTIME_DIR", "$XDG_CACHE_HOME", ++ "$UID" are extracted by ibus-daemon. ibus-daemon ++ also runs mkdir for the socket directory since BSD ++ systems do not support abstract socket paths. The ++ socket path on a NFS mount would not be a good idea ++ likes "/home/$USER" because the directory is not ++ sometimes accessible with the network condition. + + Some influential environment variables: + CC C compiler command +@@ -4931,7 +4945,7 @@ _ACEOF + + # For dislpay date. + +-DATE_DISPLAY="Fri Aug 23 2019" ++DATE_DISPLAY="Sat Sep 14 2019" + + + +@@ -20506,6 +20520,25 @@ the UCD files from https://www.unicode.o + enable_unicode_dict="yes (enabled, use --disable-unicode-dict to disable)" + fi + ++ ++# Check whether --with-socket-dir was given. ++if test "${with_socket_dir+set}" = set; then : ++ withval=$with_socket_dir; IBUS_SOCKET_DIR=$with_socket_dir ++else ++ case $host in ++ *linux*) IBUS_SOCKET_DIR='unix:tmpdir=$XDG_RUNTIME_DIR/ibus';; ++ *) IBUS_SOCKET_DIR='unix:tmpdir=/tmp';; ++ esac ++ ++ ++fi ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define IBUS_SOCKET_DIR "$IBUS_SOCKET_DIR" ++_ACEOF ++ ++ + # Check iso-codes. + + pkg_failed=no +@@ -23270,6 +23303,7 @@ Build options: + CLDR annotation directory $EMOJI_ANNOTATION_DIR + Enable Unicode dict $enable_unicode_dict + UCD directory $UCD_DIR ++ Socket directory \"$IBUS_SOCKET_DIR\" + Run test cases $enable_tests + Install tests $enable_install_tests + " >&5 +@@ -23310,6 +23344,7 @@ Build options: + CLDR annotation directory $EMOJI_ANNOTATION_DIR + Enable Unicode dict $enable_unicode_dict + UCD directory $UCD_DIR ++ Socket directory \"$IBUS_SOCKET_DIR\" + Run test cases $enable_tests + Install tests $enable_install_tests + " >&6; } diff --git a/inputmethod/ibus/patches/patch-configure.ac b/inputmethod/ibus/patches/patch-configure.ac new file mode 100644 index 00000000000..69badd0046b --- /dev/null +++ b/inputmethod/ibus/patches/patch-configure.ac @@ -0,0 +1,47 @@ +$NetBSD: patch-configure.ac,v 1.1 2019/09/14 04:26:39 tsutsui Exp $ + +- pull upstream fix + g_dbus_server_new_sync() is failed with address unix:tmpdir=/tmp/ibus + https://github.com/ibus/ibus/issues/2116 + +--- configure.ac.orig 2019-08-23 11:08:34.000000000 +0000 ++++ configure.ac +@@ -702,6 +702,30 @@ the UCD files from https://www.unicode.o + enable_unicode_dict="yes (enabled, use --disable-unicode-dict to disable)" + fi + ++AC_ARG_WITH(socket-dir, ++ AS_HELP_STRING([--with-socket-dir[=DIR]], ++ [Set the default socket directory to connect ibus-daemon with D-Bus ++ connections (default: "$XDG_RUNTIME_DIR/ibus"). ++ The best practice of the socket directory would be unique per user ++ not to modify by malicious users but XDG_RUNTIME_DIR is not integrated ++ in BSD systems and the BSD's default is "/tmp". ++ "$XDG_RUMTIME_DIR", "$XDG_CACHE_HOME", "$UID" are extracted by ++ ibus-daemon. ++ ibus-daemon also runs mkdir for the socket directory since BSD ++ systems do not support abstract socket paths. ++ The socket path on a NFS mount would not be a good idea likes ++ "/home/$USER" because the directory is not sometimes accessible ++ with the network condition.]), ++ [IBUS_SOCKET_DIR=$with_socket_dir], ++ [case $host in ++ *linux*) IBUS_SOCKET_DIR='unix:tmpdir=$XDG_RUNTIME_DIR/ibus';; ++ *) IBUS_SOCKET_DIR='unix:tmpdir=/tmp';; ++ esac] ++ ++) ++AC_DEFINE_UNQUOTED(IBUS_SOCKET_DIR, "$IBUS_SOCKET_DIR", ++ [The default socket directory to connect ibus-daemon.]) ++ + # Check iso-codes. + PKG_CHECK_MODULES(ISOCODES, [ + iso-codes +@@ -793,6 +817,7 @@ Build options: + CLDR annotation directory $EMOJI_ANNOTATION_DIR + Enable Unicode dict $enable_unicode_dict + UCD directory $UCD_DIR ++ Socket directory "$IBUS_SOCKET_DIR" + Run test cases $enable_tests + Install tests $enable_install_tests + ]) diff --git a/inputmethod/ibus/patches/patch-src_ibusshare.c b/inputmethod/ibus/patches/patch-src_ibusshare.c new file mode 100644 index 00000000000..8d5540c7e61 --- /dev/null +++ b/inputmethod/ibus/patches/patch-src_ibusshare.c @@ -0,0 +1,17 @@ +$NetBSD: patch-src_ibusshare.c,v 1.1 2019/09/14 04:26:39 tsutsui Exp $ + +- pull upstream fix + Save address file in XDG_RUNTIME_DIR + https://github.com/ibus/ibus/pull/2128 + +--- src/ibusshare.c.orig 2019-08-23 11:08:34.000000000 +0000 ++++ src/ibusshare.c +@@ -142,7 +142,7 @@ ibus_get_socket_path (void) + ibus_get_local_machine_id (), + hostname, + displaynumber); +- path = g_build_filename (g_get_user_config_dir (), ++ path = g_build_filename (g_get_user_runtime_dir (), + "ibus", + "bus", + p, |