Skip to contentSkip to conversation

maliit-framework: fix for Qt applications

PATCH New Samuel Stirtzel 1 participant 2 messages Apr 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 maliit-framework: fix for Qt applications

fixes a linking issue and also sets the required variable for X based programms

---
 ...k-to-libmaliit-1-0-in-inputcontext-plugin.patch |   23 +++++++++++++++++++
 .../recipes-support/maliit/maliit-framework_git.bb |   24 +++++++++++++++++++-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch
meta-oe/recipes-support/maliit/maliit-framework/0001-Link-to-libmaliit-1-0-in-inputcontext-plugin.patch new file +23 -0
new file mode 100644
index 0000000..c2291c6
@@ -0,0 +1,23 @@
+From cc33efdedbec9e9a55e9a0c6756516fd84d42e53 Mon Sep 17 00:00:00 2001
+From: Samuel Stirtzel <[email protected]>
+Date: Fri, 1 Mar 2013 11:31:41 +0100
+Subject: [PATCH] Link to libmaliit-1,0 in inputcontext plugin
+
+Signed-off-by: Samuel Stirtzel <[email protected]>
+---
+ .../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
+
meta-oe/recipes-support/maliit/maliit-framework_git.bb +23 -1
index a164e78..e61cca0 100644
@@ -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,25 @@ do_install_append() {
     sed -i -e "s|/usr|${STAGING_DIR_TARGET}${prefix}|" ${D}/${datadir}/qt4/mkspecs/features/maliit-plugins.prf
 }
 
-S= "${WORKDIR}/git"
+pkg_postinst_${PN} () {
+#!/bin/sh
+# should run online
+if [ "x$D" != "x" ]; then
+    exit 1
+fi
+echo "export QT_IM_MODULE=Maliit" >> /etc/xprofile
+}
+
+pkg_postrm_${PN} () {
+#!/bin/sh
+# should run online
+if [ "x$D" = "x" ]; then
+    exit 1
+fi
+if [ -e "/etc/xprofile" ]; then
+    sed -i -e "g|export QT_IM_MODULE=Maliit|d" /etc/xprofile
+fi
+
+}
+
+S = "${WORKDIR}/git"
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 maliit-framework: enable autostart

maliit-server will start via xdg autostart

---
 .../maliit/maliit-framework/maliit-server.desktop  |    6 ++++++
 .../recipes-support/maliit/maliit-framework_git.bb |    8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/maliit/maliit-framework/maliit-server.desktop
meta-oe/recipes-support/maliit/maliit-framework/maliit-server.desktop new file +6 -0
new file mode 100644
index 0000000..24bdf9b
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Maliit server
+Exec=/usr/bin/maliit-server
+Icon=
+Type=Application
+Categories=Utility;
meta-oe/recipes-support/maliit/maliit-framework_git.bb +7 -1
index e61cca0..2c4b0f8 100644
@@ -11,6 +11,7 @@ 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 \
+    file://maliit-server.desktop \
     "
 
 SRCREV = "750842dec74a9b17dca91ef779c4fc5a43c4d9dc"
@@ -28,6 +29,7 @@ RRECOMMENDS_${PN} = "maliit-plugins"
 FILES_${PN} += "\
     ${libdir}/maliit/plugins-*/factories/libmaliit-plugins-quick-factory-*.so \
     ${libdir}/qt4/plugins/inputmethods/*.so \
+    ${datadir}/applications/maliit-server.desktop \
     "
 
 FILES_${PN}-dbg += "\
@@ -64,6 +66,9 @@ do_install_append() {
     #Fix absolute paths
     sed -i -e "s|/usr|${STAGING_DIR_TARGET}${prefix}|" ${D}/${datadir}/qt4/mkspecs/features/maliit-framework.prf
     sed -i -e "s|/usr|${STAGING_DIR_TARGET}${prefix}|" ${D}/${datadir}/qt4/mkspecs/features/maliit-plugins.prf
+
+    install -d ${D}${datadir}/applications
+    install -m 644 ${WORKDIR}/maliit-server.desktop ${D}${datadir}/applications
 }
 
 pkg_postinst_${PN} () {
@@ -73,6 +78,7 @@ if [ "x$D" != "x" ]; then
     exit 1
 fi
 echo "export QT_IM_MODULE=Maliit" >> /etc/xprofile
+ln -s /usr/share/applications/maliit-server.desktop /etc/xdg/autostart/maliit-server.desktop
 }
 
 pkg_postrm_${PN} () {
@@ -84,7 +90,7 @@ fi
 if [ -e "/etc/xprofile" ]; then
     sed -i -e "g|export QT_IM_MODULE=Maliit|d" /etc/xprofile
 fi
-
+rm -f /etc/xdg/autostart/maliit-server.desktop
 }
 
 S = "${WORKDIR}/git"
Signature · 1 line
1.7.9.5