]> git.pld-linux.org Git - packages/ggz-grubby.git/blob - ggz-grubby-ruby.patch
perl 5.38.0 rebuild
[packages/ggz-grubby.git] / ggz-grubby-ruby.patch
1 --- ggz-grubby-0.0.14.1/configure.ac.orig       2013-02-01 16:57:23.840985429 +0100
2 +++ ggz-grubby-0.0.14.1/configure.ac    2013-02-01 17:00:14.267648544 +0100
3 @@ -85,7 +85,9 @@
4  if test "$enable_ruby" = yes; then
5         echo -n "Extra check: ruby... "
6  
7 -       incs=`ruby -r rbconfig -e 'printf("%s", Config::CONFIG@<:@"archdir"@:>@)' 2>/dev/null`
8 +       inc1=`ruby -r rbconfig -e 'printf("%s", Config::CONFIG@<:@"rubyhdrdir"@:>@)' 2>/dev/null`
9 +       inc2=`ruby -r rbconfig -e 'printf("%s/%s", Config::CONFIG@<:@"rubyhdrdir"@:>@, Config::CONFIG@<:@"arch"@:>@)' 2>/dev/null`
10 +       incs="$inc1 $inc2"
11         libs=`ruby -r rbconfig -e 'printf("%s", Config::CONFIG@<:@"libdir"@:>@)' 2>/dev/null`
12         rver=`ruby -r rbconfig -e 'printf("%s", Config::CONFIG@<:@"ruby_install_name"@:>@)' 2>/dev/null`
13  
14 @@ -107,8 +109,8 @@
15                 ruby_libraries=""
16                 enable_ruby=no
17         else
18 -               ruby_includes="-I $ruby_includes"
19 -               ruby_libraries="-L $ruby_libraries -l$rver"
20 +               ruby_includes="-I$inc1 -I$inc2"
21 +               ruby_libraries="-L$ruby_libraries -l$rver"
22                 AC_MSG_RESULT(ok.)
23                 AC_SUBST(ruby_includes)
24                 AC_SUBST(ruby_libraries)
25 --- ggz-grubby-0.0.14.1/grubby/modules/embed.c.orig     2008-01-05 20:02:42.000000000 +0100
26 +++ ggz-grubby-0.0.14.1/grubby/modules/embed.c  2013-02-01 17:50:05.344252870 +0100
27 @@ -183,20 +183,21 @@
28  #ifdef EMBED_RUBY
29                         if(type == TYPE_RUBY)
30                         {
31 +                               void *rbnode;
32                                 answer = rb_ary_new();
33                                 rb_define_variable("$answer", &answer);
34                                 rb_ary_push(answer, rb_str_new2(message->message));
35                                 /*rb_global_variable(&answer);*/
36  
37                                 ruby_script("grubby-embedded");
38 -                               rb_load_file(script);
39 +                               rbnode = rb_load_file(script);
40  
41                                 switch(fork())
42                                 {
43                                         case -1:
44                                                 return NULL;
45                                         case 0:
46 -                                               ruby_run();
47 +                                               ruby_run_node(rbnode);
48                                                 exit(0);
49                                                 break;
50                                         default:
51 @@ -205,10 +206,10 @@
52  
53                                 if(!NIL_P(answer))
54                                 {
55 -                                       if(RARRAY(answer)->len > 0)
56 +                                       if(RARRAY_LEN(answer) > 0)
57                                         {
58                                                 tmp = rb_ary_pop(answer);
59 -                                               message->message = STR2CSTR(tmp);
60 +                                               message->message = StringValuePtr(tmp);
61                                                 return message;
62                                         }
63                                 }
This page took 0.087108 seconds and 3 git commands to generate.