rbmetis 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/ext/extconf.rb +27 -16
- data/lib/rbmetis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5433b1d86d01190927c49c86cda5eed1998be763
|
4
|
+
data.tar.gz: d55dee2fd223df626a49e6af417d1e6510555500
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9ebf715454c18fa326bbb7caa86e6faa6e702f0f23d1cf849268e797649558280e90b823c4b5dfb9a713ee6669f2302b6e7909b335fd7e193c6151051d994b5
|
7
|
+
data.tar.gz: ba2528e45fd9c64a43b8b8cb58b03b9e5851912900026bb76b9b6bd64b4e0f0c12d29ebb90daf295708ca0458eade3d85845e62667880fe2754f7c60cb1770b6
|
data/README.md
CHANGED
data/ext/extconf.rb
CHANGED
@@ -12,23 +12,26 @@ libdirs |= %w[/usr/lib64 /usr/lib /usr/local/lib]
|
|
12
12
|
incdirs = $CPPFLAGS.scan(/(?<=^-I|\s-I)\S+/)
|
13
13
|
incdirs |= %w[/usr/include /usr/local/include]
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
print "searching libmetis.so ..."
|
17
16
|
libdirs.each do |dir|
|
18
|
-
libmetis.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
break
|
23
|
-
end
|
17
|
+
path = File.join(dir,"libmetis.so")
|
18
|
+
if File.exist?(path)
|
19
|
+
$libmetis = path
|
20
|
+
break
|
24
21
|
end
|
25
|
-
|
22
|
+
end
|
23
|
+
if $libmetis
|
24
|
+
puts "found"
|
25
|
+
else
|
26
|
+
puts "not found"
|
27
|
+
exit
|
26
28
|
end
|
27
29
|
|
30
|
+
print "searching metis.h ..."
|
28
31
|
incdirs.each do |dir|
|
29
32
|
path = File.join(dir,'metis.h')
|
30
33
|
if File.exist?(path)
|
31
|
-
|
34
|
+
$metis_h = path
|
32
35
|
open(path,'r').each do |line|
|
33
36
|
case line
|
34
37
|
when /^\s*#define\s+IDXTYPEWIDTH\s+(\d+)/
|
@@ -40,17 +43,25 @@ incdirs.each do |dir|
|
|
40
43
|
break
|
41
44
|
end
|
42
45
|
end
|
46
|
+
if $metis_h
|
47
|
+
puts "found"
|
48
|
+
else
|
49
|
+
puts "not found"
|
50
|
+
exit
|
51
|
+
end
|
43
52
|
|
44
|
-
|
45
|
-
print "creating #{conf_file}\n"
|
46
|
-
open(conf_file, "w") do |f|
|
47
|
-
f.puts <<EOL
|
48
|
-
module RbMetis
|
53
|
+
config = <<EOL
|
49
54
|
IDXTYPEWIDTH=#{$idxtypewidth}
|
50
55
|
REALTYPEWIDTH=#{$realtypewidth}
|
51
56
|
LIBMETIS='#{$libmetis}'
|
52
|
-
end
|
53
57
|
EOL
|
58
|
+
puts "config options:"
|
59
|
+
puts config
|
60
|
+
|
61
|
+
conf_file = File.join("..","lib","rbmetis","config.rb")
|
62
|
+
print "writing #{conf_file}\n"
|
63
|
+
open(conf_file, "w") do |f|
|
64
|
+
f.puts "module RbMetis\n"+config+"end"
|
54
65
|
end
|
55
66
|
|
56
67
|
create_makefile("rbmetis")
|
data/lib/rbmetis/version.rb
CHANGED