tjschuck/rake-compiler-dev-box — pull request #12 by luislavena (2014-09-21 01:48:01+00:00)
Title: Allow configurable versions for Windows packaging

Certain gem developers are now limiting the versions of Ruby they
target when generating binaries.

This change introduce two configurable variables: `BASE_VERSION` and
`RUBY_CC_VERSION`

`BASE_VERSION` is used to indicate the native version of Ruby that
will be used to base for cross-compilation.

`RUBY_CC_VERSION` provides a list of target versions for cross-
compilation.

Due some limitations between Ruby 1.8.x and Ruby 1.9+, you cannot
use for base version 1.9.3 and target 1.8.x.

The following are examples of usage for cross-compilation:

```
$ BASE_VERSION=1.9.3 bin/package_win32_fat_binary mygem RUBY_CC_VERSION=1.9.3:2.0.0
```

Above example will use Ruby 1.9.3 to cross-compile a fat-binary
that includes Ruby 1.9.3 (1.9) and 2.0.0 (2.0) binaries.

```
$ BASE_VERSION=2.0.0 bin/package_win32_fat_binary mygem RUBY_CC_VERSION=2.0.0:2.1.3
```

This last example will use Ruby 2.0 and only cross-compile
Ruby 2.0.0 (2.0) and 2.1.3 (2.1) inside the gem.