rake-compiler 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,15 @@
1
+ === 0.7.1 / 2010-08-07
2
+
3
+ * Bugfixes:
4
+ * Update gem files to make "gem install -t" works. Closes GH-14
5
+ * Update mocks to work under 1.8.7. Closes GH-15 [luisparravicini]
6
+ * Do not allow cross-ruby be executed under Windows. Closes GH-22
7
+
8
+ * Experimental:
9
+ * Allow JRuby to compile C extensions [timfel].
10
+ It is now possible compile C extensions using latest JRuby. Offered
11
+ in experimental mode since JRuby cext hasn't been officially released.
12
+
1
13
  === 0.7.0 / 2009-12-08
2
14
 
3
15
  * Enhancements
@@ -65,12 +77,12 @@
65
77
  * Allow simultaneous versions of Ruby to compile extensions.
66
78
  This change allow 1.8.x compiles co-exist with 1.9.x ones
67
79
  and don't override each other.
68
-
80
+
69
81
  Please perform <tt>rake clobber</tt> prior compiling again.
70
82
  * Allow optional source file URL for cross-compile tasks.
71
83
  (Thanks to deepj for the patches)
72
84
 
73
- rake-compiler cross-ruby VERSION=1.9.1-p0 SOURCE=http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
85
+ rake-compiler cross-ruby VERSION=1.9.1-p0 SOURCE=http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
74
86
 
75
87
  * Bugfixes
76
88
  * Removed strict versioning for gems since it clash with fat binaries.
@@ -136,7 +148,7 @@
136
148
  === 0.3.0 / 2008-12-07
137
149
 
138
150
  * New features
139
- * Let you specify the Ruby version used for cross compilation instead
151
+ * Let you specify the Ruby version used for cross compilation instead
140
152
  of default one.
141
153
 
142
154
  rake cross compile RUBY_CC_VERSION=1.8
@@ -32,8 +32,20 @@ module Rake
32
32
  @cross_compiling = block if block_given?
33
33
  end
34
34
 
35
+ def binary(platform = nil)
36
+ if platform == "java"
37
+ warn_once <<-EOF
38
+ Compiling a native C extension on JRuby. This is discouraged and a
39
+ Java extension should be preferred.
40
+ EOF
41
+ "#{name}.#{RbConfig::MAKEFILE_CONFIG['DLEXT']}"
42
+ else
43
+ super
44
+ end
45
+ end
46
+
35
47
  def define
