Sophie

Sophie

distrib > Mandriva > cooker > i586 > media > main-release-src > by-pkgid > 8bf422197a04fd66c1ad007686af9314 > files > 1

libcaca-0.99-0.beta18.1.src.rpm

--- libcaca-0.99.beta18/configure.ac.ruby19~	2012-04-06 22:39:42.000000000 +0200
+++ libcaca-0.99.beta18/configure.ac	2012-04-10 12:34:06.381026125 +0200
@@ -462,10 +462,10 @@ ac_cv_my_have_ruby="no"
 if test "${enable_ruby}" != "no"; then
   AC_PATH_PROG(RUBY, ruby, no)
   if test "${RUBY}" != "no"; then
-    RUBY_CFLAGS="-I$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"archdir"@:>@')"
-    RUBY_LIBS="-L$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"libdir"@:>@') -l$(ruby -r rbconfig -e 'print Config::CONFIG@<:@"RUBY_SO_NAME"@:>@')"
-    RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitearchdir"@:>@'`
-    RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print Config::CONFIG@<:@"sitelibdir"@:>@'`
+    RUBY_CFLAGS="$(pkg-config --cflags ruby-1.9)"
+    RUBY_LIBS="$(pkg-config --libs ruby-1.9)"
+    RUBY_SITEARCHDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitearchdir"@:>@'`
+    RUBY_SITELIBDIR=`ruby -r rbconfig -e 'print RbConfig::CONFIG@<:@"sitelibdir"@:>@'`
     AC_SUBST(RUBY_CFLAGS)
     AC_SUBST(RUBY_LIBS)
     AC_SUBST(RUBY_SITEARCHDIR)
--- libcaca-0.99.beta18/ruby/caca-canvas.c.ruby19~	2010-02-16 00:49:40.000000000 +0100
+++ libcaca-0.99.beta18/ruby/caca-canvas.c	2012-04-10 12:34:06.838525708 +0200
@@ -22,7 +22,7 @@ VALUE cCanvas;
 static VALUE x (VALUE self)                             \
 {                                                       \
     if( caca_##x (_SELF) <0)                            \
-        rb_raise(rb_eRuntimeError, strerror(errno));    \
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));    \
                                                         \
     return self;                                        \
 }
