rake-compiler 0.8.1 → 0.8.2

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,3 +1,8 @@
1
+ === 0.8.2 / 2013-01-11
2
+
3
+ * Bugfixes:
4
+ * Unset CC, LDFLAGS and CPPFLAGS prior cross-compiling. Closes #55
5
+
1
6
  === 0.8.1 / 2012-04-15
2
7
 
3
8
  * Bugfixes:
@@ -69,6 +69,12 @@ contribute back to your project.
69
69
  Now the fun part. It's time to introduce the code to your projects Rakefile
70
70
  to tell it to use rake-compiler to build your extension:
71
71
 
72
+ # File: extconf.rb
73
+
74
+ # this line should already exist
75
+ create_makefile('hello_world')
76
+
77
+
72
78
  # File: Rakefile
73
79
 
74
80
  require 'rake/extensiontask'
@@ -78,6 +84,12 @@ to tell it to use rake-compiler to build your extension:
78
84
  That's it? Yes, that's it! No other lines of code are needed for
79
85
  rake-compiler to work its magic.
80
86
 
87
+ Though, you need to make sure the parameter to <tt>create_makefile</tt>
88
+ and <tt>ExtensionTask.new</tt> are the same or rake-compiler will not mimic
89
+ the RubyGems standard install process. You can override this standard
90
+ behaviour if needed, see the instructions for "non-standard project structure"
91
+ below for details.
92
+
81
93
  If you want to do the same for a JRuby extension written in Java, it's just
82
94
  as easy:
83
95
 
@@ -16,7 +16,7 @@ Feature: Cross-compile C extensions
16
16
  Given that all my source files are in place
17
17
  And I'm running a POSIX operating system
18
18
  And I've installed cross compile toolchain
19
- When rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.2' is invoked
20
- Then rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.2' succeeded
19
+ When rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.3' is invoked
20
+ Then rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.3' succeeded
21
21
  And binaries for platform 'i386-mingw32' version '1.8' get copied
22
22
  And binaries for platform 'i386-mingw32' version '1.9' get copied