36
- if RUBY_PLATFORM == 'java' || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby')
48
+ if (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby')
37
49
  warn_once <<-EOF
38
50
  WARNING: You're attempting to (cross-)compile C extensions from a platform
39
51
  (#{RUBY_ENGINE}) that does not support native extensions or mkmf.rb.
@@ -337,12 +349,18 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
337
349
  if RUBY_PLATFORM =~ /mswin/ then
338
350
  'nmake'
339
351
  else
340
- ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') }
352
+ ENV['MAKE'] || %w[gmake make].find { |c|
353
+ system("#{c} -v >> #{dev_null} 2>&1")
354
+ }
341
355
  end
342
356
  end
343
357
  @make
344
358
  end
345
359
 
360
+ def dev_null
361
+ windows? ? 'NUL' : '/dev/null'
362
+ end
363
+
346
364
  def source_files
347
365
  @source_files ||= FileList["#{@ext_dir}/#{@source_pattern}"]
348
366
  end
@@ -439,6 +439,7 @@ describe Rake::ExtensionTask do
439
439
  def mock_config_yml
440
440
  {
441
441
  'rbconfig-1.8.6' => '/some/path/version/1.8/to/rbconfig.rb',
442
+ 'rbconfig-1.8.7' => '/some/path/version/1.8/to/rbconfig.rb',
442
443
  'rbconfig-1.9.1' => '/some/path/version/1.9.1/to/rbconfig.rb',
443
444
  'rbconfig-3.0.0' => '/some/fake/version/3.0.0/to/rbconfig.rb'
444
445
  }
data/spec/spec.opts ADDED
@@ -0,0 +1,3 @@
1
+ --colour
2
+ --format nested
3
+ --loadby mtime
@@ -26,6 +26,11 @@ require 'yaml'
26
26
  libdir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
27
27
  $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
28
28
 
29
+ if RUBY_PLATFORM =~ /mingw|mswin/ then
30
+ puts "This command is meant to be executed under Linux or OSX, not Windows (is for cross-compilation)"
31
+ exit(1)
32
+ end
33
+
29
34
  require 'rake/extensioncompiler'
30
35
 
31
36
  MAKE = ENV['MAKE'] || %w[gmake make].find { |c| system(c, '-v') }
@@ -161,7 +166,7 @@ task 'update-config' do
161
166
  config = {}
162
167
  end
163
168
 
164
- files = Dir.glob("#{USER_HOME}/ruby/**/rbconfig.rb").sort
169
+ files = Dir.glob("#{USER_HOME}/ruby/*/**/rbconfig.rb").sort
165
170
 
166
171
  files.each do |rbconfig|
167
172
  version = rbconfig.match(/.*-(\d.\d.\d)/)[1]
data/tasks/gem.rake CHANGED
@@ -3,7 +3,7 @@ require 'rubygems/package_task'
3
3
  GEM_SPEC = Gem::Specification.new do |s|
4
4
  # basic information
5
5
  s.name = "rake-compiler"
6
- s.version = "0.7.0"
6
+ s.version = "0.7.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
9
9
  # description and details
@@ -24,8 +24,8 @@ GEM_SPEC = Gem::Specification.new do |s|
24
24
 
25
25
  # components, files and paths
26
26
  s.files = FileList["features/**/*.{feature,rb}", "bin/rake-compiler",
27
- "lib/**/*.rb", "spec/**/*.rb", "tasks/**/*.rake",
28
- "Rakefile", "*.{rdoc,txt,yml}"]
27
+ "lib/**/*.rb", "spec/spec.opts", "spec/**/*.rb",
28
+ "tasks/**/*.rake", "Rakefile", "*.{rdoc,txt,yml}"]
29
29
 
30
30
  s.bindir = 'bin'
31
31
  s.executables = ['rake-compiler']
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ hash: 1
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 7
9
+ - 1
10
+ version: 0.7.1
5
11
  platform: ruby
6
12
  authors:
7
13
  - Luis Lavena
@@ -9,42 +15,64 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-12-08 00:00:00 -03:00
18
+ date: 2010-08-07 00:00:00 -03:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: rake
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 57
30
+ segments:
31
+ - 0
32
+ - 8
33
+ - 3
23
34
  version: 0.8.3
24
35
  - - <
25
36
  - !ruby/object:Gem::Version
37
+ hash: 25
38
+ segments:
39
+ - 0
40
+ - 9
26
41
  version: "0.9"
27
- version:
42
+ type: :runtime
43
+ version_requirements: *id001
28
44
  - !ruby/object:Gem::Dependency
29
45
  name: rspec
30
- type: :development
31
- version_requirement:
32
- version_requirements: !ruby/object:Gem::Requirement
46
+ prerelease: false
47
+ requirement: &id002 !ruby/object:Gem::Requirement
48
+ none: false
33
49
  requirements:
34
50
  - - ~>
35
51
  - !ruby/object:Gem::Version
52
+ hash: 13
53
+ segments:
54
+ - 1
55
+ - 2
56
+ - 9
36
57
  version: 1.2.9
37
- version:
58
+ type: :development
59
+ version_requirements: *id002
38
60
  - !ruby/object:Gem::Dependency
39
61
  name: cucumber
40
- type: :development
41
- version_requirement:
42
- version_requirements: !ruby/object:Gem::Requirement
62
+ prerelease: false
63
+ requirement: &id003 !ruby/object:Gem::Requirement
64
+ none: false
43
65
  requirements:
44
66
  - - ~>
45
67
  - !ruby/object:Gem::Version
68
+ hash: 7
69
+ segments:
70
+ - 0
71
+ - 4
72
+ - 4
46
73
  version: 0.4.4
47
- version:
74
+ type: :development
75
+ version_requirements: *id003
48
76
  description: |-
49
77
  Provide a standard and simplified way to build and package
50
78
  Ruby extensions (C, Java) using Rake as glue.
@@ -81,6 +109,7 @@ files:
81
109
  - lib/rake/extensioncompiler.rb
82
110
  - lib/rake/extensiontask.rb
83
111
  - lib/rake/javaextensiontask.rb
112
+ - spec/spec.opts
84
113
  - spec/lib/rake/extensiontask_spec.rb
85
114
  - spec/lib/rake/javaextensiontask_spec.rb
86
115
  - spec/spec_helper.rb
@@ -112,21 +141,31 @@ rdoc_options:
112
141
  require_paths:
113
142
  - lib
114
143
  required_ruby_version: !ruby/object:Gem::Requirement
144
+ none: false
115
145
  requirements:
116
146
  - - ">="
117
147
  - !ruby/object:Gem::Version
148
+ hash: 59
149
+ segments:
150
+ - 1
151
+ - 8
152
+ - 6
118
153
  version: 1.8.6
119
- version:
120
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
+ none: false
121
156
  requirements:
122
157
  - - ">="
123
158
  - !ruby/object:Gem::Version
159
+ hash: 17
160
+ segments:
161
+ - 1
162
+ - 3
163
+ - 5
124
164
  version: 1.3.5
125
- version:
126
165
  requirements: []
127
166
 
128
167
  rubyforge_project: rake-compiler
129
- rubygems_version: 1.3.5
168
+ rubygems_version: 1.3.7
130
169
  signing_key:
131
170
  specification_version: 3
132
171
  summary: Rake-based Ruby Extension (C, Java) task generator.