rake-compiler 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/README.rdoc +14 -3
- data/tasks/bin/cross-ruby.rake +3 -0
- data/tasks/gem.rake +1 -1
- metadata +5 -5
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -326,10 +326,21 @@ NOTE: building "fat" gems is currently only supported by rake-compiler when
|
|
326
326
|
cross compiling from a Linux or OSX host. Patches are welcome if building
|
327
327
|
"fat" gems from Windows hosts is desired, or natively for your platform :-)
|
328
328
|
|
329
|
-
Now is up to you to make your gem load the proper binary at runtime
|
329
|
+
Now is up to you to make your gem load the proper binary at runtime:
|
330
330
|
|
331
|
-
|
332
|
-
|
331
|
+
begin
|
332
|
+
RUBY_VERSION =~ /(\d+.\d+)/
|
333
|
+
require "#{$1}/my_extension"
|
334
|
+
rescue LoadError
|
335
|
+
require "my_extension"
|
336
|
+
end
|
337
|
+
|
338
|
+
The above technique will lookup first for 1.8 or 1.9 version of the extension
|
339
|
+
and when not found, will look for the plain extension.
|
340
|
+
|
341
|
+
This approach catch the cases of provided fat binaries or gems compiled by the
|
342
|
+
end user installing the gem. It has also been implemented successfully in
|
343
|
+
several projects.
|
333
344
|
|
334
345
|
=== What are you talking about? (Give me examples)
|
335
346
|
|
data/tasks/bin/cross-ruby.rake
CHANGED
@@ -131,6 +131,9 @@ file "#{USER_HOME}/builds/#{RUBY_CC_VERSION}/Makefile" => ["#{USER_HOME}/builds/
|
|
131
131
|
'--without-tcl'
|
132
132
|
]
|
133
133
|
|
134
|
+
# Force Winsock2 for Ruby 1.8, 1.9 defaults to it
|
135
|
+
options << "--with-winsock2" if MAJOR == "1.8"
|
136
|
+
|
134
137
|
chdir File.dirname(t.name) do
|
135
138
|
prefix = File.expand_path("../../ruby/#{RUBY_CC_VERSION}")
|
136
139
|
options << "--prefix=#{prefix}"
|
data/tasks/gem.rake
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-compiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 7
|
10
|
+
version: 0.7.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luis Lavena
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-04-04 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
requirements: []
|
157
157
|
|
158
158
|
rubyforge_project: rake-compiler
|
159
|
-
rubygems_version: 1.
|
159
|
+
rubygems_version: 1.6.2
|
160
160
|
signing_key:
|
161
161
|
specification_version: 3
|
162
162
|
summary: Rake-based Ruby Extension (C, Java) task generator.
|