@@ -58,7 +58,7 @@ static VALUE canvas_initialize(VALUE sel
 
     if(canvas == NULL)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
 
     _SELF = canvas;
@@ -104,7 +104,7 @@ static VALUE set_canvas_size(VALUE self,
 static VALUE gotoxy(VALUE self, VALUE x, VALUE y)
 {
     if( caca_gotoxy(_SELF, NUM2INT(x), NUM2INT(y)) <0) {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     return self;
 }
@@ -150,7 +150,7 @@ static VALUE get_attr(VALUE self, VALUE
 static VALUE set_attr(VALUE self, VALUE attr)
 {
     if(caca_set_attr(_SELF, NUM2ULONG(attr)) <0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -164,7 +164,7 @@ static VALUE set_attr2(VALUE self, VALUE
 static VALUE put_attr(VALUE self, VALUE x, VALUE y, VALUE attr)
 {
     if(caca_put_attr(_SELF, NUM2INT(x), NUM2INT(y), NUM2ULONG(attr)) <0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -172,7 +172,7 @@ static VALUE put_attr(VALUE self, VALUE
 static VALUE set_color_ansi(VALUE self, VALUE fg, VALUE bg)
 {
     if(caca_set_color_ansi(_SELF, NUM2INT(fg), NUM2INT(bg)) <0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -180,7 +180,7 @@ static VALUE set_color_ansi(VALUE self,
 static VALUE set_color_argb(VALUE self, VALUE fg, VALUE bg)
 {
     if(caca_set_color_argb(_SELF, NUM2UINT(fg), NUM2UINT(bg)) <0) {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     return self;
 }
@@ -234,7 +234,7 @@ static VALUE blit(int argc, VALUE* argv,
         cmask = NULL;
 
     if(caca_blit(_SELF, NUM2INT(x), NUM2INT(y), csrc, cmask)<0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -243,7 +243,7 @@ static VALUE set_canvas_boundaries(VALUE
 {
     if(caca_set_canvas_boundaries(_SELF, NUM2INT(x), NUM2INT(y), NUM2UINT(w), NUM2UINT(h))<0)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     return self;
 }
@@ -274,7 +274,7 @@ static VALUE draw_polyline(VALUE self, V
     int error = 0;
     VALUE v, x, y;
 
-    n = RARRAY(points)->len;
+    n = RARRAY_LEN(points);
 
     ax = (int*)malloc(n*sizeof(int));
     if(!ax)
@@ -290,7 +290,7 @@ static VALUE draw_polyline(VALUE self, V
     for(i=0; i<n; i++)
     {
         v = rb_ary_entry(points, i);
-        if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 2))
+        if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 2))
         {
             x = rb_ary_entry(v,0);
             y = rb_ary_entry(v,1);
@@ -336,7 +336,7 @@ static VALUE draw_thin_polyline(VALUE se
     int error = 0;
     VALUE v, x, y;
 
-    n = RARRAY(points)->len;
+    n = RARRAY_LEN(points);
 
     ax = (int*)malloc(n*sizeof(int));
     if(!ax)
@@ -352,7 +352,7 @@ static VALUE draw_thin_polyline(VALUE se
     for(i=0; i<n; i++)
     {
         v = rb_ary_entry(points, i);
-        if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 2))
+        if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 2))
         {
             x = rb_ary_entry(v,0);
             y = rb_ary_entry(v,1);
@@ -459,7 +459,7 @@ static VALUE fill_triangle_textured(VALU
     float cuv[6];
     VALUE v;
 
-    l = RARRAY(coords)->len;
+    l = RARRAY_LEN(coords);
     if(l != 6 && l != 3)
     {
         rb_raise(rb_eArgError, "invalid coords list");
@@ -471,14 +471,14 @@ static VALUE fill_triangle_textured(VALU
             ccoords[i] = NUM2INT(v);
         else
         {
-            if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2))
+            if((TYPE(v) != T_ARRAY) || (RARRAY_LEN(v) != 2))
                 rb_raise(rb_eArgError, "invalid coords list");
             ccoords[2*i] = NUM2INT(rb_ary_entry(v, 0));
             ccoords[2*i+1] = NUM2INT(rb_ary_entry(v, 1));
         }
     }
 
-    l = RARRAY(uv)->len;
+    l = RARRAY_LEN(uv);
     if(l != 6 && l != 3)
     {
         rb_raise(rb_eArgError, "invalid uv list");
@@ -490,7 +490,7 @@ static VALUE fill_triangle_textured(VALU
             cuv[i] = NUM2DBL(v);
         else
         {
-            if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2))
+            if((TYPE(v) != T_ARRAY) || (RARRAY_LEN(v) != 2))
                 rb_raise(rb_eArgError, "invalid uv list");
             ccoords[2*i] = NUM2DBL(rb_ary_entry(v, 0));
             ccoords[2*i+1] = NUM2DBL(rb_ary_entry(v, 1));
@@ -524,7 +524,7 @@ get_int(frame_count)
 static VALUE set_frame(VALUE self, VALUE id)
 {
     if(caca_set_frame(_SELF, NUM2INT(id))<0)
-        rb_raise(rb_eArgError, strerror(errno));
+        rb_raise(rb_eArgError, "%s", strerror(errno));
 
     return self;
 }
@@ -543,7 +543,7 @@ static VALUE get_frame_name(VALUE self)
 static VALUE set_frame_name(VALUE self, VALUE name)
 {
     if(caca_set_frame_name(_SELF, StringValuePtr(name))<0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -557,7 +557,7 @@ static VALUE set_frame_name2(VALUE self,
 static VALUE create_frame(VALUE self, VALUE id)
 {
     if(caca_create_frame(_SELF, NUM2INT(id))<0) {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     return self;
 }
@@ -565,7 +565,7 @@ static VALUE create_frame(VALUE self, VA
 static VALUE free_frame(VALUE self, VALUE id)
 {
     if(caca_free_frame(_SELF, NUM2INT(id))<0) {
-        rb_raise(rb_eArgError, strerror(errno));
+        rb_raise(rb_eArgError, "%s", strerror(errno));
     }
     return self;
 }
@@ -600,9 +600,9 @@ static VALUE render_canvas(VALUE self, V
 static VALUE import_from_memory(VALUE self, VALUE data, VALUE format)
 {
     long int bytes;
-    bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING(StringValue(data))->len, StringValuePtr(format));
+    bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format));
     if(bytes <= 0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -610,9 +610,9 @@ static VALUE import_from_memory(VALUE se
 static VALUE import_area_from_memory(VALUE self, VALUE x, VALUE y, VALUE data, VALUE format)
 {
     long int bytes;
-    bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING(StringValue(data))->len, StringValuePtr(format));
+    bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format));
     if(bytes <= 0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -622,7 +622,7 @@ static VALUE import_from_file(VALUE self
     long int bytes;
     bytes = caca_import_canvas_from_file (_SELF, StringValuePtr(filename), StringValuePtr(format));
     if(bytes <= 0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
@@ -632,7 +632,7 @@ static VALUE import_area_from_file(VALUE
     long int bytes;
     bytes = caca_import_area_from_file (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(filename), StringValuePtr(format));
     if(bytes <= 0)
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
 
     return self;
 }
--- libcaca-0.99.beta18/ruby/caca-display.c.ruby19~	2012-04-06 22:36:17.000000000 +0200
+++ libcaca-0.99.beta18/ruby/caca-display.c	2012-04-10 12:51:27.218526335 +0200
@@ -84,7 +84,7 @@ static VALUE display_initialize(int argc
 
     if(display == NULL)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
 
     _SELF = display;
@@ -131,7 +131,7 @@ static VALUE set_title(VALUE self, VALUE
 {
     if(caca_set_display_title(_SELF, StringValuePtr(t))<0)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     return t;
 }
@@ -252,7 +252,7 @@ static VALUE set_driver(VALUE self, VALU
 {
     if(caca_set_display_driver(_SELF, StringValuePtr(driver))<0)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     return driver;
 }
@@ -267,7 +267,7 @@ static VALUE set_cursor(VALUE self, VALU
 {
     if(caca_set_cursor(_SELF, flag)<0)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+      rb_raise(rb_eRuntimeError, "%", strerror(errno));
     }
     return flag;
 }
--- libcaca-0.99.beta18/ruby/caca-dither.c.ruby19~	2010-02-16 00:49:47.000000000 +0100
+++ libcaca-0.99.beta18/ruby/caca-dither.c	2012-04-10 12:34:07.588525355 +0200
@@ -35,7 +35,7 @@ static VALUE dither_initialize(VALUE sel
     dither = caca_create_dither(NUM2UINT(bpp), NUM2UINT(w), NUM2UINT(h), NUM2UINT(pitch), NUM2ULONG(rmask), NUM2ULONG(gmask), NUM2ULONG(bmask), NUM2ULONG(amask));
     if(dither == NULL)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     _SELF = dither;
     return self;
@@ -48,7 +48,7 @@ static VALUE set_dither_palette(VALUE se
     VALUE v, r, g, b, a;
     int error = 0;
 
-    if(RARRAY(palette)->len != 256)
+    if(RARRAY_LEN(palette) != 256)
     {
         rb_raise(rb_eArgError, "Palette must contain 256 elements");
     }
@@ -84,7 +84,7 @@ static VALUE set_dither_palette(VALUE se
     for(i=0; i<256; i++)
     {
         v = rb_ary_entry(palette, i);
-        if((TYPE(v) == T_ARRAY) && (RARRAY(v)->len == 4))
+        if((TYPE(v) == T_ARRAY) && (RARRAY_LEN(v) == 4))
         {
             r = rb_ary_entry(v,0);
             g = rb_ary_entry(v,1);
@@ -121,7 +121,7 @@ static VALUE set_dither_palette(VALUE se
         free(green);
         free(blue);
         free(alpha);
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
 
     free(red);
@@ -142,7 +142,7 @@ static VALUE set_dither_palette2(VALUE s
 static VALUE set_##x(VALUE self, VALUE x)               \
 {                                                       \
     if(caca_set_dither_##x(_SELF, (float)NUM2DBL(x))<0) \
-        rb_raise(rb_eRuntimeError, strerror(errno));    \
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));    \
                                                         \
     return x;                                           \
 }                                                       \
@@ -163,7 +163,7 @@ static VALUE set_dither_##x(VALUE self,
 {                                                        \
     if(caca_set_dither_##x(_SELF, StringValuePtr(x))<0)  \
     {                                                    \
-        rb_raise(rb_eRuntimeError, strerror(errno));     \
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));     \
     }                                                    \
     return x;                                            \
 }                                                        \
--- libcaca-0.99.beta18/ruby/caca-font.c.ruby19~	2010-02-16 00:49:54.000000000 +0100
+++ libcaca-0.99.beta18/ruby/caca-font.c	2012-04-10 12:34:07.958525464 +0200
@@ -35,7 +35,7 @@ static VALUE font_initialize(VALUE self,
     font = caca_load_font(StringValuePtr(name), 0);
     if(font == NULL)
     {
-        rb_raise(rb_eRuntimeError, strerror(errno));
+        rb_raise(rb_eRuntimeError, "%s", strerror(errno));
     }
     _SELF = font;
     return self;