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']
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()
14 conf.check_message('ruby', 'header file', False)
15 @@ -72,18 +72,18 @@ def check_ruby_ext_devel(conf):
17 conf.check_message('ruby', 'header file', True)
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
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]
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]
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()
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):
40 conf.env["LINKFLAGS_ruby"] += " " + " ".join(flags)
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
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
53 if Options.options.rubyarchdir:
54 conf.env["ARCHDIR_ruby"] = Options.options.rubyarchdir
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()
59 if Options.options.rubylibdir:
60 conf.env["LIBDIR_ruby"] = Options.options.rubylibdir
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()
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()
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);
76 - ret = malloc (sizeof (char *) * (ary->len + 1));
77 + ret = malloc (sizeof (char *) * (RARRAY_LEN(ary) + 1));
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]);
86 @@ -1451,10 +1451,10 @@ parse_string_array2 (VALUE value)
87 struct RArray *ary = RARRAY (value);
90 - for (i = 0; i < ary->len; i++) {
91 + for (i = 0; i < RARRAY_LEN(ary); i++) {
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);
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
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));
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]);
115 @@ -285,8 +285,8 @@ attrs_inspect_cb (VALUE args, VALUE s)
119 - key = RARRAY (args)->ptr[0];
120 - value = RARRAY (args)->ptr[1];
121 + key = RARRAY_PTR (args)[0];
122 + value = RARRAY_PTR (args)[1];
124 if (RSTRING_LEN (s) > 1)
125 rb_str_buf_cat2 (s, ", ");