[Pkg-xfce-commits] r1500 - in desktop/trunk/xfce-mcs-plugins/debian: . patches

huggie at alioth.debian.org huggie at alioth.debian.org
Thu Dec 20 13:37:24 UTC 2007


Author: huggie
Date: 2007-12-20 13:37:24 +0000 (Thu, 20 Dec 2007)
New Revision: 1500

Added:
   desktop/trunk/xfce-mcs-plugins/debian/patches/
   desktop/trunk/xfce-mcs-plugins/debian/patches/00list
   desktop/trunk/xfce-mcs-plugins/debian/patches/01_mouse_plugin_memory_fix.dpatch
Modified:
   desktop/trunk/xfce-mcs-plugins/debian/changelog
   desktop/trunk/xfce-mcs-plugins/debian/control
   desktop/trunk/xfce-mcs-plugins/debian/rules
Log:
Apply mouse_plugin_memory_fix patch and add dpatch to build-dep/rules etc.


Modified: desktop/trunk/xfce-mcs-plugins/debian/changelog
===================================================================
--- desktop/trunk/xfce-mcs-plugins/debian/changelog	2007-12-20 13:01:25 UTC (rev 1499)
+++ desktop/trunk/xfce-mcs-plugins/debian/changelog	2007-12-20 13:37:24 UTC (rev 1500)
@@ -1,3 +1,10 @@
+xfce-mcs-plugins (4.4.2-2) UNRELEASED; urgency=low
+
+  * Add patch to fix mouse_plugin crash from
+    http://bugzilla.xfce.org/show_bug.cgi?id=3753
+
+ -- Simon Huggins <huggie at earth.li>  Thu, 20 Dec 2007 13:08:40 +0000
+
 xfce-mcs-plugins (4.4.2-1) unstable; urgency=low
 
   [ Simon Huggins ]

Modified: desktop/trunk/xfce-mcs-plugins/debian/control
===================================================================
--- desktop/trunk/xfce-mcs-plugins/debian/control	2007-12-20 13:01:25 UTC (rev 1499)
+++ desktop/trunk/xfce-mcs-plugins/debian/control	2007-12-20 13:37:24 UTC (rev 1500)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Xfce Maintainers <pkg-xfce-devel at lists.alioth.debian.org>
 Uploaders: Martin Loschwitz <madkiss at debian.org>, Emanuele Rocca <ema at debian.org>, Simon Huggins <huggie at earth.li>, Yves-Alexis Perez <corsac at corsac.net>
-Build-Depends: debhelper (>= 4.1.26), libgtk2.0-dev, xfce4-mcs-manager-dev (>= 4.4.2), libxft-dev, libxrandr-dev, libxrender-dev, libxxf86vm-dev, chrpath
+Build-Depends: debhelper (>= 4.1.26), libgtk2.0-dev, xfce4-mcs-manager-dev (>= 4.4.2), libxft-dev, libxrandr-dev, libxrender-dev, libxxf86vm-dev, chrpath, dpatch
 Standards-Version: 3.7.2
 Homepage: http://www.xfce.org/
 Vcs-Svn: svn://svn.debian.org/pkg-xfce/desktop/trunk/xfce-mcs-plugins/

Added: desktop/trunk/xfce-mcs-plugins/debian/patches/00list
===================================================================
--- desktop/trunk/xfce-mcs-plugins/debian/patches/00list	                        (rev 0)
+++ desktop/trunk/xfce-mcs-plugins/debian/patches/00list	2007-12-20 13:37:24 UTC (rev 1500)
@@ -0,0 +1 @@
+01_mouse_plugin_memory_fix.dpatch

Added: desktop/trunk/xfce-mcs-plugins/debian/patches/01_mouse_plugin_memory_fix.dpatch
===================================================================
--- desktop/trunk/xfce-mcs-plugins/debian/patches/01_mouse_plugin_memory_fix.dpatch	                        (rev 0)
+++ desktop/trunk/xfce-mcs-plugins/debian/patches/01_mouse_plugin_memory_fix.dpatch	2007-12-20 13:37:24 UTC (rev 1500)
@@ -0,0 +1,38 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## mouse_plugin_memory_fix.dpatch by Simon Huggins <huggie at earth.li>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: http://bugzilla.xfce.org/show_bug.cgi?id=3753
+
+ at DPATCH@
+
+Index: plugins/mouse_plugin/mouse_plugin.c
+===================================================================
+--- a/plugins/mouse_plugin/mouse_plugin.c	(revision 26490)
++++ b/plugins/mouse_plugin/mouse_plugin.c	(working copy)
+@@ -174,7 +174,7 @@ set_xinput_mouse_values (gboolean right_
+     unsigned char *buttons;
+     gint n_buttons, n_devices, i;
+     gint idx_1 = 0, idx_3 = 1;
+-    gsize buttons_capacity = 16;
++    gsize buttons_capacity = DEFAULT_PTR_MAP_SIZE;
+ 
+     device_info = XListInputDevices (GDK_DISPLAY (), &n_devices);
+ 
+@@ -204,11 +204,12 @@ set_xinput_mouse_values (gboolean right_
+             continue;
+         }
+ 
+-        n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, DEFAULT_PTR_MAP_SIZE);
+-        if (n_buttons > DEFAULT_PTR_MAP_SIZE)
++        n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, buttons_capacity);
++        if (n_buttons > buttons_capacity)
+         {
+-            buttons = g_alloca (n_buttons);
+-            n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, n_buttons);
++            buttons = g_realloc (buttons, n_buttons);
++            buttons_capacity = n_buttons;
++            n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, buttons_capacity);
+         }
+ 
+         for (i = 0; i < n_buttons; i++)

Modified: desktop/trunk/xfce-mcs-plugins/debian/rules
===================================================================
--- desktop/trunk/xfce-mcs-plugins/debian/rules	2007-12-20 13:01:25 UTC (rev 1499)
+++ desktop/trunk/xfce-mcs-plugins/debian/rules	2007-12-20 13:37:24 UTC (rev 1500)
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpatch/dpatch.make
+
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
@@ -17,14 +19,14 @@
 	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --enable-xf86misc --prefix=/usr --mandir=\$${prefix}/share/man --enable-final
 
 build: build-stamp
-build-stamp: config.status
+build-stamp: config.status patch-stamp
 	
 	dh_testdir
 	$(MAKE)
 	touch build-stamp
 
-clean:
-
+clean: clean1 unpatch
+clean1:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp 




More information about the Pkg-xfce-commits mailing list