summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-i18n/ibus-qt')
-rw-r--r--app-i18n/ibus-qt/ChangeLog7
-rw-r--r--app-i18n/ibus-qt/files/ibus-qt-1.3.1-display-unset.patch76
-rw-r--r--app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild5
3 files changed, 84 insertions, 4 deletions
diff --git a/app-i18n/ibus-qt/ChangeLog b/app-i18n/ibus-qt/ChangeLog
index 915148330d0b..4ffeb77eddd5 100644
--- a/app-i18n/ibus-qt/ChangeLog
+++ b/app-i18n/ibus-qt/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-i18n/ibus-qt
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-qt/ChangeLog,v 1.14 2012/05/03 19:24:31 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-qt/ChangeLog,v 1.15 2012/10/25 15:50:17 naota Exp $
+
+ 25 Oct 2012; <naota@gentoo.org> +files/ibus-qt-1.3.1-display-unset.patch,
+ ibus-qt-1.3.0.ebuild, ibus-qt-1.3.1.ebuild:
+ Add upstream patch to avoid crash when DISPLAY is unset. #439134
03 May 2012; Jeff Horelick <jdhore@gentoo.org> ibus-qt-1.2.0.20091216.ebuild,
ibus-qt-1.2.0.20091217.ebuild, ibus-qt-1.3.0.ebuild, ibus-qt-1.3.1.ebuild:
@@ -67,4 +71,3 @@
24 Aug 2009; MATSUU Takuto <matsuu@gentoo.org>
+ibus-qt-1.2.0.20090822.ebuild, +metadata.xml:
Initial import.
-
diff --git a/app-i18n/ibus-qt/files/ibus-qt-1.3.1-display-unset.patch b/app-i18n/ibus-qt/files/ibus-qt-1.3.1-display-unset.patch
new file mode 100644
index 000000000000..8325779282f4
--- /dev/null
+++ b/app-i18n/ibus-qt/files/ibus-qt-1.3.1-display-unset.patch
@@ -0,0 +1,76 @@
+From d2a4e30fdb92aeaf476dcaaf2b5d6f8275d6af70 Mon Sep 17 00:00:00 2001
+From: Peter Wu <lekensteyn@gmail.com>
+Date: Tue, 4 Sep 2012 19:40:08 +0200
+Subject: [PATCH] Do not crash on missing/invalid DISPLAY envvar.
+
+- Check whether the passed DISPLAY environment variable contains ":".
+
+- Fallback to "-display" parameter passed to QApplication.
+---
+ src/CMakeLists.txt | 2 ++
+ src/qibusbus.cpp | 23 ++++++++++++++++-------
+ 2 files changed, 18 insertions(+), 7 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 2ad5588..8866ac0 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -92,9 +92,11 @@ set_target_properties(
+ target_link_libraries(
+ ibus-qt
+ debug ${QT_QTCORE_LIBRARY_DEBUG}
++ debug ${QT_QTGUI_LIBRARY_DEBUG}
+ debug ${QT_QTDBUS_LIBRARY_DEBUG}
+ debug ${QT_QTXML_LIBRARY_DEBUG}
+ optimized ${QT_QTCORE_LIBRARY_RELEASE}
++ optimized ${QT_QTGUI_LIBRARY_RELEASE}
+ optimized ${QT_QTDBUS_LIBRARY_RELEASE}
+ optimized ${QT_QTXML_LIBRARY_RELEASE}
+ ${DBUS_LIBRARIES}
+diff --git a/src/qibusbus.cpp b/src/qibusbus.cpp
+index 6a45d65..ed8248a 100644
+--- a/src/qibusbus.cpp
++++ b/src/qibusbus.cpp
+@@ -12,7 +12,8 @@
+ #include "qibusbus.h"
+ #include "qibusibusproxy.h"
+ #include "qibusdbusproxy.h"
+-
++#include <X11/Xlib.h>
++#include <QX11Info>
+
+ namespace IBus {
+ /**
+@@ -121,15 +122,23 @@
+ Bus::getSocketPath (void)
+ {
+ QString display = getenv ("DISPLAY");
+- QStringList strs = display.split(":");
+ QString hostname = "unix";
+ QString display_number = "0";
++ /* fallback when -display is passed to QApplication with no DISPLAY env */
++ if (display == NULL) {
++ Display * dpy = QX11Info::display();
++ if (dpy)
++ display = XDisplayString(dpy);
++ }
++ if (display != NULL && display.contains(':')) {
++ QStringList strs = display.split(":");
+
+- if (!strs[0].isEmpty())
+- hostname = strs[0];
+- strs = strs[1].split(".");
+- if (!strs[0].isEmpty())
+- display_number = strs[0];
++ if (!strs[0].isEmpty())
++ hostname = strs[0];
++ strs = strs[1].split(".");
++ if (!strs[0].isEmpty())
++ display_number = strs[0];
++ }
+
+ QString path =
+ QDir::homePath() +
+--
+1.7.10
+
diff --git a/app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild b/app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild
index f7aee0df4c6b..fb4acd0801f9 100644
--- a/app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild
+++ b/app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild,v 1.4 2012/05/03 19:24:31 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus-qt/ibus-qt-1.3.1.ebuild,v 1.5 2012/10/25 15:50:17 naota Exp $
EAPI="2"
inherit cmake-utils eutils multilib
@@ -33,7 +33,8 @@ DOCS="AUTHORS README TODO"
mycmakeargs="-DLIBDIR=$(get_libdir) -DDOCDIR=/usr/share/doc/${PF} all"
src_prepare() {
- epatch "${FILESDIR}/${PN}-1.2.0.20091217-doc.patch"
+ epatch "${FILESDIR}/${PN}-1.2.0.20091217-doc.patch" \
+ "${FILESDIR}"/${PN}-1.3.1-display-unset.patch
}
src_compile() {