[arch-commits] Commit in ibus-qt/repos (6 files)

Felix Yan fyan at nymeria.archlinux.org
Tue Feb 19 05:57:00 UTC 2013


    Date: Tuesday, February 19, 2013 @ 06:57:00
  Author: fyan
Revision: 84473

archrelease: copy trunk to community-staging-i686, community-staging-x86_64

Added:
  ibus-qt/repos/community-staging-i686/
  ibus-qt/repos/community-staging-i686/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch
    (from rev 84472, ibus-qt/trunk/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch)
  ibus-qt/repos/community-staging-i686/PKGBUILD
    (from rev 84472, ibus-qt/trunk/PKGBUILD)
  ibus-qt/repos/community-staging-x86_64/
  ibus-qt/repos/community-staging-x86_64/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch
    (from rev 84472, ibus-qt/trunk/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch)
  ibus-qt/repos/community-staging-x86_64/PKGBUILD
    (from rev 84472, ibus-qt/trunk/PKGBUILD)

------------------------------------------------------------------------------------+
 community-staging-i686/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch   |   75 ++++++++++
 community-staging-i686/PKGBUILD                                                    |   35 ++++
 community-staging-x86_64/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch |   75 ++++++++++
 community-staging-x86_64/PKGBUILD                                                  |   35 ++++
 4 files changed, 220 insertions(+)

Copied: ibus-qt/repos/community-staging-i686/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch (from rev 84472, ibus-qt/trunk/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch)
===================================================================
--- community-staging-i686/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch	                        (rev 0)
+++ community-staging-i686/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch	2013-02-19 05:57:00 UTC (rev 84473)
@@ -0,0 +1,75 @@
+From fab6dc760edc39b9b4e561cfbf21b38c4fa86234 Mon Sep 17 00:00:00 2001
+From: Peter Wu <lekensteyn at 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 @@ QString
+ 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.12

Copied: ibus-qt/repos/community-staging-i686/PKGBUILD (from rev 84472, ibus-qt/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2013-02-19 05:57:00 UTC (rev 84473)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: garion < garion @ mailoo.org >
+# Contributor: leemars
+
+pkgname=ibus-qt
+pkgver=1.3.1
+pkgrel=8
+pkgdesc='IBus qt library and IBus qt input method plugin'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://ibus.googlecode.com'
+depends=('qt4' 'ibus' 'icu')
+makedepends=('cmake' 'automoc4' 'doxygen')
+source=("http://ibus.googlecode.com/files/${pkgname}-${pkgver}-Source.tar.gz"
+	0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch)
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}-Source"
+  patch -p1 -i ../0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch
+
+  mkdir build
+  cd build
+  
+  cmake .. -DCMAKE_INSTALL_PREFIX=/usr
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}-Source/build"
+  make DESTDIR="${pkgdir}" install
+}
+md5sums=('769e8872ca8a59327b2073ce2f142589'
+         'c30f52b1a9018132e5ecd0c14616cb65')

Copied: ibus-qt/repos/community-staging-x86_64/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch (from rev 84472, ibus-qt/trunk/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch)
===================================================================
--- community-staging-x86_64/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch	                        (rev 0)
+++ community-staging-x86_64/0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch	2013-02-19 05:57:00 UTC (rev 84473)
@@ -0,0 +1,75 @@
+From fab6dc760edc39b9b4e561cfbf21b38c4fa86234 Mon Sep 17 00:00:00 2001
+From: Peter Wu <lekensteyn at 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 @@ QString
+ 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.12

Copied: ibus-qt/repos/community-staging-x86_64/PKGBUILD (from rev 84472, ibus-qt/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2013-02-19 05:57:00 UTC (rev 84473)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: garion < garion @ mailoo.org >
+# Contributor: leemars
+
+pkgname=ibus-qt
+pkgver=1.3.1
+pkgrel=8
+pkgdesc='IBus qt library and IBus qt input method plugin'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://ibus.googlecode.com'
+depends=('qt4' 'ibus' 'icu')
+makedepends=('cmake' 'automoc4' 'doxygen')
+source=("http://ibus.googlecode.com/files/${pkgname}-${pkgver}-Source.tar.gz"
+	0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch)
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}-Source"
+  patch -p1 -i ../0001-Do-not-crash-on-missing-invalid-DISPLAY-envvar.patch
+
+  mkdir build
+  cd build
+  
+  cmake .. -DCMAKE_INSTALL_PREFIX=/usr
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}-Source/build"
+  make DESTDIR="${pkgdir}" install
+}
+md5sums=('769e8872ca8a59327b2073ce2f142589'
+         'c30f52b1a9018132e5ecd0c14616cb65')




More information about the arch-commits mailing list