Package: ruby-mkrf / 0.2.3+dfsg-5

0300_fix_test_default_include_dir_should_be_from_rbconfig.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
Description: fix test to reflect the full definition of DEFAULT_INCLUDES
 A modification has been made to the library has been made in
 lib/mkrf/availability.rb to take into account the change of include directories
 for Ruby 1.9+ This patch brings the modification to the tests.
Author: C├ędric Boutillier <cedric.boutillier@gmail.com>
Last-Update: 2011-12-15
Forwarded: http://rubyforge.org/pipermail/mkrf-users/2011-December/000070.html

--- a/test/unit/test_availability.rb
+++ b/test/unit/test_availability.rb
@@ -136,9 +136,16 @@
   end
   
   def test_default_include_dir_should_be_from_rbconfig
-    expected = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
+    #Fix to correspond to the definition in lib/mkrf/availability.rb (Debian patch)
+    if Config::CONFIG['rubyhdrdir']
+      expected = [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'], "."]
-                
+    end
+
     assert_equal expected, @avail.send(:instance_variable_get, :@includes)
   end
-end
\ No newline at end of file
+end