Package: ruby-mkrf / 0.2.3+dfsg-5

0900_multiarch.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Index: ruby-mkrf/lib/mkrf/availability.rb
===================================================================
--- ruby-mkrf.orig/lib/mkrf/availability.rb	2013-12-24 00:39:20.045251620 +0100
+++ ruby-mkrf/lib/mkrf/availability.rb	2013-12-24 00:39:20.041251633 +0100
@@ -9,15 +9,15 @@ module Mkrf
   # which need to determine functionality based on what libraries are available
   # on the current system.
   class Availability
-    # ruby 1.9+
-    if RbConfig::CONFIG['rubyhdrdir']
-      DEFAULT_INCLUDES = [RbConfig::CONFIG['rubyhdrdir'],
+    # ruby 2.0+
+    if RbConfig::CONFIG['rubyarchhdrdir']
+      DEFAULT_INCLUDES = [RbConfig::CONFIG['rubyarchhdrdir'],RbConfig::CONFIG['rubyhdrdir'],
                           RbConfig::CONFIG['rubyhdrdir'] + "/" + RbConfig::CONFIG['arch'],
                           RbConfig::CONFIG["archdir"],RbConfig::CONFIG['sitelibdir'], "."]
-
     else
-      DEFAULT_INCLUDES = [RbConfig::CONFIG['includedir'], RbConfig::CONFIG["archdir"],
-                          RbConfig::CONFIG['sitelibdir'], "."]
+      DEFAULT_INCLUDES = [RbConfig::CONFIG['rubyhdrdir'],
+                          RbConfig::CONFIG['rubyhdrdir'] + "/" + RbConfig::CONFIG['arch'],
+                          RbConfig::CONFIG["archdir"],RbConfig::CONFIG['sitelibdir'], "."]
     end
                         
     # These really shouldn't be static like this..
Index: ruby-mkrf/test/unit/test_availability.rb
===================================================================
--- ruby-mkrf.orig/test/unit/test_availability.rb	2013-12-24 00:39:19.817252417 +0100
+++ ruby-mkrf/test/unit/test_availability.rb	2013-12-24 00:40:20.193079805 +0100
@@ -137,13 +137,14 @@ class TestAvailabilityDefaults < Test::U
   
   def test_default_include_dir_should_be_from_rbconfig
     #Fix to correspond to the definition in lib/mkrf/availability.rb (Debian patch)
-    if Config::CONFIG['rubyhdrdir']
-      expected = [Config::CONFIG['rubyhdrdir'],
+    if Config::CONFIG['rubyarchhdrdir']
+      expected = [Config::CONFIG['rubyarchhdrdir'],Config::CONFIG['rubyhdrdir'],
                 Config::CONFIG['rubyhdrdir'] + "/" + Config::CONFIG['arch'],
                 Config::CONFIG["archdir"],Config::CONFIG['sitelibdir'], "."]
     else
-      expected = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
-                Config::CONFIG['sitelibdir'], "."]
+      expected = [Config::CONFIG['rubyhdrdir'],
+                Config::CONFIG['rubyhdrdir'] + "/" + Config::CONFIG['arch'],
+                Config::CONFIG["archdir"],Config::CONFIG['sitelibdir'], "."]
     end
 
     assert_equal expected, @avail.send(:instance_variable_get, :@includes)