[DRE-commits] [ruby-zoom] 04/04: added patch for Ruby1.9.1 / Ruby 2.0

Jonas Genannt jonas at brachium-system.net
Sun Dec 22 20:36:48 UTC 2013


This is an automated email from the git hooks/post-receive script.

hggh-guest pushed a commit to branch master
in repository ruby-zoom.

commit aaa3b17b1a08e5b5150855092399f3e93ca54efc
Author: Jonas Genannt <jonas at brachium-system.net>
Date:   Sun Dec 22 21:36:42 2013 +0100

    added patch for Ruby1.9.1 / Ruby 2.0
---
 debian/patches/ruby191.patch | 88 ++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series        |  1 +
 2 files changed, 89 insertions(+)

diff --git a/debian/patches/ruby191.patch b/debian/patches/ruby191.patch
new file mode 100644
index 0000000..ce23bd9
--- /dev/null
+++ b/debian/patches/ruby191.patch
@@ -0,0 +1,88 @@
+Description: ruby 1.9.1 / ruby 2.0 fixes
+Author: Brice Stacey <bricestacey at gmail.com>
+Origin: https://github.com/bricestacey/ruby-zoom
+
+diff --git a/src/extconf.rb b/src/extconf.rb
+index 001c588..41fef4f 100644
+--- a/src/extconf.rb
++++ b/src/extconf.rb
+@@ -2,12 +2,12 @@ require 'mkmf'
+ 
+ unless system('yaz-config')
+   $stderr.puts 'yaz does not appear to be installed'
+-  break
++  exit
+ end
+ 
+ unless have_header('yaz/zoom.h')
+   $stderr.puts 'yaz zoom header not available'
+-  break
++  exit
+ end
+ 
+ $CFLAGS << " #{`yaz-config --cflags`} "
+diff --git a/src/rbzoom.h b/src/rbzoom.h
+index 4dbf81c..8f47337 100644
+--- a/src/rbzoom.h
++++ b/src/rbzoom.h
+@@ -53,7 +53,7 @@ void rbz_connection_check(VALUE obj);
+         
+ /* useful macros */
+ #if !defined (RVAL2CSTR)
+-# define RVAL2CSTR(x)       (NIL_P (x) ? NULL : STR2CSTR(x))
++# define RVAL2CSTR(x)       (NIL_P (x) ? NULL : RSTRING_PTR(x))
+ #endif
+ #if !defined (CSTR2RVAL)
+ # define CSTR2RVAL(x)       (x == NULL ? Qnil : rb_str_new2(x))
+diff --git a/src/rbzoomconnection.c b/src/rbzoomconnection.c
+index 1b85915..2049bbc 100644
+--- a/src/rbzoomconnection.c
++++ b/src/rbzoomconnection.c
+@@ -285,7 +285,7 @@ rbz_connection_package(VALUE self)
+ {
+   ZOOM_connection connection;
+   ZOOM_options options;
+-  ZOOM_package package;
++  VALUE package;
+ 
+   connection = rbz_connection_get (self);
+   options = ZOOM_options_create ();
+diff --git a/src/rbzoomoptions.c b/src/rbzoomoptions.c
+index 2a9b278..ec9fcf1 100644
+--- a/src/rbzoomoptions.c
++++ b/src/rbzoomoptions.c
+@@ -32,10 +32,10 @@ ruby_hash_to_zoom_options (VALUE hash)
+     options = ZOOM_options_create ();
+     
+     ary = rb_funcall (hash, rb_intern ("to_a"), 0);
+-    for (i = 0; i < RARRAY (ary)->len; i++) {
+-        pair = RARRAY (ary)->ptr[i];
+-        key = RARRAY (pair)->ptr[0];
+-        value = RARRAY (pair)->ptr[1];
++    for (i = 0; i < RARRAY_LEN(ary); i++) {
++        pair = RARRAY_PTR(ary)[i];
++        key = RARRAY_PTR(pair)[0];
++        value = RARRAY_PTR(pair)[1];
+         
+         switch (TYPE (value)) {
+             case T_TRUE:
+@@ -68,7 +68,7 @@ ruby_hash_to_zoom_options (VALUE hash)
+ VALUE
+ zoom_option_value_to_ruby_value (const char *value)
+ {
+-    int i;
++    unsigned int i;
+ 
+     if (value == NULL)
+         return Qnil; 
+@@ -86,8 +86,8 @@ define_zoom_option (VALUE klass, const char *option)
+     char code [1024];
+     char rubyname [128];
+     char c;
+-    int i;
+-    int j;
++    unsigned int i;
++    unsigned int j;
+    
+     /* rubyfy the option name */
+     for (i = 0, j = 0; i < strlen (option) && j < sizeof rubyname; i++, j++) {
diff --git a/debian/patches/series b/debian/patches/series
index 2ef21ea..66b0a50 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix_assert_in_test.patch
+ruby191.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-zoom.git



More information about the Pkg-ruby-extras-commits mailing list