rake-compiler 1.1.1 → 1.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8c720116334e8a54ca3029125770c4bec5b7b7a4cf1f51e5b6784a884834934
4
- data.tar.gz: b4e8b071bfb222435f4beb1a9f2e4ba321faa36e77a7c1b75519a2650ed4980c
3
+ metadata.gz: dc1a9473b798baedf27b268735d3a4ca35899fa524d39311e39085903902c176
4
+ data.tar.gz: 740e10b92d44ef53ec07ff512b8fafff7b013ea01f096caf3829141a406b30b9
5
5
  SHA512:
6
- metadata.gz: 32e025cf3a640534b5f1448cf0d89b45d41825dcf5ea2d0bd5dd5cc5037375206e8955749e95a65bbe9c6b1f66a17ee15703099df3a9785273d1b38e106631c3
7
- data.tar.gz: 2eaf2fdad874b8e875233d121d071aaad651d1c98c711f2e55d69141b6e41177dc62bb29bbdfaec19b17b097ce08006eef11e8e279dfa181d043f6ed3de36f6b
6
+ metadata.gz: 20809270e0c37bd854462309eeebcb312e04c270a4f6ceff0bff6b6d1ff9bfe48e8d54d53f6aae63f52628b3267b5bda00357dd162b7a8e1f16259c12252e2c9
7
+ data.tar.gz: 348d0b64112854c43519814ff20b077972ae1fd8e6acce966f287e89e09b25ca4c11f7e7db7b12bd4960780e052047a0cff7665427eec60ae0114fe63ad8e8e9
data/History.md ADDED
@@ -0,0 +1,528 @@
1
+ ### 1.1.5 / 2021-12-12
2
+
3
+ * Fixes:
4
+ * Fix a regression bug that wrong install location is used when name that includes `/` is specified to `Rake::ExtensionTask.new`.
5
+ [#196](https://github.com/rake-compiler/rake-compiler/issues/196) [Reported by konsolebox]
6
+
7
+ ### 1.1.4 / 2021-12-11
8
+
9
+ * Fixes:
10
+ * Fix a regression bug that installed gem can't be found on cross compile.
11
+ [#195](https://github.com/rake-compiler/rake-compiler/issues/195) [Reported by Mike Dalessio]
12
+
13
+ ### 1.1.3 / 2021-12-08
14
+
15
+ * Fixes:
16
+ * Fix a regression bug that wrong install location is used.
17
+ [#194](https://github.com/rake-compiler/rake-compiler/issues/194) [Reported by Andrew Kane]
18
+
19
+ ### 1.1.2 / 2021-12-07
20
+
21
+ * Changes:
22
+ * Use .tar.gz instead of .tar.bz2 for Ruby archive.
23
+ [#179](https://github.com/rake-compiler/rake-compiler/pull/179) [Patch by Masaki Hara]
24
+ * Stop removing `CC`, `CXX`, `CPPFLAGS` and `LDFLAGS` environment variables for cross-build.
25
+ [#182](https://github.com/rake-compiler/rake-compiler/pull/182) [Patch by Lars Kanis]
26
+ * Remove IronRuby related message.
27
+ [#184](https://github.com/rake-compiler/rake-compiler/pull/184) [Patch by Thomas E Enebo]
28
+ * Suppress a warning.
29
+ [#185](https://github.com/rake-compiler/rake-compiler/pull/185) [Patch by Olle Jonsson]
30
+ * Rename `History.txt` to `History.md`.
31
+ [#174](https://github.com/rake-compiler/rake-compiler/pull/174) [Patch by MSP-Greg]
32
+ * Use `make install` instead of copying artifacts manually.
33
+ [#191](https://github.com/rake-compiler/rake-compiler/pull/191) [Patch by Lars Kanis]
34
+
35
+ * Enhancements:
36
+ * Add support for building cross rubies in parallel.
37
+ [#169](https://github.com/rake-compiler/rake-compiler/pull/169) [Patch by Lars Kanis]
38
+ * Use `RAKE_EXTENSION_TASK_NO_NATIVE` environment variable as the default `no_native` value.
39
+ * Add support for `rake native gem` without `cross`.
40
+ [#166](https://github.com/rake-compiler/rake-compiler/pull/166) [Patch by Lars Kanis]
41
+
42
+ ### 1.1.1 / 2020-07-10
43
+
44
+ * Changes:
45
+ * Bump the default Java bytecode to 1.7.
46
+ [#172](https://github.com/rake-compiler/rake-compiler/pull/172) [Patch by Charles Oliver Nutter]
47
+
48
+ * Enhancements:
49
+ * Add support for finding x86_64 MinGW GCC.
50
+ [#164](https://github.com/rake-compiler/rake-compiler/pull/164) [Patch by Lars Kanis]
51
+ * Strip cross compiled shared library automatically.
52
+ [#165](https://github.com/rake-compiler/rake-compiler/pull/165) [Patch by Lars Kanis]
53
+
54
+ ### 1.1.0 / 2019-12-25
55
+
56
+ * Bugfixes:
57
+ * Fix a bug that JavaExtenstionTask can't build anything.
58
+ [#163](https://github.com/rake-compiler/rake-compiler/issues/163) [Reported by Kai Kuchenbecker]
59
+
60
+ ### 1.0.9 / 2019-12-23
61
+
62
+ * Changes:
63
+ * Use "-Xlint" option for JRuby native extension by default.
64
+ [#158](https://github.com/rake-compiler/rake-compiler/pull/158) [Patch by Stephen George]
65
+
66
+ * Enhancements:
67
+ * Make customizable compiler Xlint option for JRuby native extension.
68
+ [#118](https://github.com/rake-compiler/rake-compiler/pull/118) [Patch by Hiroshi Hatake]
69
+ * Add support for Ruby 2.7.
70
+ [#161](https://github.com/rake-compiler/rake-compiler/pull/161) [Reported by Masaki Hara]
71
+
72
+ ### 1.0.8 / 2019-09-21
73
+
74
+ * Enhancements:
75
+ * Added Rake::JavaExtensionTask#encoding= to pass the -encoding option to
76
+ javac.
77
+ [#157](https://github.com/rake-compiler/rake-compiler/pull/157) [Patch by Tiago Dias]
78
+
79
+ * Bugfixes:
80
+ * Drop EOL'd rubyforge_project directive from .gemspec.
81
+ [#155](https://github.com/rake-compiler/rake-compiler/pull/155) [Patch by Olle Jonsson]
82
+
83
+ ### 1.0.7 / 2019-01-04
84
+
85
+ * Bugfixes:
86
+ * Fix a bug that JRuby class path detection is failed on
87
+ cross-compilation.
88
+ [#149](https://github.com/rake-compiler/rake-compiler/issues/149) [#151](https://github.com/rake-compiler/rake-compiler/pull/151) [Reported by Chalupa Petr][Patch by Prashant Vithani]
89
+
90
+ ### 1.0.6 / 2018-12-23
91
+
92
+ * Enhancements:
93
+ * Stop to make unreleased Ruby installable.
94
+ [#150](https://github.com/rake-compiler/rake-compiler/issues/150) [Reported by MSP-Greg]
95
+
96
+ ### 1.0.5 / 2018-08-31
97
+
98
+ * Enhancements:
99
+ * Improve JRuby class pass detection.
100
+ [#147](https://github.com/rake-compiler/rake-compiler/pull/147) [Patch by Prashant Vithani]
101
+ * Update the default source and target versions to Java 6.
102
+ [#148](https://github.com/rake-compiler/rake-compiler/pull/148) [Patch by Prashant Vithani]
103
+
104
+ ### 1.0.4 / 2017-05-27
105
+
106
+ * Enhancements:
107
+ * Migrate to RSpec 3 from RSpec 2.
108
+ * Add more tests.
109
+ [#140](https://github.com/rake-compiler/rake-compiler/pull/140) [Patch by Lars Kanis]
110
+ * Support C++ source files by default.
111
+ [#141](https://github.com/rake-compiler/rake-compiler/pull/141) [Patch by Takashi Kokubun]
112
+ * Suppress warnings.
113
+ [#142](https://github.com/rake-compiler/rake-compiler/pull/142) [Patch by Akira Matsuda]
114
+
115
+ ### 1.0.3 / 2016-12-02
116
+
117
+ * Enhancements:
118
+ * Support specifying required Ruby versions.
119
+ [#137](https://github.com/rake-compiler/rake-compiler/pull/137) [Patch by Lars Kanis]
120
+
121
+ ### 1.0.2 / 2016-11-13
122
+
123
+ * Bugfixes:
124
+ * Fix Ruby version detection example code in README.
125
+ [#135](https://github.com/rake-compiler/rake-compiler/pull/135) [Patch by Nicolas Noble]
126
+ * Fix version detection.
127
+ [#136](https://github.com/rake-compiler/rake-compiler/pull/136) [Patch by Lars Kanis]
128
+
129
+ ### 1.0.1 / 2016-06-21
130
+
131
+ * Bugfixes:
132
+ * Add missing dependency.
133
+
134
+ ### 1.0.0 / 2016-06-21
135
+
136
+ * Enhancements:
137
+ * Really support extension in sub directory.
138
+
139
+ ### 0.9.9 / 2016-05-10
140
+
141
+ * Bugfixes:
142
+ * Support Symbol as extension name again.
143
+ [#134](https://github.com/rake-compiler/rake-compiler/pull/134) [Patch by Takashi Kokubun]
144
+
145
+ ### 0.9.8 / 2016-04-29
146
+
147
+ * Enhancements:
148
+ * Support extension in sub directory.
149
+ [#128](https://github.com/rake-compiler/rake-compiler/pull/128), [#129](https://github.com/rake-compiler/rake-compiler/pull/129) [Patch by Kenta Murata]
150
+
151
+ ### 0.9.7 / 2016-03-16
152
+
153
+ * Bugfixes:
154
+ * May fix "make" detection on Windows.
155
+ [#123](https://github.com/rake-compiler/rake-compiler/issues/123) [Reported by Aaron Stone]
156
+
157
+ ### 0.9.6 / 2016-03-04
158
+
159
+ * Enhancements:
160
+ * Add more descriptions into README.
161
+ Closes [#105](https://github.com/rake-compiler/rake-compiler/pull/105) [Patch by Aaron Stone]
162
+ * Remove needless executable bits.
163
+ Closes [#107](https://github.com/rake-compiler/rake-compiler/pull/107) [Patch by Thibault Jouan]
164
+ * Update .gitignore.
165
+ Closes [#108](https://github.com/rake-compiler/rake-compiler/pull/108) [Patch by Thibault Jouan]
166
+ * Improve "make" detection on some platforms such as FreeBSD.
167
+ Closes [#109](https://github.com/rake-compiler/rake-compiler/pull/109) [Patch by Thibault Jouan]
168
+ * Enable cucumber steps for POSIX on *BSD.
169
+ Closes [#110](https://github.com/rake-compiler/rake-compiler/pull/110) [Patch by Thibault Jouan]
170
+ * Stop to build bundled extensions.
171
+ * Add description about CLI option into README.
172
+ Closes [#115](https://github.com/rake-compiler/rake-compiler/pull/115) [Patch by Richard Michael]
173
+ * Update description about using rake-compiler on virtual machine in
174
+ README.
175
+ Closes [#116](https://github.com/rake-compiler/rake-compiler/pull/116), [#117](https://github.com/rake-compiler/rake-compiler/pull/117) [Patch by Lars Kanis]
176
+ * Update fake mechanism to be compatible with Bundler.
177
+ Closes [#121](https://github.com/rake-compiler/rake-compiler/pull/121) [Patch by Lars Kanis]
178
+
179
+ * Bugfixes:
180
+ * Fix typos in README.
181
+ Closes [#102](https://github.com/rake-compiler/rake-compiler/pull/102), [#103](https://github.com/rake-compiler/rake-compiler/pull/103) [Patch by Robert Fletcher]
182
+
183
+ ### 0.9.5 / 2015-01-03
184
+
185
+ * Enhancements:
186
+ * Support adding bundled files in cross_compiling block.
187
+ Closes [#100](https://github.com/rake-compiler/rake-compiler/pull/100) [Patch by Aaron Stone]
188
+
189
+ ### 0.9.4 / 2014-12-28
190
+
191
+ * Notes:
192
+ * Change maintainer to Kouhei Sutou from Luis Lavena.
193
+ Thanks Luis Lavena for your great works!
194
+ * Change repository to https://github.com/rake-compiler/rake-compiler
195
+ from https://github.com/luislavena/rake-compiler .
196
+
197
+ * Bugfixes:
198
+ * Loose RubyGems dependency a little bit to ease old Debian/Ubuntu.
199
+ Closes [#93](https://github.com/rake-compiler/rake-compiler/issues/93)
200
+
201
+ ### 0.9.3 / 2014-08-03
202
+
203
+ * Bugfixes:
204
+ * Fix specs to run (and pass) on Ruby 2.1 and beyond.
205
+ Pull [#94](https://github.com/rake-compiler/rake-compiler/pull/94) [hggh]
206
+
207
+ ### 0.9.2 / 2013-11-14
208
+
209
+ * Bugfixes:
210
+ * Pre-load resolver to avoid Bundler blow up during cross-compilation
211
+ Pull [#83](https://github.com/rake-compiler/rake-compiler/pull/83) [larskanis]
212
+
213
+ ### 0.9.1 / 2013-08-03
214
+
215
+ * Bugfixes:
216
+ * Restore compatibility with RubyGems platforms for cross-compilation
217
+ (i386-mingw32 and x86-mingw32 are the same and supported)
218
+
219
+ ### 0.9.0 / 2013-08-03
220
+
221
+ * Enhancements:
222
+ * Add support for cross-builds and multiple platforms (x86/x64).
223
+ Pull [#74](https://github.com/rake-compiler/rake-compiler/pull/74) [larskanis]
224
+
225
+ ```text
226
+ $ rake-compiler cross-ruby VERSION=1.8.7-p371
227
+ $ rake-compiler cross-ruby VERSION=1.9.3-p392
228
+ $ rake-compiler cross-ruby VERSION=2.0.0-p0
229
+ $ rake-compiler cross-ruby VERSION=2.0.0-p0 HOST=x86_64-w64-mingw32
230
+ $ rake cross compile RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0
231
+
232
+ # Rakefile
233
+ ext.cross_platform = %w[i386-mingw32 x64-mingw32]
234
+ ```
235
+
236
+ * Support for cross-platform specific options. Pull [#74](https://github.com/rake-compiler/rake-compiler/pull/74) [larskanis]
237
+
238
+ ```ruby
239
+ # Rakefile
240
+ ext.cross_config_options << "--with-common-option"
241
+ ext.cross_config_options << {"x64-mingw32" => "--enable-64bits"}
242
+ ```
243
+
244
+ * Bugfixes:
245
+ * Correct fat-gems support caused by RubyGems issues. Pull [#76](https://github.com/rake-compiler/rake-compiler/pull/76) [knu]
246
+
247
+ * Deprecations:
248
+ * Requires minimum Ruby 1.8.7 and RubyGems 1.8.25
249
+ * Usage of 'i386-mswin32' needs to be changed to 'i386-mswin32-60'
250
+
251
+ ### 0.9.0.pre.1 / 2013-05-05
252
+
253
+ See 0.9.0 changes.
254
+
255
+ ### 0.8.3 / 2013-02-16
256
+
257
+ * Bugfixes:
258
+ * Support FreeBSD 'mingw32-gcc' cross compiler. Closes [#72](https://github.com/rake-compiler/rake-compiler/pull/72) [knu]
259
+
260
+ ### 0.8.2 / 2013-01-11
261
+
262
+ * Bugfixes:
263
+ * Unset CC, LDFLAGS and CPPFLAGS prior cross-compiling. Closes [#55](https://github.com/rake-compiler/rake-compiler/issues/55)
264
+
265
+ ### 0.8.1 / 2012-04-15
266
+
267
+ * Bugfixes:
268
+ * Raise error when either make or gmake could be found. Closes [#53](https://github.com/rake-compiler/rake-compiler/issues/53), [#54](https://github.com/rake-compiler/rake-compiler/pull/54)
269
+
270
+ ### 0.8.0 / 2012-01-08
271
+
272
+ * Enhancements:
273
+ * Invocation from command line now support extra options similar to RubyGems.
274
+ Closes [#4](https://github.com/rake-compiler/rake-compiler/issues/4) from Pull [#47](https://github.com/rake-compiler/rake-compiler/pull/47) [jonforums]
275
+
276
+ $ rake compile -- --with-opt-dir=/opt/local
277
+
278
+ * Bugfixes:
279
+ * Only emit cross-compilation warnings for C when `cross` is invoked.
280
+ Closes [#16](https://github.com/rake-compiler/rake-compiler/issues/16) from Pull [#48](https://github.com/rake-compiler/rake-compiler/pull/48) [mvz]
281
+ * Only emit warnings when invoking cross-compilation tasks for JRuby.
282
+ Pull [#45](https://github.com/rake-compiler/rake-compiler/pull/45) [jfirebaugh]
283
+ * Use x86 MinGW cross-compiler. Pull [#49](https://github.com/rake-compiler/rake-compiler/pull/49) [larskanis]
284
+
285
+ ### 0.7.9 / 2011-06-08
286
+
287
+ * Enhancements:
288
+ * Consistently use RubyGems features available since version 1.3.2 and avoid
289
+ deprecation warnings with Rake > 0.8.7.
290
+
291
+ * Bugfixes:
292
+ * Use correct platform in fake.rb. Pull [#39](https://github.com/rake-compiler/rake-compiler/pull/39) [kou]
293
+ * Workaround Gem::Specification and Gem::PackageTask limitations. Closes [#43](https://github.com/rake-compiler/rake-compiler/issues/43)
294
+
295
+ ### 0.7.8 / 2011-04-26
296
+
297
+ * Enhancements:
298
+ * Bump default cross-ruby version to 1.8.7-p334.
299
+ * ExtensionTask now support config_includes to load additional directories.
300
+ [jfinkhaeuser]
301
+
302
+ ```ruby
303
+ Rake::ExtensionTask.new("myext", GEM_SPEC) do |ext|
304
+ ext.config_includes << File.expand_path("my", "custom", "dir")
305
+ end
306
+ ```
307
+
308
+ * Bugfixes:
309
+ * Warn if compiled files exists in extension's source directory. Closes [#35](https://github.com/rake-compiler/rake-compiler/issues/35)
310
+ * Workaround issue with WINE using proper build option. Closes [#37](https://github.com/rake-compiler/rake-compiler/issues/37)
311
+ * Use FileUtils#install instead of cp. Closes [#33](https://github.com/rake-compiler/rake-compiler/issues/33) [Eric Wong]
312
+ * Update README instructions for OSX. Closes [#29](https://github.com/rake-compiler/rake-compiler/issues/29) [tmm1]
313
+
314
+ ### 0.7.7 / 2011-04-04
315
+
316
+ * Bugfixes:
317
+ * Use Winsock2 as default to match Ruby 1.9.2 library linking.
318
+
319
+ ### 0.7.6 / 2011-02-04
320
+
321
+ * Bugfixes:
322
+ * Prefer Psych over Syck for YAML parsing on Ruby 1.9.2. [tenderlove]
323
+
324
+ ### 0.7.5 / 2010-11-25
325
+
326
+ * Enhancements:
327
+ * Promoted stable version for cross-compilation to 1.8.6-p398. Closes [#19](https://github.com/rake-compiler/rake-compiler/issues/19)
328
+
329
+ * Bugfixes:
330
+ * Generate a fake.rb compatible with Ruby 1.9.2. Closes [#25](https://github.com/rake-compiler/rake-compiler/issues/25)
331
+ * fake.rb will not try to mimic Ruby's own fake to the letter. Closes [#28](https://github.com/rake-compiler/rake-compiler/issues/28)
332
+ * Expand symlinks for tmp_dir. Closes [#24](https://github.com/rake-compiler/rake-compiler/issues/24)
333
+ * Silence make output during rake-compiler invocation.
334
+ * Usage of Gem.ruby instead of RbConfig ruby_install_name
335
+ This solve issues with ruby vs. ruby.exe and jruby.exe
336
+
337
+ * Experimental:
338
+ * Allow setting of HOST during cross-compilation. This enable usage
339
+ of mingw-w64 compiler and not the first one found in the PATH.
340
+
341
+ rake-compiler cross-ruby VERSION=1.9.2-p0 HOST=i686-w64-mingw32
342
+ rake-compiler cross-ruby HOST=i386-mingw32 (OSX mingw32 port)
343
+ rake-compiler cross-ruby HOST=i586-pc-mingw32 (Debian/Ubuntu mingw32)
344
+
345
+ ### 0.7.1 / 2010-08-07
346
+
347
+ * Bugfixes:
348
+ * Update gem files to make "gem install -t" works. Closes [#14](https://github.com/rake-compiler/rake-compiler/issues/14)
349
+ * Update mocks to work under 1.8.7. Closes [#15](https://github.com/rake-compiler/rake-compiler/issues/15) [luisparravicini]
350
+ * Do not allow cross-ruby be executed under Windows. Closes [#22](https://github.com/rake-compiler/rake-compiler/issues/22)
351
+
352
+ * Experimental:
353
+ * Allow JRuby to compile C extensions [timfel].
354
+ It is now possible compile C extensions using latest JRuby. Offered
355
+ in experimental mode since JRuby cext hasn't been officially released.
356
+
357
+ ### 0.7.0 / 2009-12-08
358
+
359
+ * Enhancements
360
+ * Allow generation of JRuby extensions. Thanks to Alex Coles (myabc) for the
361
+ contribution.
362
+ This will allow, with proper JDK tools, cross compilation of JRuby gems
363
+ from MRI.
364
+
365
+ ```ruby
366
+ Rake::JavaExtensionTask.new('my_java_extension', GEM_SPEC) do |ext|
367
+ # most of ExtensionTask options can be used
368
+ # plus, java_compiling:
369
+ ext.java_compiling do |gem_spec|
370
+ gem_spec.post_install_message = "This is a native JRuby gem!"
371
+ end
372
+ end
373
+ ```
374
+
375
+ Please note that cross-compiling JRuby gems requires either JRUBY_HOME or
376
+ JRUBY_PARENT_CLASSPATH environment variables being properly set.
377
+
378
+ * Allow alteration of the Gem Specification when cross compiling. Closes [#3](https://github.com/rake-compiler/rake-compiler/issues/3)
379
+ This is useful to indicate a custom requirement message, like DLLs
380
+ installation or similar.
381
+
382
+ ```ruby
383
+ Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext|
384
+ ext.cross_compile = true
385
+ # ...
386
+ ext.cross_compiling do |gem_spec|
387
+ gem_spec.post_install_message = "You've installed a binary version of this gem"
388
+ end
389
+ end
390
+ ```
391
+
392
+ * Bugfixes
393
+ * Detect GNU make independently of distribution based naming.
394
+ Thanks to flori for patches.
395
+ * Usage of #dup to duplicate gemspec instead of YAML dumping.
396
+ * No longer support Ruby older than 1.8.6
397
+ * No longer support RubyGems older than 1.3.5
398
+ * Force definition of binary directory and executables. Closes [#11](https://github.com/rake-compiler/rake-compiler/issues/11)
399
+ * Workaround path with spaces issues using relative paths. Closes [#6](https://github.com/rake-compiler/rake-compiler/issues/6)
400
+ * Removed gemspec, GitHub gems no more
401
+
402
+ * Known issues
403
+ * Usage of rake-compiler under projects with Jeweler requires some tweaks
404
+ Please read issue 73) for Jeweler:
405
+ http://github.com/technicalpickles/jeweler/issues/73
406
+
407
+ For a workaround, look here:
408
+ http://gist.github.com/251663
409
+
410
+ ### 0.6.0 / 2009-07-25
411
+
412
+ * Enhancements
413
+ * Implemented 'fat-binaries' generation for cross compiling
414
+ (for now). Thanks to Aaron Patterson for the suggestion and
415
+ original idea.
416
+
417
+ rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1
418
+
419
+ Will package extensions for 1.8 and 1.9 versions of Ruby.
420
+ * Can now cross compile extensions for 1.9 using 1.8.x as base.
421
+ Be warned: works from 1.8 to 1.9, but not if your default ruby is 1.9
422
+
423
+ rake cross compile RUBY_CC_VERSION=1.9.1
424
+
425
+ * Allow simultaneous versions of Ruby to compile extensions.
426
+ This change allow 1.8.x compiles co-exist with 1.9.x ones
427
+ and don't override each other.
428
+
429
+ Please perform <tt>rake clobber</tt> prior compiling again.
430
+ * Allow optional source file URL for cross-compile tasks.
431
+ (Thanks to deepj for the patches)
432
+
433
+ 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
434
+
435
+ * Bugfixes
436
+ * Removed strict versioning for gems since it clash with fat binaries.
437
+ From now on, if your gem only targets a specific version of Ruby, please
438
+ indicate it in the Gem::Specification (<tt>required_ruby_version</tt>)
439
+
440
+ ### 0.5.0 / 2009-04-25
441
+
442
+ * Enhancements
443
+ * Allow generation of multiple gems for Windows (EXPERIMENTAL)
444
+ This allows build gems for both VC6 and MinGW builts of Ruby
445
+ (Thanks to Jonathan Stott for the suggestion)
446
+
447
+ ```ruby
448
+ Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext|
449
+ ext.cross_compile = true
450
+ ext.cross_platform = ['i386-mswin32', 'i386-mingw32']
451
+ end
452
+ ```
453
+
454
+ ### 0.4.1 / 2009-04-09
455
+
456
+ * Enhancements
457
+ * Target specific versions of Ruby when generating binaries.
458
+ This avoids installing a 1.8.x binary gem in 1.9.x and viceversa.
459
+ (Thanks to Aaron Patterson for the patches)
460
+
461
+ * Bugfixes
462
+ * No longer raises error if rake-compiler configuration is missing.
463
+ Not all users of a project would have it installed.
464
+ (Thanks to Aaron Patterson for the patch)
465
+
466
+ ### 0.4.0 / 2009-04-03
467
+
468
+ * Enhancements
469
+ * Bended the convention for extension folder.
470
+ Defining <tt>ext_dir</tt> for custom extension location.
471
+
472
+ ```ruby
473
+ Rake::ExtensionTask.new('my_extension') do |ext|
474
+ ext.ext_dir = 'custom/location' # look into custom/location
475
+ end # instead of ext/my_extension
476
+ ```
477
+
478
+ * Better detection of mingw target across Linux/OSX.
479
+ Exposed it as Rake::ExtensionCompiler
480
+ * Display list of available tasks when calling rake-compiler script
481
+ * Track Ruby full versioning (x.y.z).
482
+ This will help the compilation of extensions targetting 1.8.6/7 and 1.9.1
483
+
484
+ * Bugfixes
485
+ * Better output of Rake development tasks (Thanks to Luis Parravicini).
486
+ * Proper usage of Gem::Platform for native gems (Thanks to Dirkjan Bussink).
487
+ * Don't use autoload for YAML (present problems with Ruby 1.9.1).
488
+
489
+ ### 0.3.1 / 2009-01-09
490
+
491
+ * Enhancements
492
+ * Download cross-ruby source code using HTTP instead of FTP.
493
+ * Disabled Tcl/Tk extension building on cross-ruby (helps with 1.9).
494
+
495
+ * Bugfixes
496
+ * Workaround bug introduced by lack of Gem::Specification cloning. Fixes DM LH #757.
497
+ * Use proper binary extension on OSX (reported by Dirkjan Bussink).
498
+ * Ensure lib/binary task is defined prior clear of requisites.
499
+
500
+ ### 0.3.0 / 2008-12-07
501
+
502
+ * New features
503
+ * Let you specify the Ruby version used for cross compilation instead
504
+ of default one.
505
+
506
+ rake cross compile RUBY_CC_VERSION=1.8
507
+
508
+ * Enhancements
509
+ * Properly update rake-compiler configuration when new version is installed.
510
+ * Automated release process to RubyForge, yay!
511
+
512
+ * Bugfixes
513
+ * Corrected documentation to reflect the available options
514
+
515
+ ### 0.2.1 / 2008-11-30
516
+
517
+ * New features
518
+
519
+ * Allow cross compilation (cross compile) using mingw32 on Linux or OSX.
520
+ * Allow packaging of gems for Windows on Linux or OSX.
521
+
522
+ * Enhancements
523
+
524
+ * Made generation of extensions safe and target folders per-platform
525
+
526
+ * Bugfixes
527
+
528
+ * Ensure binaries for the specific platform are copied before packaging.
@@ -40,6 +40,9 @@ module Rake
40
40
  @tmp_dir = 'tmp'
41
41
  @ext_dir = "ext/#{@name}"
42
42
  @lib_dir = 'lib'
43
+ if @name and File.dirname(@name) != "."
44
+ @lib_dir += "/#{File.dirname(@name)}"
45
+ end
43
46
  @config_options = []
44
47
  @extra_options = ARGV.select { |i| i =~ /\A--?/ }
45
48
  end
@@ -23,9 +23,10 @@ module Rake
23
23
  @cross_compile = false
24
24
  @cross_config_options = []
25
25
  @cross_compiling = nil
26
- @no_native = false
26
+ @no_native = (ENV["RAKE_EXTENSION_TASK_NO_NATIVE"] == "true")
27
27
  @config_includes = []
28
- @ruby_versions_per_platform = {}
28
+ # Default to an empty list of ruby versions for each platform
29
+ @ruby_versions_per_platform = Hash.new { |h, k| h[k] = [] }
29
30
  @make = nil
30
31
  end
31
32
 
@@ -46,15 +47,6 @@ module Rake
46
47
  end
47
48
 
48
49
  def define
49
- if (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby')
50
- warn_once <<-EOF
51
- WARNING: You're attempting to (cross-)compile C extensions from a platform
52
- (#{RUBY_ENGINE}) that does not support native extensions or mkmf.rb.
53
- Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
54
- EOF
55
- return
56
- end
57
-
58
50
  super
59
51
 
60
52
  unless compiled_files.empty?
@@ -124,6 +116,7 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
124
116
  tmp_path = "#{@tmp_dir}/#{platf}/#{@name}/#{ruby_ver}"
125
117
  stage_path = "#{@tmp_dir}/#{platf}/stage"
126
118
 
119
+ siteconf_path = "#{tmp_path}/.rake-compiler-siteconf.rb"
127
120
  tmp_binary_path = "#{tmp_path}/#{binary_path}"
128
121
  tmp_binary_dir_path = File.dirname(tmp_binary_path)
129
122
  stage_binary_path = "#{stage_path}/#{lib_path}/#{binary_path}"
@@ -141,10 +134,27 @@ Rerun `rake` under MRI Ruby 1.8.x/1.9.x to cross/native compile.
141
134
  directory lib_binary_dir_path
142
135
  directory stage_binary_dir_path
143
136
 
137
+ directory File.dirname(siteconf_path)
138
+ # Set paths for "make install" destinations
139
+ file siteconf_path => File.dirname(siteconf_path) do
140
+ File.open(siteconf_path, "w") do |siteconf|
141
+ siteconf.puts "require 'rbconfig'"
142
+ siteconf.puts "require 'mkmf'"
143
+ siteconf.puts "dest_path = mkintpath(#{File.expand_path(lib_path).dump})"
144
+ %w[sitearchdir sitelibdir].each do |dir|
145
+ siteconf.puts "RbConfig::MAKEFILE_CONFIG['#{dir}'] = dest_path"
146
+ siteconf.puts "RbConfig::CONFIG['#{dir}'] = dest_path"
147
+ end
148
+ end
149
+ end
150
+
144
151
  # copy binary from temporary location to final lib
145
152
  # tmp/extension_name/extension_name.{so,bundle} => lib/
146
- task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_binary_dir_path, tmp_binary_path] do
147
- install tmp_binary_path, "#{lib_path}/#{binary_path}"
153
+ task "copy:#{@name}:#{platf}:#{ruby_ver}" => [lib_binary_dir_path, tmp_binary_path, "#{tmp_path}/Makefile"] do
154
+ # install in lib for native platform only
155
+ unless for_platform
156
+ sh "#{make} install target_prefix=", chdir: tmp_path
157
+ end
148
158
  end
149
159
  # copy binary from temporary location to staging directory
150
160
  task "copy:#{@name}:#{platf}:#{ruby_ver}" => [stage_binary_dir_path, tmp_binary_path] do
@@ -173,12 +183,12 @@ Java extension should be preferred.
173
183
 
174
184
  # makefile depends of tmp_dir and config_script
175
185
  # tmp/extension_name/Makefile
176
- file "#{tmp_path}/Makefile" => [tmp_path, extconf] do |t|
186
+ file "#{tmp_path}/Makefile" => [tmp_path, extconf, siteconf_path] do |t|
177
187
  options = @config_options.dup
178
188
 
179
189
  # include current directory
180
190
  include_dirs = ['.'].concat(@config_includes).uniq.join(File::PATH_SEPARATOR)
181
- cmd = [Gem.ruby, "-I#{include_dirs}"]
191
+ cmd = [Gem.ruby, "-I#{include_dirs}", "-r#{File.basename(siteconf_path)}"]
182
192
 
183
193
  # build a relative path to extconf script
184
194
  abs_tmp_path = (Pathname.new(Dir.pwd) + tmp_path).realpath
@@ -243,6 +253,9 @@ Java extension should be preferred.
243
253
  # lib_path
244
254
  lib_path = lib_dir
245
255
 
256
+ # Update compiled platform/version combinations
257
+ @ruby_versions_per_platform[platf] << ruby_ver
258
+
246
259
  # create 'native:gem_name' and chain it to 'native' task
247
260
  unless Rake::Task.task_defined?("native:#{@gem_spec.name}:#{platf}")
248
261
  task "native:#{@gem_spec.name}:#{platf}" do |t|
@@ -255,7 +268,7 @@ Java extension should be preferred.
255
268
  spec.platform = Gem::Platform.new(platf)
256
269
 
257
270
  # set ruby version constraints
258
- ruby_versions = @ruby_versions_per_platform[platf] || []
271
+ ruby_versions = @ruby_versions_per_platform[platf]
259
272
  sorted_ruby_versions = ruby_versions.sort_by do |ruby_version|
260
273
  ruby_version.split(".").collect(&:to_i)
261
274
  end
@@ -358,8 +371,7 @@ Java extension should be preferred.
358
371
  end
359
372
 
360
373
  # Update cross compiled platform/version combinations
361
- ruby_versions = (@ruby_versions_per_platform[for_platform] ||= [])
362
- ruby_versions << version
374
+ @ruby_versions_per_platform[for_platform] << version
363
375
 
364
376
  define_cross_platform_tasks_with_version(for_platform, version)
365
377
 
@@ -404,8 +416,21 @@ Java extension should be preferred.
404
416
  # genearte fake.rb for different ruby versions
405
417
  file "#{tmp_path}/fake.rb" => [rbconfig_file] do |t|
406
418
  File.open(t.name, 'w') do |f|
407
- f.write fake_rb(for_platform, ruby_ver)
408
- f.write File.read(t.prerequisites.first)
419
+ # Keep the original RbConfig::CONFIG["ENABLE_SHARED"] to use
420
+ # the same RubyGems extension directory. See also
421
+ # Gem::BasicSpecificaion#extenions_dir and
422
+ # Gem.extension_api_version.
423
+ #
424
+ # if RbConfig::CONFIG["ENABLE_SHARED"] == "no"
425
+ # "extensions/x86_64-linux/2.5.0-static"
426
+ # else
427
+ # "extensions/x86_64-linux/2.5.0"
428
+ # end
429
+ f.puts("require 'rbconfig'")
430
+ f.puts("original_enable_shared = RbConfig::CONFIG['ENABLE_SHARED']")
431
+ f.puts(fake_rb(for_platform, ruby_ver))
432
+ f.puts(File.read(t.prerequisites.first))
433
+ f.puts("RbConfig::CONFIG['ENABLE_SHARED'] = original_enable_shared")
409
434
  end
410
435
  end
411
436