]> git.pld-linux.org Git - packages/xmms2.git/blob - xmms2-ruby.patch
8391182e50730ad4edb8ddd26df2655593e67aa7
[packages/xmms2.git] / xmms2-ruby.patch
1 --- xmms2-0.6DrMattDestruction/waftools/ruby.py.orig    2009-04-21 19:51:11.000000000 +0200
2 +++ xmms2-0.6DrMattDestruction/waftools/ruby.py 2023-05-22 09:39:14.409985899 +0200
3 @@ -62,9 +62,9 @@ def check_ruby_ext_devel(conf):
4      version = conf.env['RUBY_VERSION']
5  
6      if version >= (1, 9, 0):
7 -        ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
8 +        ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
9      elif version >= (1, 8, 0):
10 -        ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
11 +        ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
12  
13      if ruby_h != 'true':
14          conf.check_message('ruby', 'header file', False)
15 @@ -72,18 +72,18 @@ def check_ruby_ext_devel(conf):
16  
17      conf.check_message('ruby', 'header file', True)
18  
19 -    archdir = Utils.cmd_output(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'").strip()
20 +    archdir = Utils.cmd_output(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(RbConfig::CONFIG[\"archdir\"], 0..1)'").strip()
21      conf.env["CPPPATH_ruby"] = [archdir]
22      conf.env["LINKFLAGS_ruby"] = '-L%s' % archdir
23  
24      if version >= (1, 9, 0):
25 -        incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts Config::CONFIG[\"rubyhdrdir\"]'").strip()
26 +        incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts RbConfig::CONFIG[\"rubyhdrdir\"]'").strip()
27          conf.env["CPPPATH_ruby"] += [incpaths]
28  
29 -        incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.join(Config::CONFIG[\"rubyhdrdir\"], Config::CONFIG[\"arch\"])'").strip()
30 +        incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.join(RbConfig::CONFIG[\"rubyhdrdir\"], RbConfig::CONFIG[\"arch\"])'").strip()
31          conf.env["CPPPATH_ruby"] += [incpaths]
32  
33 -    ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LDSHARED\"]'").strip()
34 +    ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LDSHARED\"]'").strip()
35  
36      # ok this is really stupid, but the command and flags are combined.
37      # so we try to find the first argument...
38 @@ -97,25 +97,25 @@ def check_ruby_ext_devel(conf):
39  
40      conf.env["LINKFLAGS_ruby"] += " " + " ".join(flags)
41  
42 -    ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LIBS\"]'").strip()
43 +    ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LIBS\"]'").strip()
44      conf.env["LINKFLAGS_ruby"] += " " + ldflags
45 -    ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LIBRUBYARG_SHARED\"]'").strip()
46 +    ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LIBRUBYARG_SHARED\"]'").strip()
47      conf.env["LINKFLAGS_ruby"] += " " + ldflags
48  
49 -    cflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"CCDLFLAGS\"]'").strip()
50 +    cflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"CCDLFLAGS\"]'").strip()
51      conf.env["CCFLAGS_ruby"] = cflags
52  
53      if Options.options.rubyarchdir:
54          conf.env["ARCHDIR_ruby"] = Options.options.rubyarchdir
55      else:
56 -        conf.env["ARCHDIR_ruby"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'").strip()
57 +        conf.env["ARCHDIR_ruby"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"sitearchdir\"]'").strip()
58  
59      if Options.options.rubylibdir:
60          conf.env["LIBDIR_ruby"] = Options.options.rubylibdir
61      else:
62 -        conf.env["LIBDIR_ruby"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitelibdir\"]'").strip()
63 +        conf.env["LIBDIR_ruby"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"sitelibdir\"]'").strip()
64  
65 -    conf.env['rubyext_PATTERN'] = '%s.' + Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"DLEXT\"]'").strip()
66 +    conf.env['rubyext_PATTERN'] = '%s.' + Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"DLEXT\"]'").strip()
67  
68      return True
69  
70 --- xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_xmmsclient.c.orig 2023-05-14 19:24:29.670968613 +0200
71 +++ xmms2-0.2DrJekyll/src/clients/lib/ruby/rb_xmmsclient.c      2023-05-14 19:29:16.606080819 +0200
72 @@ -1371,10 +1371,10 @@ parse_string_array (VALUE value)
73         if (!NIL_P (rb_check_array_type (value))) {
74                 struct RArray *ary = RARRAY (value);
75  
76 -               ret = malloc (sizeof (char *) * (ary->len + 1));
77 +               ret = malloc (sizeof (char *) * (RARRAY_LEN(ary) + 1));
78  
79 -               for (i = 0; i < ary->len; i++)
80 -                       ret[i] = StringValuePtr (ary->ptr[i]);
81 +               for (i = 0; i < RARRAY_LEN(ary); i++)
82 +                       ret[i] = StringValuePtr (RARRAY_PTR(ary)[i]);
83  
84                 ret[i] = NULL;
85         } else {
86 @@ -1451,10 +1451,10 @@ parse_string_array2 (VALUE value)
87                 struct RArray *ary = RARRAY (value);
88                 int i;
89  
90 -               for (i = 0; i < ary->len; i++) {
91 +               for (i = 0; i < RARRAY_LEN(ary); i++) {
92                         xmmsv_t *elem;
93  
94 -                       elem = xmmsv_new_string (StringValuePtr (ary->ptr[i]));
95 +                       elem = xmmsv_new_string (StringValuePtr (RARRAY_PTR(ary)[i]));
96                         xmmsv_list_append (list, elem);
97                         xmmsv_unref (elem);
98                 }
99 --- xmms2-0.5DrLecter/src/clients/lib/ruby/rb_collection.c.orig 2008-06-15 19:31:38.000000000 +0200
100 +++ xmms2-0.5DrLecter/src/clients/lib/ruby/rb_collection.c      2023-05-21 15:05:06.452132360 +0200
101 @@ -241,10 +241,10 @@ c_coll_idlist_set (VALUE self, VALUE ids
102         COLL_METHOD_HANDLER_HEADER
103  
104         rb_ary = RARRAY (ids);
105 -       ary = malloc (sizeof (unsigned int *) * (rb_ary->len + 1));
106 +       ary = malloc (sizeof (unsigned int *) * (RARRAY_LEN(rb_ary) + 1));
107  
108 -       for (i = 0; i < rb_ary->len; i++)
109 -               ary[i] = NUM2UINT (rb_ary->ptr[i]);
110 +       for (i = 0; i < RARRAY_LEN(rb_ary); i++)
111 +               ary[i] = NUM2UINT (RARRAY_PTR(rb_ary)[i]);
112  
113         ary[i] = 0;
114  
115 @@ -285,8 +285,8 @@ attrs_inspect_cb (VALUE args, VALUE s)
116  {
117         VALUE key, value;
118  
119 -       key = RARRAY (args)->ptr[0];
120 -       value = RARRAY (args)->ptr[1];
121 +       key = RARRAY_PTR (args)[0];
122 +       value = RARRAY_PTR (args)[1];
123  
124         if (RSTRING_LEN (s) > 1)
125                 rb_str_buf_cat2 (s, ", ");
This page took 0.060713 seconds and 2 git commands to generate.