openbabel 2.3.1.8 → 2.3.1.9

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.
@@ -1,9 +1,14 @@
1
1
  require 'fileutils'
2
2
  require 'tmpdir'
3
3
  require 'mkmf'
4
+ $:.unshift File.expand_path('../../../lib', __FILE__)
5
+ require 'openbabel/version'
4
6
 
5
- ob_num_ver="2.3.1"
6
- ob_ver="openbabel-"+ob_num_ver
7
+ ob_num_ver = OpenBabel::VERSION
8
+ ob_ver = "openbabel-"+ob_num_ver
9
+
10
+ RUBY=File.join(RbConfig::CONFIG['bindir'],
11
+ RbConfig::CONFIG['ruby_install_name'])
7
12
 
8
13
  main_dir = File.expand_path(File.join(File.dirname(__FILE__),"..","..","src"))
9
14
  lib_dir = File.expand_path(File.join(File.dirname(__FILE__),"..","..","src"))
@@ -15,27 +20,27 @@ begin
15
20
  Dir.chdir main_dir do
16
21
  FileUtils.rm_rf ob_main_dir
17
22
  puts "Downloading OpenBabel sources"
18
- puts `curl -L -d use_mirror=netcologne "http://downloads.sourceforge.net/project/openbabel/openbabel/#{ob_num_ver}/openbabel-#{ob_num_ver}.tar.gz" | tar xz`
23
+ system "curl -L -d use_mirror=netcologne 'http://downloads.sourceforge.net/project/openbabel/openbabel/#{ob_num_ver}/openbabel-#{ob_num_ver}.tar.gz' | tar xz"
19
24
  end
20
25
  Dir.chdir ob_main_dir do
21
26
  puts "Configuring OpenBabel"
22
- puts `cmake #{ob_main_dir} -DCMAKE_INSTALL_PREFIX=#{lib_dir}`
27
+ system "cmake #{ob_main_dir} -DCMAKE_INSTALL_PREFIX=#{lib_dir}"
23
28
  openbabel_libs = have_library('openbabel')
24
29
  unless openbabel_libs
25
30
  puts "OpenBabel not installed. Compiling sources."
26
- puts `make`
27
- puts `make install`
31
+ system "make"
32
+ system "make install"
28
33
  end
29
34
  end
30
35
  Dir.chdir ob_bindings_dir do
31
36
  puts "Compiling and instaling OpenBabel Ruby bindings."
32
- `sed -i -e 's/Init_OpenBabel/Init_openbabel/g' *cpp`
37
+ system "sed -i -e 's/Init_OpenBabel/Init_openbabel/g' *cpp"
33
38
  # get include and lib from pkg-config
34
39
  ob_include=`pkg-config openbabel-2.0 --cflags-only-I`.sub(/\s+/,'').sub(/-I/,'')
35
40
  ob_lib=`pkg-config openbabel-2.0 --libs-only-L`.sub(/\s+/,'').sub(/-L/,'')
36
- `ruby extconf.rb --with-openbabel-include=#{ob_include} --with-openbabel-lib=#{ob_lib}`
37
- `sed -i -e 's/-flat_namespace//' Makefile`
38
- puts `make`
41
+ system "#{RUBY} extconf.rb --with-openbabel-include=#{ob_include} --with-openbabel-lib=#{ob_lib}"
42
+ system "sed -i -e 's/-Wl,-flat_namespace//;s/-flat_namespace//' Makefile"
43
+ system "make"
39
44
  end
40
45
  FileUtils.cp(ob_bindings_dir+"/openbabel.#{RbConfig::CONFIG["DLEXT"]}", "./")
41
46
  File.open('Makefile', 'w') do |makefile|
@@ -1 +1,2 @@
1
1
  require 'openbabel/openbabel'
2
+ require 'openbabel/version'
@@ -0,0 +1,4 @@
1
+ module OpenBabel
2
+ VERSION = '2.3.1'
3
+ GEMVERSION = VERSION + '.9'
4
+ end
@@ -1,4 +1,7 @@
1
1
  require 'test/unit'
2
+
3
+ $:.unshift File.expand_path('../../lib', __FILE__)
4
+ $:.unshift File.expand_path('../../ext', __FILE__)
2
5
  require 'openbabel'
3
6
  include OpenBabel
4
7
 
metadata CHANGED
@@ -1,69 +1,51 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: openbabel
3
- version: !ruby/object:Gem::Version
4
- hash: 99
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.3.1.9
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 3
9
- - 1
10
- - 8
11
- version: 2.3.1.8
12
6
  platform: ruby
13
- authors:
7
+ authors:
14
8
  - Andreas Maunz, Christoph Helma, Katsuhiko Nishimra
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2012-11-06 00:00:00 Z
12
+ date: 2012-04-03 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
14
  description: OpenBabel as a GEM
23
15
  email: andreas@maunz.de
24
16
  executables: []
25
-
26
- extensions:
17
+ extensions:
27
18
  - ext/openbabel/extconf.rb
28
19
  extra_rdoc_files: []
29
-
30
- files:
20
+ files:
31
21
  - Rakefile
32
22
  - lib/openbabel.rb
23
+ - lib/openbabel/version.rb
33
24
  - test/test_openbabel.rb
34
25
  - ext/openbabel/extconf.rb
35
26
  homepage: http://cs.maunz.de
36
27
  licenses: []
37
-
38
28
  post_install_message:
39
29
  rdoc_options: []
40
-
41
- require_paths:
30
+ require_paths:
42
31
  - lib
43
- required_ruby_version: !ruby/object:Gem::Requirement
32
+ required_ruby_version: !ruby/object:Gem::Requirement
44
33
  none: false
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- hash: 3
49
- segments:
50
- - 0
51
- version: "0"
52
- required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
61
44
  requirements: []
62
-
63
45
  rubyforge_project:
64
- rubygems_version: 1.8.15
46
+ rubygems_version: 1.8.11
65
47
  signing_key:
66
48
  specification_version: 3
67
49
  summary: OpenBabel!
68
- test_files:
50
+ test_files:
69
51
  - test/test_openbabel.rb