Path: | History.txt |
Last Update: | Wed May 15 15:24:15 +0000 2013 |
$ rake compile -- --with-opt-dir=/opt/local
Rake::ExtensionTask.new("myext", GEM_SPEC) do |ext|
ext.config_includes << File.expand_path("my", "custom", "dir")
end
rake-compiler cross-ruby VERSION=1.9.2-p0 HOST=i686-w64-mingw32 rake-compiler cross-ruby HOST=i386-mingw32 (OSX mingw32 port) rake-compiler cross-ruby HOST=i586-pc-mingw32 (Debian/Ubuntu mingw32)
Rake::JavaExtensionTask.new('my_java_extension', GEM_SPEC) do |ext| # most of ExtensionTask options can be used # plus, java_compiling: ext.java_compiling do |gem_spec| gem_spec.post_install_message = "This is a native JRuby gem!" end end
Please note that cross-compiling JRuby gems requires either JRUBY_HOME or JRUBY_PARENT_CLASSPATH environment variables being properly set.
Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext| ext.cross_compile = true # ... ext.cross_compiling do |gem_spec| gem_spec.post_install_message = "You've installed a binary version of this gem" end end
For a workaround, look here: gist.github.com/251663
rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1
Will package extensions for 1.8 and 1.9 versions of Ruby.
rake cross compile RUBY_CC_VERSION=1.9.1
Please perform rake clobber prior compiling again.
rake-compiler cross-ruby VERSION=1.9.1-p0 SOURCE=http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext| ext.cross_compile = true ext.cross_platform = ['i386-mswin32', 'i386-mingw32'] end
Rake::ExtensionTask.new('my_extension') do |ext| ext.ext_dir = 'custom/location' # look into custom/location end # instead of ext/my_extension
rake cross compile RUBY_CC_VERSION=1.8