rbmetis 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6456406cf4252bc0692d534f3b85cec0a4e621a
4
- data.tar.gz: f9cd37317d811d5d62dd26dfc002d7fb3fab9e6d
3
+ metadata.gz: 5433b1d86d01190927c49c86cda5eed1998be763
4
+ data.tar.gz: d55dee2fd223df626a49e6af417d1e6510555500
5
5
  SHA512:
6
- metadata.gz: 5499b3c815b1676788815dc3a99ce0b81f9b5b756833823d619938e35113c0686b103ac945c428e940a18319046d967fc26dc2483b98baeb93bff4e3421029fb
7
- data.tar.gz: 07895198f08edcf3714fa5775e21f2abb214d6da60fad7949f8d3c047ac7799288363a5d4419258d3cede09d3f0f752b5a323fd21399ccd319920df8d4890961
6
+ metadata.gz: f9ebf715454c18fa326bbb7caa86e6faa6e702f0f23d1cf849268e797649558280e90b823c4b5dfb9a713ee6669f2302b6e7909b335fd7e193c6151051d994b5
7
+ data.tar.gz: ba2528e45fd9c64a43b8b8cb58b03b9e5851912900026bb76b9b6bd64b4e0f0c12d29ebb90daf295708ca0458eade3d85845e62667880fe2754f7c60cb1770b6
data/README.md CHANGED
@@ -37,6 +37,7 @@ cd to tree top and run:
37
37
  * How to pass option to extconf.rb
38
38
 
39
39
  $ gem install rbmetis -- --with-metis-dir=/opt/metis
40
+ or
40
41
  $ ruby setup.rb -- --with-metis-dir=/opt/metis
41
42
 
42
43
  ## Usage
@@ -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
- libmetis = %w[libmetis.so libmetis.a]
16
-
15
+ print "searching libmetis.so ..."
17
16
  libdirs.each do |dir|
18
- libmetis.each do |name|
19
- path = File.join(dir,name)
20
- if File.exist?(path)
21
- $libmetis = path
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
- break if $libmetis
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
- puts "reading #{path}"
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
- conf_file = File.join("..","lib","rbmetis","config.rb")
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")
@@ -1,3 +1,3 @@
1
1
  module RbMetis
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbmetis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro TANAKA