openbabel 2.3.1.2 → 2.3.1.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.
Files changed (4) hide show
  1. data/Rakefile +1 -0
  2. data/ext/openbabel/extconf.rb +17 -6
  3. metadata +23 -42
  4. data/README.md +0 -15
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ require "bundler/gem_tasks"
1
2
  require 'rake/testtask'
2
3
 
3
4
  Rake::TestTask.new do |t|
@@ -4,22 +4,33 @@ require 'tmpdir'
4
4
  ob_num_ver="2.3.1"
5
5
  ob_ver="openbabel-"+ob_num_ver
6
6
 
7
- main_dir = Dir.mktmpdir
8
- ob_main_dir=main_dir+"/"+ob_ver
9
- ob_bindings_dir=ob_main_dir+"/scripts/ruby"
7
+ main_dir = File.expand_path(File.join(File.dirname(__FILE__),"..","..","src"))
8
+ lib_dir = File.expand_path(File.join(File.dirname(__FILE__),"..","..","src"))
9
+ Dir.mkdir main_dir
10
+ ob_main_dir = File.join(main_dir,ob_ver)
11
+ ob_bindings_dir = File.join(ob_main_dir,"scripts","ruby")
10
12
 
11
13
  begin
12
14
  Dir.chdir main_dir do
13
15
  FileUtils.rm_rf ob_main_dir
14
- `curl -L -d use_mirror=netcologne "http://downloads.sourceforge.net/project/openbabel/openbabel/#{ob_num_ver}/openbabel-#{ob_num_ver}.tar.gz" | tar xz`
16
+ puts "Downloading OpenBabel sources"
17
+ 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`
15
18
  end
16
19
  Dir.chdir ob_main_dir do
17
- `cmake #{ob_main_dir}`
20
+ puts "Configuring OpenBabel"
21
+ puts `cmake #{ob_main_dir} -DCMAKE_INSTALL_PREFIX=#{lib_dir}`
22
+ unless File.exists?(`which obabel`.chomp)
23
+ puts "OpenBabel not installed. Compiling sources."
24
+ puts `make`
25
+ puts `make install`
26
+ end
18
27
  end
19
28
  Dir.chdir ob_bindings_dir do
29
+ puts "Compiling and instaling OpenBabel Ruby bindings."
20
30
  `sed -i 's/Init_OpenBabel/Init_openbabel/g' *cpp`
21
31
  require './extconf.rb'
22
- `make`
32
+ `sed -i 's/-flat_namespace//' Makefile`
33
+ puts `make`
23
34
  end
24
35
  FileUtils.cp(ob_bindings_dir+"/openbabel.so", "./")
25
36
  ensure
metadata CHANGED
@@ -1,70 +1,51 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: openbabel
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 2
7
- - 3
8
- - 1
9
- - 2
10
- version: 2.3.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.3.1.3
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
13
- - Andreas Maunz
7
+ authors:
8
+ - Andreas Maunz, Christoph Helma
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-03 00:00:00 +02:00
19
- default_executable:
12
+ date: 2012-04-03 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
- description: "OpenBabel GEM. Depends on: OpenBabel dev lib, curl, and cmake. Compiles on POSIX systems."
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
- - README.md
33
22
  - lib/openbabel.rb
34
23
  - ext/openbabel/Makefile
35
24
  - test/test_openbabel.rb
36
25
  - ext/openbabel/extconf.rb
37
- has_rdoc: true
38
26
  homepage: http://cs.maunz.de
39
27
  licenses: []
40
-
41
28
  post_install_message:
42
29
  rdoc_options: []
43
-
44
- require_paths:
30
+ require_paths:
45
31
  - lib
46
- required_ruby_version: !ruby/object:Gem::Requirement
32
+ required_ruby_version: !ruby/object:Gem::Requirement
47
33
  none: false
48
- requirements:
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- segments:
52
- - 0
53
- version: "0"
54
- 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
55
39
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- segments:
60
- - 0
61
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
62
44
  requirements: []
63
-
64
45
  rubyforge_project:
65
- rubygems_version: 1.3.7
46
+ rubygems_version: 1.8.18
66
47
  signing_key:
67
48
  specification_version: 3
68
49
  summary: OpenBabel!
69
- test_files:
50
+ test_files:
70
51
  - test/test_openbabel.rb
data/README.md DELETED
@@ -1,15 +0,0 @@
1
- # openbabel gem
2
-
3
- GEM for [OpenBabel](http://openbabel.sf.net), a chemical library by Noel O'Boyle and others.
4
-
5
- openbabel gem has been tested with ruby 1.9. It only compiles on POSIX systems and requires the following to be installed already:
6
-
7
- * openbabel library
8
- * cmake
9
- * curl
10
- * tar, sed, make (those should be present anyway)
11
-
12
- ## Install
13
- gem install openbabel
14
-
15
- It downloads the sources, compiles the ruby bindings and installs them. Check out [http://cs.maunz.de](http://cs.maunz.de) for more information.