cplus2ruby 1.1.0 → 1.1.1

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.
data/cplus2ruby.gemspec CHANGED
@@ -2,10 +2,12 @@ require 'rubygems'
2
2
 
3
3
  spec = Gem::Specification.new do |s|
4
4
  s.name = "cplus2ruby"
5
- s.version = "1.1.0"
5
+ s.version = "1.1.1"
6
6
  s.summary = "Gluing C++ and Ruby together in an OO manner"
7
7
  s.files = Dir['**/*']
8
8
  s.add_dependency('facets', '>= 2.3.0')
9
+ s.requirements << "On Window: gem win32-process"
10
+ s.requirements << "C++ compiler and make"
9
11
 
10
12
  s.author = "Michael Neumann"
11
13
  s.email = "mneumann@ntecs.de"
@@ -47,23 +47,28 @@ class Cplus2Ruby::Compiler
47
47
  make = RUBY_PLATFORM.match('mswin') ? 'nmake' : 'make'
48
48
 
49
49
  Dir.chdir(n[:dir]) do
50
- system("#{make} clean") if File.exist?('Makefile')
50
+ if File.exist?('Makefile')
51
+ system("#{make} clean")
52
+ File.delete('Makefile')
53
+ end
51
54
  write_files(n[:mod])
55
+ end
52
56
 
53
- pid = fork do
54
- require 'mkmf'
55
- $CFLAGS = cflags
56
- $LIBS << (" -lstdc++ " + libs)
57
- create_makefile(n[:mod])
58
- exec "#{make}"
59
- end
60
- _, status = Process.waitpid2(pid)
57
+ pid = fork do
58
+ Dir.chdir(n[:dir])
59
+ $configure_args = {"--srcdir" => Dir.pwd}
60
+ require 'mkmf'
61
+ $CFLAGS = cflags
62
+ $LIBS << (" -lstdc++ " + libs)
63
+ create_makefile(n[:mod])
64
+ exec "#{make}"
65
+ end
66
+ _, status = Process.waitpid2(pid)
61
67
 
62
- if RUBY_PLATFORM.match('mswin')
63
- raise if status != 0
64
- else
65
- raise if status.exitstatus != 0
66
- end
68
+ if RUBY_PLATFORM.match('mswin')
69
+ raise if status != 0
70
+ else
71
+ raise if status.exitstatus != 0
67
72
  end
68
73
 
69
74
  return n[:ld]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cplus2ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Neumann
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-26 00:00:00 +01:00
12
+ date: 2008-03-31 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -63,10 +63,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  - !ruby/object:Gem::Version
64
64
  version: "0"
65
65
  version:
66
- requirements: []
67
-
66
+ requirements:
67
+ - "On Window: gem win32-process"
68
+ - C++ compiler and make
68
69
  rubyforge_project: cplus2ruby
69
- rubygems_version: 1.0.1
70
+ rubygems_version: 1.1.0
70
71
  signing_key:
71
72
  specification_version: 2
72
73
  summary: Gluing C++ and Ruby together in an OO manner