Commit 5b36b7ce authored by Youhei SASAKI's avatar Youhei SASAKI

Imported Upstream version 0.8.2

parent 72a138a9
=== 0.8.2 / 2013-01-11
* Bugfixes:
* Unset CC, LDFLAGS and CPPFLAGS prior cross-compiling. Closes #55
=== 0.8.1 / 2012-04-15
* Bugfixes:
......
......@@ -69,6 +69,12 @@ contribute back to your project.
Now the fun part. It's time to introduce the code to your projects Rakefile
to tell it to use rake-compiler to build your extension:
# File: extconf.rb
# this line should already exist
create_makefile('hello_world')
# File: Rakefile
require 'rake/extensiontask'
......@@ -78,6 +84,12 @@ to tell it to use rake-compiler to build your extension:
That's it? Yes, that's it! No other lines of code are needed for
rake-compiler to work its magic.
Though, you need to make sure the parameter to <tt>create_makefile</tt>
and <tt>ExtensionTask.new</tt> are the same or rake-compiler will not mimic
the RubyGems standard install process. You can override this standard
behaviour if needed, see the instructions for "non-standard project structure"
below for details.
If you want to do the same for a JRuby extension written in Java, it's just
as easy:
......
......@@ -16,7 +16,7 @@ Feature: Cross-compile C extensions
Given that all my source files are in place
And I'm running a POSIX operating system
And I've installed cross compile toolchain
When rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.2' is invoked
Then rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.2' succeeded
When rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.3' is invoked
Then rake task 'cross compile RUBY_CC_VERSION=1.8.7:1.9.3' succeeded
And binaries for platform 'i386-mingw32' version '1.8' get copied
And binaries for platform 'i386-mingw32' version '1.9' get copied
......@@ -6,7 +6,9 @@ Given %r{^I'm running a POSIX operating system$} do
end
Given %r{^I've installed cross compile toolchain$} do
pending 'Cannot locate suitable compiler in the PATH.' unless search_path(%w(i586-mingw32msvc-gcc i386-mingw32-gcc))
unless search_path(%w(i586-mingw32msvc-gcc i386-mingw32-gcc i686-w64-mingw32-gcc))
pending 'Cannot locate suitable compiler in the PATH.'
end
end
Then /^binaries for platform '(.*)' get generated$/ do |platform|
......
......@@ -25,7 +25,7 @@ Then /^a gem for '(.*)' version '(.*)' platform '(.*)' do exist in '(.*)'$/ do |
end
Then /^gem for platform '(.*)' get generated$/ do |platform|
Then "a gem for 'gem_abc' version '0.1.0' platform '#{platform}' do exist in 'pkg'"
step "a gem for 'gem_abc' version '0.1.0' platform '#{platform}' do exist in 'pkg'"
end
def gem_file(folder, name, version)
......
......@@ -73,7 +73,7 @@ module Rake
end
def source_files
@source_files ||= FileList["#{@ext_dir}/#{@source_pattern}"]
FileList["#{@ext_dir}/#{@source_pattern}"]
end
def warn_once(message)
......
File mode changed from 100644 to 100755
--- !ruby/object:Gem::Specification
--- !ruby/object:Gem::Specification
name: rake-compiler
version: !ruby/object:Gem::Version
version: 0.8.1
version: !ruby/object:Gem::Version
hash: 59
prerelease:
segments:
- 0
- 8
- 2
version: 0.8.2
platform: ruby
authors:
authors:
- Luis Lavena
autorequire:
bindir: bin
cert_chain: []
date: 2012-04-15 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
date: 2013-01-12 00:00:00 Z
dependencies:
- !ruby/object:Gem::Dependency
name: rake
requirement: &23703696 !ruby/object:Gem::Requirement
prerelease: false
requirement: &id001 !ruby/object:Gem::Requirement
none: false
requirements:
- - ! '>='
- !ruby/object:Gem::Version
version: '0'
requirements:
- - ">="
- !ruby/object:Gem::Version
hash: 3
segments:
- 0
version: "0"
type: :runtime
prerelease: false
version_requirements: *23703696
- !ruby/object:Gem::Dependency
version_requirements: *id001
- !ruby/object:Gem::Dependency
name: rspec
requirement: &23703396 !ruby/object:Gem::Requirement
prerelease: false
requirement: &id002 !ruby/object:Gem::Requirement
none: false
requirements:
requirements:
- - ~>
- !ruby/object:Gem::Version
- !ruby/object:Gem::Version
hash: 47
segments:
- 2
- 8
- 0
version: 2.8.0
type: :development
prerelease: false
version_requirements: *23703396
- !ruby/object:Gem::Dependency
version_requirements: *id002
- !ruby/object:Gem::Dependency
name: cucumber
requirement: &23703120 !ruby/object:Gem::Requirement
prerelease: false
requirement: &id003 !ruby/object:Gem::Requirement
none: false
requirements:
requirements:
- - ~>
- !ruby/object:Gem::Version
- !ruby/object:Gem::Version
hash: 27
segments:
- 1
- 1
- 4
version: 1.1.4
type: :development
prerelease: false
version_requirements: *23703120
description: ! 'Provide a standard and simplified way to build and package
Ruby extensions (C, Java) using Rake as glue.'
version_requirements: *id003
description: |-
Provide a standard and simplified way to build and package
Ruby extensions (C, Java) using Rake as glue.
email: luislavena@gmail.com
executables:
executables:
- rake-compiler
extensions: []
extra_rdoc_files:
extra_rdoc_files:
- README.rdoc
- LICENSE.txt
- History.txt
files:
files:
- features/compile.feature
- features/cross-compile.feature
- features/cross-package-multi.feature
......@@ -99,32 +119,44 @@ files:
- LICENSE.txt
- cucumber.yml
homepage: http://github.com/luislavena/rake-compiler
licenses:
licenses:
- MIT
post_install_message:
rdoc_options:
rdoc_options:
- --main
- README.rdoc
- --title
- rake-compiler -- Documentation
require_paths:
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
required_ruby_version: !ruby/object:Gem::Requirement
none: false
requirements:
- - ! '>='
- !ruby/object:Gem::Version
requirements:
- - ">="
- !ruby/object:Gem::Version
hash: 59
segments:
- 1
- 8
- 6
version: 1.8.6
required_rubygems_version: !ruby/object:Gem::Requirement
required_rubygems_version: !ruby/object:Gem::Requirement
none: false
requirements:
- - ! '>='
- !ruby/object:Gem::Version
requirements:
- - ">="
- !ruby/object:Gem::Version
hash: 17
segments:
- 1
- 3
- 5
version: 1.3.5
requirements: []
rubyforge_project: rake-compiler
rubygems_version: 1.8.17
rubygems_version: 1.8.24
signing_key:
specification_version: 3
summary: Rake-based Ruby Extension (C, Java) task generator.
test_files: []
......@@ -53,6 +53,11 @@ MAJOR = RUBY_CC_VERSION.match(/.*-(\d.\d).\d/)[1]
MINGW_HOST = ENV['HOST'] || Rake::ExtensionCompiler.mingw_host
MINGW_TARGET = MINGW_HOST.gsub('msvc', '')
# Unset any possible variable that might affect compilation
["CC", "CXX", "CPPFLAGS", "LDFLAGS", "RUBYOPT"].each do |var|
ENV.delete(var)
end
# define a location where sources will be stored
directory "#{USER_HOME}/sources/#{RUBY_CC_VERSION}"
directory "#{USER_HOME}/builds/#{RUBY_CC_VERSION}"
......
......@@ -3,7 +3,7 @@ require 'rubygems/package_task'
GEM_SPEC = Gem::Specification.new do |s|
# basic information
s.name = "rake-compiler"
s.version = "0.8.1"
s.version = "0.8.2"
s.platform = Gem::Platform::RUBY
# description and details
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment