<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,18 @@
 === (in Git)
 
+* Enhancements
+  * Allow alteration of the Gem Specification when cross compiling. Closes GH-3
+    This is useful to indicate a custom requirement message, like DLLs
+    installation or similar.
+
+      Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext|
+        ext.cross_compile = true
+        # ...
+        ext.cross_compiling do |gem_spec|
+          gem_spec.post_install_message = &quot;You've installed a binary version of this gem&quot;
+        end
+      end
+
 * Bugfixes
   * Detect GNU make independently of distribution based naming.
     Thanks to flori for patches.</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -201,6 +201,11 @@ Now, you only need to use additional options in your extension definition:
       ext.cross_platform = 'i386-mswin32'     # forces the Windows platform instead of the default one
                                               # configure options only for cross compile
       ext.cross_config_options &lt;&lt; '--with-something'
+
+      # perform alterations on the gemspec when cross compiling
+      ext.cross_compiling do |gem_spec|
+        gem_spec.post_install_message = &quot;You installed the binary version of this gem!&quot;
+      end
     end
 
 By default, cross compilation targets 'i386-mingw32' which is default GCC platform</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -44,6 +44,7 @@ module Rake
       @config_options = []
       @cross_compile = false
       @cross_config_options = []
+      @cross_compiling = nil
     end
 
     def platform
@@ -54,6 +55,10 @@ module Rake
       @cross_platform ||= 'i386-mingw32'
     end
 
+    def cross_compiling(&amp;block)
+      @cross_compiling = block if block_given?
+    end
+
     def define
       fail &quot;Extension name must be provided.&quot; if @name.nil?
 
@@ -169,7 +174,7 @@ module Rake
       end
     end
 
-    def define_native_tasks(for_platform = nil, ruby_ver = RUBY_VERSION)
+    def define_native_tasks(for_platform = nil, ruby_ver = RUBY_VERSION, callback = nil)
       platf = for_platform || platform
 
       # tmp_path
@@ -202,6 +207,11 @@ module Rake
           # include the files in the gem specification
           spec.files += ext_files
 
+          # expose gem specification for customization
+          if callback
+            callback.call(spec)
+          end
+
           # Generate a package for this gem
           gem_package = Rake::GemPackageTask.new(spec) do |pkg|
             pkg.need_zip = false
@@ -306,7 +316,9 @@ module Rake
       end
 
       # now define native tasks for cross compiled files
-      define_native_tasks(for_platform, ruby_ver) if @gem_spec &amp;&amp; @gem_spec.platform == 'ruby'
+      if @gem_spec &amp;&amp; @gem_spec.platform == 'ruby' then
+        define_native_tasks(for_platform, ruby_ver, @cross_compiling)
+      end
 
       # create cross task
       task 'cross' do</diff>
      <filename>lib/rake/extensiontask.rb</filename>
    </modified>
    <modified>
      <diff>@@ -299,6 +299,16 @@ describe Rake::ExtensionTask do
         err.should match(/no configuration section for specified version of Ruby/)
       end
 
+      it 'should capture an action block to be executed when cross compiling' do
+        lambda {
+          Rake::ExtensionTask.new('extension_one') do |ext|
+            ext.cross_compiling do |gem_spec|
+              gem_spec.post_install_message = &quot;Cross compiled gem&quot;
+            end
+          end
+        }.should_not raise_error
+      end
+
       it 'should allow usage of RUBY_CC_VERSION to indicate a different version of ruby' do
         config = mock(Hash)
         config.should_receive(:[]).with(&quot;rbconfig-1.9.1&quot;).and_return('/path/to/ruby/1.9.1/rbconfig.rb')</diff>
      <filename>spec/lib/rake/extensiontask_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>95079509ee1deb94a2627b9e0d89113f8eddea97</id>
    </parent>
  </parents>
  <author>
    <name>Luis Lavena</name>
    <email>luislavena@gmail.com</email>
  </author>
  <url>http://github.com/luislavena/rake-compiler/commit/1bb1c7e9c3d02f6f37eb6c5bd9f7bc653d4c6196</url>
  <id>1bb1c7e9c3d02f6f37eb6c5bd9f7bc653d4c6196</id>
  <committed-date>2009-10-21T18:14:04-07:00</committed-date>
  <authored-date>2009-10-21T18:12:12-07:00</authored-date>
  <message>Allow alteration of the Gem Specification when cross compiling. Closes GH-3

This is useful to indicate a custom requirement message, like DLLs
installation or similar.

  Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext|
    ext.cross_compile = true
    ext.cross_compiling do |gem_spec|
      gem_spec.post_install_message = &quot;You've installed a binary version of this gem&quot;
    end
  end</message>
  <tree>ce6478020a407f29adaa7f03cc01f3901c1e9e0e</tree>
  <committer>
    <name>Luis Lavena</name>
    <email>luislavena@gmail.com</email>
  </committer>
</commit>
