]> git.pld-linux.org Git - packages/libcaca.git/blob - libcaca-ruby1.9.patch
- added monodir patch (fix mono binding install on lib64 systems)
[packages/libcaca.git] / libcaca-ruby1.9.patch
1 --- libcaca-0.99.beta17/configure.ac~   2010-02-08 13:34:28.000000000 +0100
2 +++ libcaca-0.99.beta17/configure.ac    2010-03-02 17:34:37.239187424 +0100
3 @@ -469,7 +469,7 @@
4  if test "${enable_ruby}" != "no"; then
5    AC_PATH_PROG(RUBY, ruby, no)
6    if test "${RUBY}" != "no"; then
7 -    RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')"
8 +    RUBY_CFLAGS=`($RUBY -rmkmf -e 'puts "-I#$hdrdir/#{CONFIG["arch"]} -I#$hdrdir"') 2>/dev/null`
9      RUBY_LIBS="-L$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"RUBY_SO_NAME"@:>@')"
10      RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitearchdir"@:>@'`
11      RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitelibdir"@:>@'`
12 --- libcaca-0.99.beta17/ruby/caca-canvas.c~     2009-12-14 18:38:56.000000000 +0100
13 +++ libcaca-0.99.beta17/ruby/caca-canvas.c      2010-03-02 17:40:06.868186374 +0100
14 @@ -274,7 +274,7 @@
15      int error = 0;
16      VALUE v, x, y;
17  
18 -    n = RARRAY(points)->len;
19 +    n = RARRAY_LEN(points);
20  
21      ax = (int*)malloc(n*sizeof(int));
22      if(!ax)
23 @@ -290,7 +290,7 @@
24      for(i=0; i<n; i++)
25      {
26          v = rb_ary_entry(points, i);
27 -        if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 2))
28 +        if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 2))
29          {
30              x = rb_ary_entry(v,0);
31              y = rb_ary_entry(v,1);
32 @@ -336,7 +336,7 @@
33      int error = 0;
34      VALUE v, x, y;
35  
36 -    n = RARRAY(points)->len;
37 +    n = RARRAY_LEN(points);
38  
39      ax = (int*)malloc(n*sizeof(int));
40      if(!ax)
41 @@ -352,7 +352,7 @@
42      for(i=0; i<n; i++)
43      {
44          v = rb_ary_entry(points, i);
45 -        if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 2))
46 +        if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 2))
47          {
48              x = rb_ary_entry(v,0);
49              y = rb_ary_entry(v,1);
50 @@ -459,7 +459,7 @@
51      float cuv[6];
52      VALUE v;
53  
54 -    l = RARRAY(coords)->len;
55 +    l = RARRAY_LEN(coords);
56      if(l != 6 && l != 3)
57      {
58          rb_raise(rb_eArgError, "invalid coords list");
59 @@ -471,14 +471,14 @@
60              ccoords[i] = NUM2INT(v);
61          else
62          {
63 -            if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2))
64 +            if((TYPE(v) != T_ARRAY) || (RARRAY_LEN(v) != 2))
65                  rb_raise(rb_eArgError, "invalid coords list");
66              ccoords[2*i] = NUM2INT(rb_ary_entry(v, 0));
67              ccoords[2*i+1] = NUM2INT(rb_ary_entry(v, 1));
68          }
69      }
70  
71 -    l = RARRAY(uv)->len;
72 +    l = RARRAY_LEN(uv);
73      if(l != 6 && l != 3)
74      {
75          rb_raise(rb_eArgError, "invalid uv list");
76 @@ -490,7 +490,7 @@
77              cuv[i] = NUM2DBL(v);
78          else
79          {
80 -            if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2))
81 +            if((TYPE(v) != T_ARRAY) || (RARRAY_LEN(v) != 2))
82                  rb_raise(rb_eArgError, "invalid uv list");
83              ccoords[2*i] = NUM2DBL(rb_ary_entry(v, 0));
84              ccoords[2*i+1] = NUM2DBL(rb_ary_entry(v, 1));
85 @@ -600,7 +600,7 @@
86  static VALUE import_from_memory(VALUE self, VALUE data, VALUE format)
87  {
88      long int bytes;
89 -    bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING(StringValue(data))->len, StringValuePtr(format));
90 +    bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format));
91      if(bytes <= 0)
92          rb_raise(rb_eRuntimeError, strerror(errno));
93  
94 @@ -610,7 +610,7 @@
95  static VALUE import_area_from_memory(VALUE self, VALUE x, VALUE y, VALUE data, VALUE format)
96  {
97      long int bytes;
98 -    bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING(StringValue(data))->len, StringValuePtr(format));
99 +    bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format));
100      if(bytes <= 0)
101          rb_raise(rb_eRuntimeError, strerror(errno));
102  
103 --- libcaca-0.99.beta17/ruby/caca-dither.c~     2009-11-17 16:58:37.000000000 +0100
104 +++ libcaca-0.99.beta17/ruby/caca-dither.c      2010-03-02 17:40:33.434124529 +0100
105 @@ -48,7 +48,7 @@
106      VALUE v, r, g, b, a;
107      int error = 0;
108  
109 -    if(RARRAY(palette)->len != 256)
110 +    if(RARRAY_LEN(palette) != 256)
111      {
112          rb_raise(rb_eArgError, "Palette must contain 256 elements");
113      }
114 @@ -84,7 +84,7 @@
115      for(i=0; i<256; i++)
116      {
117          v = rb_ary_entry(palette, i);
118 -        if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 4))
119 +        if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 4))
120          {
121              r = rb_ary_entry(v,0);
122              g = rb_ary_entry(v,1);
This page took 0.172622 seconds and 3 git commands to generate.