[DRE-commits] [SCM] ruby-mkrf.git branch, master, updated. debian/0.2.3+dfsg-1-7-g0a0e804

Cédric Boutillier cedric.boutillier at gmail.com
Wed Jul 4 12:07:32 UTC 2012


The following commit has been merged in the master branch:
commit 0e4e805746f6a90558673cffc8a7e7051d37fae5
Author: Cédric Boutillier <cedric.boutillier at gmail.com>
Date:   Wed Jul 4 12:27:59 2012 +0200

    add 0500_replace_config_by_rbconfig.patch

diff --git a/debian/patches/0500_replace_config_by_rbconfig.patch b/debian/patches/0500_replace_config_by_rbconfig.patch
new file mode 100644
index 0000000..b947d1d
--- /dev/null
+++ b/debian/patches/0500_replace_config_by_rbconfig.patch
@@ -0,0 +1,73 @@
+Description: Replace deprecated Config:: by RbConfig::
+Author: Cédric Boutillier <cedric.boutillier at gmail.com>
+Last-Update: 2012-07-04
+
+--- a/lib/mkrf/availability.rb
++++ b/lib/mkrf/availability.rb
+@@ -10,14 +10,14 @@
+   # on the current system.
+   class Availability
+     # ruby 1.9+
+-    if Config::CONFIG['rubyhdrdir']
+-      DEFAULT_INCLUDES = [Config::CONFIG['rubyhdrdir'],
+-                          Config::CONFIG['rubyhdrdir'] + "/" + Config::CONFIG['arch'],
+-                          Config::CONFIG["archdir"],Config::CONFIG['sitelibdir'], "."]
++    if RbConfig::CONFIG['rubyhdrdir']
++      DEFAULT_INCLUDES = [RbConfig::CONFIG['rubyhdrdir'],
++                          RbConfig::CONFIG['rubyhdrdir'] + "/" + RbConfig::CONFIG['arch'],
++                          RbConfig::CONFIG["archdir"],RbConfig::CONFIG['sitelibdir'], "."]
+ 
+     else
+-      DEFAULT_INCLUDES = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
+-                          Config::CONFIG['sitelibdir'], "."]
++      DEFAULT_INCLUDES = [RbConfig::CONFIG['includedir'], RbConfig::CONFIG["archdir"],
++                          RbConfig::CONFIG['sitelibdir'], "."]
+     end
+                         
+     # These really shouldn't be static like this..
+@@ -35,11 +35,11 @@
+     # * <tt>:compiler</tt> -- which compiler to use when determining availability
+     # * <tt>:includes</tt> -- directories that should be searched for include files
+     def initialize(options = {})      
+-      @loaded_libs = [(options[:loaded_libs] || Config::CONFIG["LIBS"].gsub('-l', '').split)].flatten
++      @loaded_libs = [(options[:loaded_libs] || RbConfig::CONFIG["LIBS"].gsub('-l', '').split)].flatten
+       @library_paths = [(options[:library_paths] || [])].flatten
+       # Not sure what COMMON_HEADERS looks like when populated
+-      @headers = options[:headers] || [] # Config::CONFIG["COMMON_HEADERS"]
+-      @compiler = options[:compiler] || Config::CONFIG["CC"]
++      @headers = options[:headers] || [] # RbConfig::CONFIG["COMMON_HEADERS"]
++      @compiler = options[:compiler] || RbConfig::CONFIG["CC"]
+       @includes = [(options[:includes] || DEFAULT_INCLUDES)].flatten
+       @logger = Logger.new('mkrf.log')
+       @defines = []
+@@ -167,7 +167,7 @@
+       if RUBY_PLATFORM =~ /mswin/
+         "link -nologo -incremental:no -debug -opt:ref -opt:icf -dll"
+       else
+-        Config::CONFIG['LDSHARED']
++        RbConfig::CONFIG['LDSHARED']
+       end
+     end
+ 
+--- a/lib/mkrf/generator.rb
++++ b/lib/mkrf/generator.rb
+@@ -40,7 +40,7 @@
+   class Generator
+     include Rake
+     
+-    CONFIG = Config::CONFIG
++    CONFIG = RbConfig::CONFIG
+     
+     # Any extra code, given as a string, to be appended to the Rakefile.
+     attr_accessor :additional_code
+--- a/lib/mkrf/rakehelper.rb
++++ b/lib/mkrf/rakehelper.rb
+@@ -41,7 +41,7 @@
+ 
+ def setup_extension(dir, extension)
+   ext = "ext/#{dir}"
+-  ext_so = "#{ext}/#{extension}.#{Config::CONFIG['DLEXT']}"
++  ext_so = "#{ext}/#{extension}.#{RbConfig::CONFIG['DLEXT']}"
+   ext_files = FileList[
+     "#{ext}/*.c",
+     "#{ext}/*.h",

-- 
ruby-mkrf.git



More information about the Pkg-ruby-extras-commits mailing list