[arch-commits] Commit in xfce4-settings/trunk (PKGBUILD libxi.patch)
andyrtr at archlinux.org
andyrtr at archlinux.org
Mon Nov 2 22:08:02 UTC 2009
Date: Monday, November 2, 2009 @ 17:08:01
Author: andyrtr
Revision: 57950
upgpkg: xfce4-settings 4.6.3-3
fix 16634, to work with new libxi
Added:
xfce4-settings/trunk/libxi.patch
Modified:
xfce4-settings/trunk/PKGBUILD
-------------+
PKGBUILD | 10 +++--
libxi.patch | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 113 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-11-02 22:07:50 UTC (rev 57949)
+++ PKGBUILD 2009-11-02 22:08:01 UTC (rev 57950)
@@ -4,7 +4,7 @@
pkgname=xfce4-settings
pkgver=4.6.3
-pkgrel=2
+pkgrel=3
pkgdesc="Settings manager for xfce"
arch=('i686' 'x86_64')
license=('GPL2')
@@ -15,11 +15,15 @@
optdepends=('libcanberra: for sound control')
conflicts=('xfce-mcs-manager')
replaces=('xfce-mcs-manager')
-source=( http://archive.xfce.org/src/xfce/${pkgname}/4.6/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('60e726143baf0605f6ee8b158d536ed0')
+source=( http://archive.xfce.org/src/xfce/${pkgname}/4.6/${pkgname}-${pkgver}.tar.bz2 libxi.patch)
+md5sums=('60e726143baf0605f6ee8b158d536ed0'
+ '8353faed197134e5815c1131ab26dc57')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
+ # http://bugs.archlinux.org/task/16634
+ # http://git.xfce.org/xfce/xfce4-settings/patch/?id=041cb4450d1d7c525c3fde20c38e293665619bd3
+ patch -Np1 -i ${srcdir}/libxi.patch || return 1
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--disable-static --enable-libxklavier --enable-sound-settings || return 1
make || return 1
Added: libxi.patch
===================================================================
--- libxi.patch (rev 0)
+++ libxi.patch 2009-11-02 22:08:01 UTC (rev 57950)
@@ -0,0 +1,106 @@
+From 041cb4450d1d7c525c3fde20c38e293665619bd3 Mon Sep 17 00:00:00 2001
+From: Nick Schermer <nick at xfce.org>
+Date: Sun, 11 Oct 2009 12:02:05 +0000
+Subject: Fix the check for Xi so it does not fail with Xi2 (bug #4929).
+
+---
+diff --git a/dialogs/mouse-settings/main.c b/dialogs/mouse-settings/main.c
+index dc5604d..6edddac 100644
+--- a/dialogs/mouse-settings/main.c
++++ b/dialogs/mouse-settings/main.c
+@@ -60,6 +60,10 @@
+ #define IsXExtensionPointer 4
+ #endif
+
++/* Xi 1.4 is required */
++#define MIN_XI_VERS_MAJOR 1
++#define MIN_XI_VERS_MINOR 4
++
+ /* settings */
+ #ifdef HAVE_XCURSOR
+ #define PREVIEW_ROWS (3)
+@@ -1221,13 +1225,21 @@ main (gint argc, gchar **argv)
+
+ return EXIT_FAILURE;
+ }
+-
+- /* check for Xi 1.4 */
++
++ /* check for Xi */
+ version = XGetExtensionVersion (GDK_DISPLAY (), INAME);
+- if (!version || !version->present || version->major_version < 1 || version->minor_version < 4)
++ if (version == NULL || !version->present)
++ {
++ g_critical ("XI is not present.");
++ return EXIT_FAILURE;
++ }
++ else if (version->major_version < MIN_XI_VERS_MAJOR
++ || (version->major_version == MIN_XI_VERS_MAJOR
++ && version->minor_version < MIN_XI_VERS_MINOR))
+ {
+- g_critical ("XI is not present or too old.");
+-
++ g_critical ("Your XI is too old (%d.%d) version %d.%d is required.",
++ version->major_version, version->minor_version,
++ MIN_XI_VERS_MAJOR, MIN_XI_VERS_MINOR);
+ return EXIT_FAILURE;
+ }
+
+diff --git a/xfce4-settings-helper/pointers.c b/xfce4-settings-helper/pointers.c
+index 6dd2cd4..b8718ba 100644
+--- a/xfce4-settings-helper/pointers.c
++++ b/xfce4-settings-helper/pointers.c
+@@ -42,6 +42,10 @@
+
+ #define MAX_DENOMINATOR (100.00)
+
++/* Xi 1.4 is required */
++#define MIN_XI_VERS_MAJOR 1
++#define MIN_XI_VERS_MINOR 4
++
+ /* test if the required version of inputproto (1.4.2) is available */
+ #if XI_Add_DevicePresenceNotify_Major >= 1 && defined (DeviceRemoved)
+ #define HAS_DEVICE_HOTPLUGGING
+@@ -133,18 +137,22 @@ xfce_pointers_helper_init (XfcePointersHelper *helper)
+
+ /* get the default display */
+ xdisplay = gdk_x11_display_get_xdisplay (gdk_display_get_default ());
+-
++
+ /* query the extension version */
+ version = XGetExtensionVersion (xdisplay, INAME);
+-
+- /* check for Xi 1.4 */
+- if (!version || !version->present || version->major_version < 1 || version->minor_version < 4)
+- {
+- /* print error */
+- g_critical ("XI is not present or too old.");
+
+- /* no channel */
+- helper->channel = NULL;
++ /* check for Xi */
++ if (version == NULL || !version->present)
++ {
++ g_critical ("XI is not present.");
++ }
++ else if (version->major_version < MIN_XI_VERS_MAJOR
++ || (version->major_version == MIN_XI_VERS_MAJOR
++ && version->minor_version < MIN_XI_VERS_MINOR))
++ {
++ g_critical ("Your XI is too old (%d.%d) version %d.%d is required.",
++ version->major_version, version->minor_version,
++ MIN_XI_VERS_MAJOR, MIN_XI_VERS_MINOR);
+ }
+ else
+ {
+@@ -162,7 +170,7 @@ xfce_pointers_helper_init (XfcePointersHelper *helper)
+ gdk_flush ();
+ gdk_error_trap_push ();
+
+-
++
+ if (G_LIKELY (xdisplay))
+ {
+ /* monitor device changes */
+--
+cgit v0.8.2.1
More information about the arch-commits
mailing list