Package: ruby-grib / 0.4.0-2

0002-Fix-NArray-PATH.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
From: Debian Ruby Extras Maintainers
 <pkg-ruby-extras-maintainers@lists.alioth.debian.org>
Date: Mon, 20 Jun 2016 21:53:37 +0900
Subject: Fix NArray PATH: search NArray from vendorarchdir

Signed-off-by: Youhei SASAKI <uwabami@gfd-dennou.org>
---
 ext/extconf.rb | 92 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/ext/extconf.rb b/ext/extconf.rb
index 7609e5e..761f2bd 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -1,51 +1,51 @@
 require "mkmf"
 
-na_path = RbConfig::CONFIG["sitearchdir"]
-begin
-  require "rubygems"
-  gem = true
-rescue LoadError
-  gem = false
-end
-if gem
-  if ( na_type = ENV["NARRAY_TYPE"] )
-    nas = [na_type]
-  else
-    nas = %w(narray numru-narray)
-  end
-  if Gem::Specification.respond_to?(:find_by_name)
-    nas.each do |na|
-      begin
-        if ( spec = Gem::Specification.find_by_name(na) )
-          na_type = na
-          na_path = spec.full_gem_path
-          case na_type
-          when "narray"
-            na_path = File.join(na_path, "src")
-          when "numru-narray"
-            na_path = File.join(na_path, "ext", "numru", "narray")
-          end
-          break
-        end
-      rescue LoadError
-      end
-    end
-  else
-    nas.each do |na|
-      if ( spec = Gem.source_index.find_name(na) ).any?
-        na_type = na
-        na_path = spec[0].full_gem_path
-        case na_type
-        when "narray"
-          na_path = File.join(na_path, "src")
-        when "numru-narray"
-          na_path = File.join(na_path, "ext", "numru", "narray")
-        end
-        break
-      end
-    end
-  end
-end
+na_path = RbConfig::CONFIG["vendorarchdir"]
+# begin
+#   require "rubygems"
+#   gem = true
+# rescue LoadError
+#   gem = false
+# end
+# if gem
+#   if ( na_type = ENV["NARRAY_TYPE"] )
+#     nas = [na_type]
+#   else
+#     nas = %w(narray numru-narray)
+#   end
+#   if Gem::Specification.respond_to?(:find_by_name)
+#     nas.each do |na|
+#       begin
+#         if ( spec = Gem::Specification.find_by_name(na) )
+#           na_type = na
+#           na_path = spec.full_gem_path
+#           case na_type
+#           when "narray"
+#             na_path = File.join(na_path, "src")
+#           when "numru-narray"
+#             na_path = File.join(na_path, "ext", "numru", "narray")
+#           end
+#           break
+#         end
+#       rescue LoadError
+#       end
+#     end
+#   else
+#     nas.each do |na|
+#       if ( spec = Gem.source_index.find_name(na) ).any?
+#         na_type = na
+#         na_path = spec[0].full_gem_path
+#         case na_type
+#         when "narray"
+#           na_path = File.join(na_path, "src")
+#         when "numru-narray"
+#           na_path = File.join(na_path, "ext", "numru", "narray")
+#         end
+#         break
+#       end
+#     end
+#   end
+# end
 
 dir_config("narray", na_path, na_path)
 unless have_header("narray.h")