@@ -6,7 +6,9 @@ Given %r{^I'm running a POSIX operating system$} do
6
6
  end
7
7
 
8
8
  Given %r{^I've installed cross compile toolchain$} do
9
- pending 'Cannot locate suitable compiler in the PATH.' unless search_path(%w(i586-mingw32msvc-gcc i386-mingw32-gcc))
9
+ unless search_path(%w(i586-mingw32msvc-gcc i386-mingw32-gcc i686-w64-mingw32-gcc))
10
+ pending 'Cannot locate suitable compiler in the PATH.'
11
+ end
10
12
  end
11
13
 
12
14
  Then /^binaries for platform '(.*)' get generated$/ do |platform|
@@ -25,7 +25,7 @@ Then /^a gem for '(.*)' version '(.*)' platform '(.*)' do exist in '(.*)'$/ do |
25
25
  end
26
26
 
27
27
  Then /^gem for platform '(.*)' get generated$/ do |platform|
28
- Then "a gem for 'gem_abc' version '0.1.0' platform '#{platform}' do exist in 'pkg'"
28
+ step "a gem for 'gem_abc' version '0.1.0' platform '#{platform}' do exist in 'pkg'"
29
29
  end
30
30
 
31
31
  def gem_file(folder, name, version)
@@ -73,7 +73,7 @@ module Rake
73
73
  end
74
74
 
75
75
  def source_files
76
- @source_files ||= FileList["#{@ext_dir}/#{@source_pattern}"]
76
+ FileList["#{@ext_dir}/#{@source_pattern}"]
77
77
  end
78
78
 
79
79
  def warn_once(message)
File without changes
@@ -53,6 +53,11 @@ MAJOR = RUBY_CC_VERSION.match(/.*-(\d.\d).\d/)[1]
53
53
  MINGW_HOST = ENV['HOST'] || Rake::ExtensionCompiler.mingw_host
54
54
  MINGW_TARGET = MINGW_HOST.gsub('msvc', '')
55
55
 
56
+ # Unset any possible variable that might affect compilation
57
+ ["CC", "CXX", "CPPFLAGS", "LDFLAGS", "RUBYOPT"].each do |var|
58
+ ENV.delete(var)
59
+ end
60
+
56
61
  # define a location where sources will be stored
57
62
  directory "#{USER_HOME}/sources/#{RUBY_CC_VERSION}"
58
63
  directory "#{USER_HOME}/builds/#{RUBY_CC_VERSION}"
@@ -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.8.1"
6
+ s.version = "0.8.2"
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
9
9
  # description and details
metadata CHANGED
@@ -1,61 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler
3
- version: !ruby/object:Gem::Version
4
- version: 0.8.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 59
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 2
10
+ version: 0.8.2
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Luis Lavena
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-15 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-01-12 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: rake
16
- requirement: &23703696 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *23703696
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: rspec
27
- requirement: &23703396 !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
28
38
  none: false
29
- requirements:
39
+ requirements:
30
40
  - - ~>
31
- - !ruby/object:Gem::Version
41
+ - !ruby/object:Gem::Version
42
+ hash: 47
43
+ segments:
44
+ - 2
45
+ - 8
46
+ - 0
32
47
  version: 2.8.0
33
48
  type: :development
34
- prerelease: false
35
- version_requirements: *23703396
36
- - !ruby/object:Gem::Dependency
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
37
51
  name: cucumber
38
- requirement: &23703120 !ruby/object:Gem::Requirement
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
39
54
  none: false
40
- requirements:
55
+ requirements:
41
56
  - - ~>
42
- - !ruby/object:Gem::Version
57
+ - !ruby/object:Gem::Version
58
+ hash: 27
59
+ segments:
60
+ - 1
61
+ - 1
62
+ - 4
43
63
  version: 1.1.4
44
64
  type: :development
45
- prerelease: false
46
- version_requirements: *23703120
47
- description: ! 'Provide a standard and simplified way to build and package
48
-
49
- Ruby extensions (C, Java) using Rake as glue.'
65
+ version_requirements: *id003
66
+ description: |-
67
+ Provide a standard and simplified way to build and package
68
+ Ruby extensions (C, Java) using Rake as glue.
50
69
  email: luislavena@gmail.com
51
- executables:
70
+ executables:
52
71
  - rake-compiler
53
72
  extensions: []
54
- extra_rdoc_files:
73
+
74
+ extra_rdoc_files:
55
75
  - README.rdoc
56
76
  - LICENSE.txt
57
77
  - History.txt
58
- files:
78
+ files:
59
79
  - features/compile.feature
60
80
  - features/cross-compile.feature
61
81
  - features/cross-package-multi.feature
@@ -99,32 +119,44 @@ files:
99
119
  - LICENSE.txt
100
120
  - cucumber.yml
101
121
  homepage: http://github.com/luislavena/rake-compiler
102
- licenses:
122
+ licenses:
103
123
  - MIT
104
124
  post_install_message:
105
- rdoc_options:
125
+ rdoc_options:
106
126
  - --main
107
127
  - README.rdoc
108
128
  - --title
109
129
  - rake-compiler -- Documentation
110
- require_paths:
130
+ require_paths:
111
131
  - lib
112
- required_ruby_version: !ruby/object:Gem::Requirement
132
+ required_ruby_version: !ruby/object:Gem::Requirement
113
133
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ hash: 59
138
+ segments:
139
+ - 1
140
+ - 8
141
+ - 6
117
142
  version: 1.8.6
118
- required_rubygems_version: !ruby/object:Gem::Requirement
143
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
144
  none: false
120
- requirements:
121
- - - ! '>='
122
- - !ruby/object:Gem::Version
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ hash: 17
149
+ segments:
150
+ - 1
151
+ - 3
152
+ - 5
123
153
  version: 1.3.5
124
154
  requirements: []
155
+
125
156
  rubyforge_project: rake-compiler
126
- rubygems_version: 1.8.17
157
+ rubygems_version: 1.8.24
127
158
  signing_key:
128
159
  specification_version: 3
129
160
  summary: Rake-based Ruby Extension (C, Java) task generator.
130
161
  test_files: []
162
+