Patchwork [meta-oe] maliit-framework: fix for Qt based applications

login
register
mail settings
Submitter Samuel Stirtzel
Date March 7, 2013, 2:56 p.m.
Message ID <1362668200-16189-1-git-send-email-s.stirtzel@googlemail.com>
Download mbox | patch
Permalink /patch/45653/
State Changes Requested, archived
Headers show

Comments

Samuel Stirtzel - March 7, 2013, 2:56 p.m.
Previously Qt based applications did not trigger the Maliit virtual keyboard
The Qt inputmethod plugin could not be loaded because it did not link to libmaliit-1.0.so
It is also necessary to set the Qt default input method to "Maliit"

Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>
---
 ...k-to-libmaliit-1-0-in-inputcontext-plugin.patch |   23 ++++++++++++++++++++
 .../recipes-support/maliit/maliit-framework_git.bb |   13 +++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
Martin Jansa - March 7, 2013, 3:20 p.m.
On Thu, Mar 07, 2013 at 03:56:39PM +0100, Samuel Stirtzel wrote:
> Previously Qt based applications did not trigger the Maliit virtual keyboard
> The Qt inputmethod plugin could not be loaded because it did not link to libmaliit-1.0.so
> It is also necessary to set the Qt default input method to "Maliit"
> 
> Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>
> ---
>  ...k-to-libmaliit-1-0-in-inputcontext-plugin.patch |   23 ++++++++++++++++++++
>  .../recipes-support/maliit/maliit-framework_git.bb |   13 +++++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
> 
> diff --git a/meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch b/meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
> new file mode 100644
> index 0000000..749ddbe
> --- /dev/null
> +++ b/meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
> @@ -0,0 +1,23 @@
> +From cc33efdedbec9e9a55e9a0c6756516fd84d42e53 Mon Sep 17 00:00:00 2001
> +From: Samuel Stirtzel <s.stirtzel@googlemail.com>
> +Date: Fri, 1 Mar 2013 11:31:41 +0100
> +Subject: [PATCH] Link to libmaliit-1,0 in inputcontext plugin
> +
> +Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>
> +---
> + .../input-context-plugin/input-context-plugin.pro  |    2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/input-context/input-context-plugin/input-context-plugin.pro b/input-context/input-context-plugin/input-context-plugin.pro
> +index eefbe93..296e2fa 100644
> +--- a/input-context/input-context-plugin/input-context-plugin.pro
> ++++ b/input-context/input-context-plugin/input-context-plugin.pro
> +@@ -15,3 +15,5 @@ CONFIG += plugin
> + 
> + INSTALLS    += target
> + target.path += $$QT_IM_PLUGIN_PATH
> ++
> ++LIBS += -L../../lib -l"maliit-1.0"
> +-- 
> +1.7.9.5
> +
> diff --git a/meta-oe/recipes-support/maliit/maliit-framework_git.bb b/meta-oe/recipes-support/maliit/maliit-framework_git.bb
> index a164e78..91e79ac 100644
> --- a/meta-oe/recipes-support/maliit/maliit-framework_git.bb
> +++ b/meta-oe/recipes-support/maliit/maliit-framework_git.bb
> @@ -10,6 +10,7 @@ inherit autotools qt4x11 gtk-immodules-cache
>  SRC_URI = "git://gitorious.org/maliit/maliit-framework.git;branch=master \
>      file://0001-Fix-MALIIT_INSTALL_PRF-to-allow-the-build-with-opene.patch \
>      file://0001-Fix-QT_IM_PLUGIN_PATH-to-allow-openembedded-to-build.patch \
> +    file://0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch \
>      "
>  
>  SRCREV = "750842dec74a9b17dca91ef779c4fc5a43c4d9dc"
> @@ -65,4 +66,16 @@ do_install_append() {
>      sed -i -e "s|/usr|${STAGING_DIR_TARGET}${prefix}|" ${D}/${datadir}/qt4/mkspecs/features/maliit-plugins.prf
>  }
>  
> +pkg_postinst_${PN} () {
> +#!/bin/sh
> +#can run online and offline
> +echo "EXPORT QT_IM_MODULE=Maliit" >> ${D}/etc/profile

IIRC this needs to be $D
otherwise it's expanded by bitbake and you get path to your ${D} on
target.

Same for postrm

> +}
> +
> +pkg_postrm_${PN} () {
> +#!/bin/sh
> +#can run online and offline
> +sed -i "/EXPORT QT_IM_MODULE=Maliit/d" ${D}/etc/profile
> +}
> +
>  S= "${WORKDIR}/git"
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Samuel Stirtzel - March 7, 2013, 3:25 p.m.
2013/3/7 Martin Jansa <martin.jansa@gmail.com>:
> On Thu, Mar 07, 2013 at 03:56:39PM +0100, Samuel Stirtzel wrote:
>> +pkg_postinst_${PN} () {
>> +#!/bin/sh
>> +#can run online and offline
>> +echo "EXPORT QT_IM_MODULE=Maliit" >> ${D}/etc/profile
>
> IIRC this needs to be $D
> otherwise it's expanded by bitbake and you get path to your ${D} on
> target.
>
> Same for postrm
>

Yes you are right, V2 is coming.

Patch

diff --git a/meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch b/meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
new file mode 100644
index 0000000..749ddbe
--- /dev/null
+++ b/meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
@@ -0,0 +1,23 @@ 
+From cc33efdedbec9e9a55e9a0c6756516fd84d42e53 Mon Sep 17 00:00:00 2001
+From: Samuel Stirtzel <s.stirtzel@googlemail.com>
+Date: Fri, 1 Mar 2013 11:31:41 +0100
+Subject: [PATCH] Link to libmaliit-1,0 in inputcontext plugin
+
+Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>
+---
+ .../input-context-plugin/input-context-plugin.pro  |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/input-context/input-context-plugin/input-context-plugin.pro b/input-context/input-context-plugin/input-context-plugin.pro
+index eefbe93..296e2fa 100644
+--- a/input-context/input-context-plugin/input-context-plugin.pro
++++ b/input-context/input-context-plugin/input-context-plugin.pro
+@@ -15,3 +15,5 @@ CONFIG += plugin
+ 
+ INSTALLS    += target
+ target.path += $$QT_IM_PLUGIN_PATH
++
++LIBS += -L../../lib -l"maliit-1.0"
+-- 
+1.7.9.5
+
diff --git a/meta-oe/recipes-support/maliit/maliit-framework_git.bb b/meta-oe/recipes-support/maliit/maliit-framework_git.bb
index a164e78..91e79ac 100644
--- a/meta-oe/recipes-support/maliit/maliit-framework_git.bb
+++ b/meta-oe/recipes-support/maliit/maliit-framework_git.bb
@@ -10,6 +10,7 @@  inherit autotools qt4x11 gtk-immodules-cache
 SRC_URI = "git://gitorious.org/maliit/maliit-framework.git;branch=master \
     file://0001-Fix-MALIIT_INSTALL_PRF-to-allow-the-build-with-opene.patch \
     file://0001-Fix-QT_IM_PLUGIN_PATH-to-allow-openembedded-to-build.patch \
+    file://0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch \
     "
 
 SRCREV = "750842dec74a9b17dca91ef779c4fc5a43c4d9dc"
@@ -65,4 +66,16 @@  do_install_append() {
     sed -i -e "s|/usr|${STAGING_DIR_TARGET}${prefix}|" ${D}/${datadir}/qt4/mkspecs/features/maliit-plugins.prf
 }
 
+pkg_postinst_${PN} () {
+#!/bin/sh
+#can run online and offline
+echo "EXPORT QT_IM_MODULE=Maliit" >> ${D}/etc/profile
+}
+
+pkg_postrm_${PN} () {
+#!/bin/sh
+#can run online and offline
+sed -i "/EXPORT QT_IM_MODULE=Maliit/d" ${D}/etc/profile
+}
+
 S= "${WORKDIR}/git"