TASAKA Mamoru f462b6
--- nokogiri-1.5.0/Rakefile.debug	2012-01-18 16:23:02.472224272 +0900
TASAKA Mamoru f462b6
+++ nokogiri-1.5.0/Rakefile	2012-01-18 16:23:29.935430496 +0900
TASAKA Mamoru f462b6
@@ -83,14 +83,21 @@
TASAKA Mamoru f462b6
     HOE.spec.files += ['lib/nokogiri/nokogiri.jar']
TASAKA Mamoru f462b6
   end
TASAKA Mamoru f462b6
 else
TASAKA Mamoru f462b6
-  require 'tasks/cross_compile'
TASAKA Mamoru f462b6
+  do_cross_compile = true
TASAKA Mamoru f462b6
+  begin
TASAKA Mamoru f462b6
+    require 'tasks/cross_compile'
TASAKA Mamoru f462b6
+  rescue RuntimeError => e
TASAKA Mamoru f462b6
+    warn "WARNING: Could not perform some cross-compiling: #{e}"
TASAKA Mamoru f462b6
+    do_cross_compile = false
TASAKA Mamoru f462b6
+  end
TASAKA Mamoru f462b6
   require "rake/extensiontask"
TASAKA Mamoru f462b6
 
TASAKA Mamoru f462b6
-  HOE.spec.files.reject! { |f| f =~ %r{^ext/java|\.jar$} }
TASAKA Mamoru f462b6
+  HOE.spec.files.reject! { |f| f =~ %r{^ext/java|\.jar$} } if do_cross_compile
TASAKA Mamoru f462b6
 
TASAKA Mamoru f462b6
   Rake::ExtensionTask.new("nokogiri", HOE.spec) do |ext|
TASAKA Mamoru f462b6
     ext.lib_dir = File.join(*['lib', 'nokogiri', ENV['FAT_DIR']].compact)
TASAKA Mamoru f462b6
     ext.config_options << ENV['EXTOPTS']
TASAKA Mamoru f462b6
+    next unless do_cross_compile
TASAKA Mamoru f462b6
     ext.cross_compile  = true
TASAKA Mamoru f462b6
     ext.cross_platform = ["x86-mswin32-60", "x86-mingw32"]
TASAKA Mamoru f462b6
     ext.cross_config_options << "--with-xml2-include=#{File.join($recipes[:libxml2].path, 'include', 'libxml2')}"