File xmms-ruby2.2.patch of Package xmms2
Index: xmms2-0.7DrNo/waftools/ruby.py
===================================================================
--- xmms2-0.7DrNo.orig/waftools/ruby.py
+++ xmms2-0.7DrNo/waftools/ruby.py
@@ -63,12 +63,12 @@ def check_ruby_ext_devel(conf):
version = conf.env['RUBY_VERSION']
def ruby_get_config(key):
- return Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"" + key + "\"]'").strip()
+ return Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"" + key + "\"]'").strip()
if version >= (1, 9, 0):
- ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
+ ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"rubyhdrdir\"] + \"/ruby.h\")'").strip()
elif version >= (1, 8, 0):
- ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(Config::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
+ ruby_h = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.exist?(RbConfig::CONFIG[\"archdir\"] + \"/ruby.h\")'").strip()
if ruby_h != 'true':
conf.check_message('ruby', 'header file', False)
@@ -76,18 +76,18 @@ def check_ruby_ext_devel(conf):
conf.check_message('ruby', 'header file', True)
- archdir = Utils.cmd_output(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(Config::CONFIG[\"archdir\"], 0..1)'").strip()
+ archdir = Utils.cmd_output(ruby + " -rrbconfig -e 'puts \"%s\" % [].fill(RbConfig::CONFIG[\"archdir\"], 0..1)'").strip()
conf.env["CPPPATH_RUBY"] = [archdir]
conf.env["LINKFLAGS_RUBY"] = '-L%s' % archdir
if version >= (1, 9, 0):
- incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts Config::CONFIG[\"rubyhdrdir\"]'").strip()
+ incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts RbConfig::CONFIG[\"rubyhdrdir\"]'").strip()
conf.env["CPPPATH_RUBY"] += [incpaths]
- incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.join(Config::CONFIG[\"rubyhdrdir\"], Config::CONFIG[\"arch\"])'").strip()
+ incpaths = Utils.cmd_output(ruby + " -rrbconfig -e 'puts File.join(RbConfig::CONFIG[\"rubyhdrdir\"], RbConfig::CONFIG[\"arch\"])'").strip()
conf.env["CPPPATH_RUBY"] += [incpaths]
- ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"LDSHARED\"]'").strip()
+ ldflags = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"LDSHARED\"]'").strip()
# ok this is really stupid, but the command and flags are combined.
# so we try to find the first argument...
@@ -113,14 +113,14 @@ def check_ruby_ext_devel(conf):
if Options.options.rubyarchdir:
conf.env["ARCHDIR_RUBY"] = Options.options.rubyarchdir
else:
- conf.env["ARCHDIR_RUBY"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitearchdir\"]'").strip()
+ conf.env["ARCHDIR_RUBY"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"sitearchdir\"]'").strip()
if Options.options.rubylibdir:
conf.env["LIBDIR_RUBY"] = Options.options.rubylibdir
else:
- conf.env["LIBDIR_RUBY"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"sitelibdir\"]'").strip()
+ conf.env["LIBDIR_RUBY"] = Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"sitelibdir\"]'").strip()
- conf.env['rubyext_PATTERN'] = '%s.' + Utils.cmd_output(ruby + " -rrbconfig -e 'print Config::CONFIG[\"DLEXT\"]'").strip()
+ conf.env['rubyext_PATTERN'] = '%s.' + Utils.cmd_output(ruby + " -rrbconfig -e 'print RbConfig::CONFIG[\"DLEXT\"]'").strip()
# Change some strings to a list
conf.env["LINKFLAGS_RUBY"] = Utils.to_list(conf.env["LINKFLAGS_RUBY"])