From 27ac30a8d76b2005438175e0f01670f017f8fb10 Mon Sep 17 00:00:00 2001 From: Lyle Johnson <lyle@lylejohnson.name> Date: Wed, 28 Oct 2009 07:13:26 -0700 Subject: [PATCH] Add cross-compiled binaries for Ruby 1.8 and 1.9 to the gem spec. By default it looks like rake-compiler doesn't modify the gem spec appropriately when we're cross-compiling for multiple Ruby versions. Added some lines to remove "lib/fox16.so" from the gem spec's list of files to include, and then added "lib/1.8/fox16.so" and "lib/1.9/fox16.so" back to the list, so that we get the correct result. --- Rakefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 7b05c6e..1c873cf 100755 --- a/Rakefile +++ b/Rakefile @@ -55,9 +55,11 @@ Rake::ExtensionTask.new("fox16", hoe.spec) do |ext| ext.cross_config_options << "--with-fxscintilla-lib=/home/lyle/mingw/lib" # perform alterations on the gem spec when cross-compiling -# ext.cross_compiling do |gem_spec| -# gem_spec.post_install_message = "You installed the binary version of this gem!" -# end + ext.cross_compiling do |gem_spec| + gem_spec.files.delete "lib/fox16.so" + gem_spec.files << "lib/1.8/fox16.so" + gem_spec.files << "lib/1.9/fox16.so" + end end # Make the compile task's list of dependencies begin with the :configure task -- GitLab