openbabel 2.3.1.8 → 2.3.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/openbabel/extconf.rb +15 -10
- data/lib/openbabel.rb +1 -0
- data/lib/openbabel/version.rb +4 -0
- data/test/test_openbabel.rb +3 -0
- metadata +21 -39
data/ext/openbabel/extconf.rb
CHANGED
@@ -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=
|
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
|
-
|
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
|
-
|
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
|
-
|
27
|
-
|
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
|
-
|
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
|
-
|
37
|
-
|
38
|
-
|
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|
|
data/lib/openbabel.rb
CHANGED
data/test/test_openbabel.rb
CHANGED
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
|
-
|
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
|
-
|
49
|
-
|
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
|
-
|
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.
|
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
|