[DRE-commits] [ruby-globalhotkeys] 04/07: add some patches
Cédric Boutillier
boutil at moszumanska.debian.org
Thu Dec 19 23:02:02 UTC 2013
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-globalhotkeys.
commit 569e42c695ea807c84b173570351ac10185d7f12
Author: Cédric Boutillier <boutil at debian.org>
Date: Thu Dec 19 22:31:04 2013 +0100
add some patches
---
.../extconf-add-space-additional-cflags.patch | 16 +++++++++
debian/patches/format-security.patch | 16 +++++++++
debian/patches/port-to-newer-ruby.patch | 42 ++++++++++++++++++++++
debian/patches/series | 3 ++
4 files changed, 77 insertions(+)
diff --git a/debian/patches/extconf-add-space-additional-cflags.patch b/debian/patches/extconf-add-space-additional-cflags.patch
new file mode 100644
index 0000000..eab9580
--- /dev/null
+++ b/debian/patches/extconf-add-space-additional-cflags.patch
@@ -0,0 +1,16 @@
+Description: add a space between default and additional CFLAGS
+Author: Cédric Boutillier <boutil at debian.org>
+Origin: vendor
+Last-Update: 2013-12-19
+
+--- a/extconf.rb
++++ b/extconf.rb
+@@ -30,7 +30,7 @@
+
+ find_header('ruby.h') or exit 1
+ gtk_cflags=`pkg-config --cflags gtk+-2.0`.chomp!
+-$CFLAGS+=gtk_cflags
++$CFLAGS+=" " + gtk_cflags
+ find_library('X11', 'XKeysymToKeycode') or exit 1
+ find_library('gobject-2.0', 'g_type_init') or exit 1
+ find_library('gdk-x11-2.0', '') or exit 1
diff --git a/debian/patches/format-security.patch b/debian/patches/format-security.patch
new file mode 100644
index 0000000..b5873f9
--- /dev/null
+++ b/debian/patches/format-security.patch
@@ -0,0 +1,16 @@
+Description: fix format security error
+Author: Cédric Boutillier <boutil at debian.org>
+Origin: vendor
+Last-Update: 2013-12-19
+
+--- a/globalhotkeys.c
++++ b/globalhotkeys.c
+@@ -130,7 +130,7 @@
+ XSync(xdisplay, FALSE);
+ XSetErrorHandler(handler);
+ if (strcmp(xlib_error, "")!=0)
+- rb_raise(eXlibError, xlib_error);
++ rb_raise(eXlibError, "%s", xlib_error);
+ //XGrabKey(xdisplay, keycode, AnyModifier, GDK_WINDOW_XWINDOW(root_window), False, GrabModeAsync, GrabModeAsync);
+
+ rb_iv_set(self, "@key", key);
diff --git a/debian/patches/port-to-newer-ruby.patch b/debian/patches/port-to-newer-ruby.patch
new file mode 100644
index 0000000..2abf0b8
--- /dev/null
+++ b/debian/patches/port-to-newer-ruby.patch
@@ -0,0 +1,42 @@
+Description: port to Ruby >= 1.9
+Author: Cédric Boutillier <boutil at debian.org>
+Origin: vendor
+Last-Update: 2013-12-19
+
+--- a/globalhotkeys.c
++++ b/globalhotkeys.c
+@@ -114,7 +114,7 @@
+ if (keycode==0)
+ rb_raise(eInvalidKeyVal, "Invalid key value.");
+
+- if NIL_P(modifier)
++ if (NIL_P(modifier))
+ mod=0;
+ else
+ mod=NUM2UINT(modifier);
+@@ -187,7 +187,7 @@
+ uint ignored[]={0, RGHK_LOCK_MASK, RGHK_NUM_LOCK_MASK, RGHK_LOCK_MASK|RGHK_NUM_LOCK_MASK};
+
+ del=rb_funcall(rb_cv_get(cKeyBinder, "@@stock"), rb_intern("delete"), 1, self);
+- if NIL_P(del)
++ if (NIL_P(del))
+ return Qfalse;
+
+ xdisplay=GDK_WINDOW_XDISPLAY(root_window);
+@@ -216,13 +216,13 @@
+ //rb_funcall(rb_stdout, rb_intern("puts"), 1, RARRAY(xkey)->ptr[1]);
+ uint keycode=XKeysymToKeycode(GDK_WINDOW_XDISPLAY(root_window), FIX2UINT(rb_iv_get(kb_obj, "@key")));
+
+- if (keycode==FIX2UINT(RARRAY(xkey)->ptr[0]))
++ if (keycode==FIX2UINT(RARRAY_PTR(xkey)[0]))
+ {
+ uint ignored=RGHK_LOCK_MASK|RGHK_NUM_LOCK_MASK;
+- uint mod=FIX2UINT(RARRAY(xkey)->ptr[1])&~ignored;
++ uint mod=FIX2UINT(RARRAY_PTR(xkey)[1])&~ignored;
+ uint keymod;
+
+- if NIL_P(rb_iv_get(kb_obj, "@mod"))
++ if (NIL_P(rb_iv_get(kb_obj, "@mod")))
+ keymod=0;
+ else
+ keymod=FIX2UINT(rb_iv_get(kb_obj, "@mod"));
diff --git a/debian/patches/series b/debian/patches/series
index e52a093..71834ee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
+extconf-add-space-additional-cflags.patch
+port-to-newer-ruby.patch
fix-require.diff
+format-security.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-globalhotkeys.git
More information about the Pkg-ruby-extras-commits
mailing list