[oe] [PATCH 6/6] uim: Fixed a problem that an immodule.cache is not updated appropriately when uim-gtk2.0 or uim-gtk3 was installed.

Svein Seldal sveinse at seldal.com
Tue Aug 8 19:21:47 UTC 2017


FYI, We've had some problems building uim and anthy in our image, and we 
had to apply the patch below.

Noteable changes are:
   - Change SRC_URI, the uim.googlecode.com URL gives us a 404
   - Add PACKAGECONFIG to be able to control better which features and 
DEPENDS to include. Notibly x11, gtk3, anthy and libedit are selectable.

This patch is no way perfect and complete, but it solved the dependency 
issue we were having with anthy. Especially since we are using uim 
without x11 or gtk3. Use this as inspiration at your discression.

Best regards,
Svein Seldal


diff --git a/meta-oe/recipes-support/uim/uim_1.8.6.bb 
b/meta-oe/recipes-support/uim/uim_1.8.6.bb
index ed846b9..78da142 100644
--- a/meta-oe/recipes-support/uim/uim_1.8.6.bb
+++ b/meta-oe/recipes-support/uim/uim_1.8.6.bb
@@ -4,7 +4,8 @@ LICENSE = "BSD-3-Clause & LGPLv2+"
  LIC_FILES_CHKSUM = "file://COPYING;md5=32463fd29aa303fb2360faeeae17256b"
  SECTION = "inputmethods"

-SRC_URI = "http://uim.googlecode.com/files/uim-${PV}.tar.bz2"
+SRC_URI = 
"https://github.com/uim/uim/releases/download/${BP}/${BP}.tar.bz2 \
+          "

  SRC_URI_append_class-target = " file://uim-module-manager.patch \
      file://0001-fix-bug-for-cross-compile.patch \
@@ -13,11 +14,7 @@ SRC_URI_append_class-target = " 
file://uim-module-manager.patch \
  SRC_URI[md5sum] = "ecea4c597bab1fd4ba98ea84edcece59"
  SRC_URI[sha256sum] = 
"7b1ea803c73f3478917166f04f67cce6e45ad7ea5ab6df99b948c17eb1cb235f"

-DEPENDS = "anthy fontconfig libxft libxt glib-2.0 ncurses intltool"
-DEPENDS_class-target += "intltool-native gtk+ gtk+3 uim-native takao-fonts"
-
-RDEPENDS_uim = "libuim0 libedit"
-RDEPENDS_uim-anthy = "takao-fonts anthy libanthy0"
+DEPENDS = "fontconfig glib-2.0 ncurses intltool-native uim-native"

  LEAD_SONAME = "libuim.so.1"

@@ -30,9 +27,20 @@ EXTRA_OECONF += "--disable-emacs \
      --without-canna \
      --without-mana \
      --without-eb \
+
+PACKAGECONFIG ??= " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xft gtk3', '', d)} \
+    libedit \
+    anthy \
+"
+PACKAGECONFIG_class-native ??= "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xft', '', d)} \
  "

-CONFIGUREOPTS_remove_class-target = "--disable-silent-rules"
+PACKAGECONFIG[x11]     = ",,libxft libxt"
+PACKAGECONFIG[gtk3]    = ",--without-gtk2 --with-gtk3=no,gtk+ gtk+3"
+PACKAGECONFIG[anthy]   = 
"--with-anthy-utf8,--without-anthy,anthy,takao-fonts"
+PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"

  #Because m4 file's find maxdepth=2, so copy the m4 files of the deep 
depth.
  do_configure_prepend () {
@@ -43,6 +51,9 @@ do_install_append() {
      rm -rf ${D}/${datadir}/applications
  }

+# UIM fails with a race when installing with multiple
+PARALLEL_MAKEINST = ""
+
  PACKAGES += "uim-xim uim-utils uim-skk uim-gtk2.0 uim-gtk3 uim-fep 
uim-common uim-anthy libuim0 libuim-dev"

  FILES_${PN} = "${bindir}/uim-help \



On 08. aug. 2017 02:59, Yusuke Mitsuki wrote:
> pkg_postinst_uim-gtk2.0 is not worked. Plus, uim-gtk3 is not supported.
> oe-core has gtk-immodule-cache class for update the immodule.cache.
> Modified to use the this class instead of pkg_post_uim-gtk2.0 and added support to uim-gtk3.
> 
> Signed-off-by: Yusuke Mitsuki <mickey.happygolucky at gmail.com>
> ---
>   meta-oe/recipes-support/uim/uim_1.8.6.bb | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/uim/uim_1.8.6.bb b/meta-oe/recipes-support/uim/uim_1.8.6.bb
> index 3d6425c..6b04f6e 100644
> --- a/meta-oe/recipes-support/uim/uim_1.8.6.bb
> +++ b/meta-oe/recipes-support/uim/uim_1.8.6.bb
> @@ -21,7 +21,8 @@ RDEPENDS_uim-anthy = "takao-fonts anthy libanthy0 glibc-utils glibc-gconv-euc-jp
>   
>   LEAD_SONAME = "libuim.so.1"
>   
> -inherit autotools pkgconfig gettext qemu
> +inherit autotools pkgconfig gettext qemu gtk-immodules-cache
> +GTKIMMODULES_PACKAGES = "uim-gtk2.0 uim-gtk3"
>   
>   EXTRA_OECONF += "--disable-emacs \
>       --without-scim \
> @@ -120,10 +121,6 @@ pkg_prerm_uim-anthy() {
>       fi
>   }
>   
> -pkg_postinst_uim-gtk2.0() {
> -    gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
> -}
> -
>   pkg_postinst_uim-skk() {
>       if test -n "$D"; then
>           ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register skk --path $D${datadir}/uim
> 



More information about the Openembedded-devel mailing list