summaryrefslogtreecommitdiff
path: root/spec/lib
Commit message (Collapse)AuthorAgeFilesLines
* baseextensiontask: provide an API to allow for dynamic sources (#211)James Tucker2023-03-071-0/+9
| | | | | | | | | | | | | | | | | | If a build wishes to generate some of the extension source files then the pattern input is insufficient. Provide a place to stash an additional FileList that will then become a dependency of the compile tasks. Example: ```ruby file 'ext/libfoo/generated.c' do |t| open(t.name, 'w+) { |f| f << '#include <foo.h>' } end Rake::ExtensionTask.new('foo') do |ext| ext.extra_sources << 'generated.c' end ```
* Add support for RubyGems 3.3.21 or later (#209)Mike Dalessio2022-12-162-21/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Rubygems 3.3.21, the Gem::Platform name always contains the library version for gnu platforms. So where the rake-compiler config entries previously were: ```yaml --- rbconfig-x86_64-linux-gnu-2.7.0: "/usr/local/rake-compiler/ruby/x86_64-redhat-linux/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux-gnu/rbconfig.rb" rbconfig-x86_64-linux-2.7.0: "/usr/local/rake-compiler/ruby/x86_64-redhat-linux/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux-gnu/rbconfig.rb" ``` with later versions of rubygems, it is only ```yaml --- rbconfig-x86_64-linux-gnu-2.7.0: "/usr/local/rake-compiler/ruby/x86_64-redhat-linux/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux-gnu/rbconfig.rb" ``` This means that the current way of finding a matching runtime, by doing a string comparison on the config keys, is no longer appropriate. This is causing failing builds downstream in `rake-compiler-dock`. This PR: - extracts a new CompilerConfig class to encapsulate the logic - uses `Gem::Platform#=~` to tell if the gem platform matches the runtime platform
* spec: require yaml explicitlySutou Kouhei2022-04-151-0/+1
|
* Support --release option to build JRuby extension for older platforms (#201)Satoshi Tagomori2022-01-221-0/+25
|
* Set correct `required_ruby_version` when some `RUBY_CC_VERSION`s are missing ↵Lars Kanis2022-01-181-3/+6
| | | | | | | (#199) The required_ruby_version was set twice, although one in define_native_tasks is enough. Fixes #198
* java: use command line array style instead of stringSutou Kouhei2019-10-211-2/+2
|
* Make lint options customizable (#158)Stephen George2019-10-211-0/+30
| | | | | | | | | | | | | | | | | | * Make customizable compiler Xlint option for JRuby native extension * [CS] restructure and fix indentation of (defaults) spec * Add specs for lint_option * [DOC] CHANGELOG: stub changelog entry for the next release * [DOC] CHANGELOG: Make customizable compiler Xlint option for JRuby native extension * Use "-Xlint" option for JRuby native extension by default. `javac -help -X` > -Xlint Enable recommended warnings
* Stop to make unreleased Ruby installableKouhei Sutou2018-12-231-2/+2
| | | | | | GitHub: fix #150 Reported by MSP-Greg. Thanks!!!
* Regard C++ sources as source_filesTakashi Kokubun2017-04-271-2/+2
|
* Add more tests for gemspec mutation of native gemsLars Kanis2017-04-201-1/+12
|
* Use RSpec 3Kouhei Sutou2017-03-242-58/+58
|
* SimplifyKouhei Sutou2016-12-021-0/+40
|
* Update specv1.0.0Kouhei Sutou2016-06-211-5/+5
|
* Accept symbol name in extension taskTakashi Kokubun2016-05-091-0/+5
|
* Fix install destination with directory prefixesKenta Murata2016-04-241-0/+30
|
* Add examplesKenta Murata2016-04-241-0/+28
|
* Adjust cross specs to fit to the new fake mechanism.Lars Kanis2016-01-311-8/+2
| | | | One spec is obsolete now, since we no longer generate rbconfig.rb
* Add rake tasks for files added to spec.files by a cross_compile blockAaron Stone2014-12-311-0/+30
| | | | Resolves #98
* Improvements in version/platforms mapping for testsLuis Lavena2014-08-031-20/+27
|
* Make config_yml mock paths shorterLuis Lavena2014-08-031-4/+4
|
* added configuration for Ruby 2.1 support in specJonas Genannt2014-08-021-1/+4
| | | | | | | | add Ruby 2.1 support in Spec tests Debian bugs: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746084 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747723
* Add rbconfig configuration for Ruby 2.0.0Luis Lavena2013-05-051-0/+2
| | | | | These known/unknown platform pairs are required for tests to run under Ruby 2.0.0
* Use platform specific directories for packaging gem files.Lars Kanis2013-03-271-2/+2
| | | | | | | | | | | Building gems for distinct platforms within one rake run conflicted in the lib/ directory, because all binary extensions were stored there and were copied from there to become packaged. This resulted in storing a binary extension of a wrong platform in a gem. To avoid this, the files to package are now stored in a platform specific stage directory and are used to package the specific gem.
* Add possibility to set per-platform cross_config_options.Lars Kanis2013-03-131-1/+10
| | | | | This is especially useful to set distinct library paths for different target platforms.
* Store cross compiled Ruby into seperate directories depending on HOST platform.Lars Kanis2013-03-131-12/+20
| | | | | | | | | Also prefix the selection of rbconfig in config.yml with the corresponding Ruby platform. This allowes to use cross compiled Ruby-builds for multiple target architectures on the same machine. This is especially usefull to compile for Ruby-2.0 i386-mingw32 and x64-mingw32 platforms.
* Ruby 2.0 is 2.0.0 ABILuis Lavena2013-02-231-1/+1
|
* Fix test suite failure with Ruby 2.0.0.Vít Ondruch2013-02-201-0/+1
|
* Generate dummy cross-compile target when no configuration exists.Matijs van Zuijlen2011-10-301-6/+19
| | | | This fixes issue #16.
* Warn if compiled files exists in extension's source directory. Closes GH-35Luis Lavena2011-04-221-4/+15
|
* Add the possibility to pass include flags to ruby in an ExtensionTask.Jens Finkhaeuser2011-04-221-0/+4
|
* Start considering 1.9.2 and 1.9.3 as rbconfig candidatesLuis Lavena2010-09-211-0/+2
|
* bugfix for issue 15Luis Parravicini2009-12-301-0/+1
|
* Updated specifications to match code changes.Alex Coles2009-12-062-1/+183
| | | | Minor adjustment and completion of JavaExtensionTask specs.
* Allow alteration of the Gem Specification when cross compiling. Closes GH-3Luis Lavena2009-10-211-0/+10
| | | | | | | | | | | | 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 = "You've installed a binary version of this gem" end end
* Implemented fat-binaries packaging when cross compiling.Luis Lavena2009-05-301-1/+1
| | | | Please read History entry about usage of RUBY_CC_VERSION.
* Naive support for multiple versions with RUBY_CC_VERSIONLuis Lavena2009-05-301-0/+31
| | | | | | | | This is in preparation for fat-binaries work. rake cross compile RUBY_CC_VERSION=1.8.6:1.9.1 Will generate binaries for both 1.8.6 and 1.9.1 compilers.
* Ensure only version specific of binaries get copied.Luis Lavena2009-05-301-2/+2
|
* Can now cross compile extensions for 1.9 using 1.8.x as base.Luis Lavena2009-05-301-0/+11
| | | | | | Be warned: works from 1.8 to 1.9, but not if your default ruby is 1.9. There are some issues inside mkmf.rb that limits this, needs further investigation.
* Allow simultaneous versions of Ruby to compile extensions.Luis Lavena2009-04-271-19/+22
|
* Allow generation of multiple gems for WindowsLuis Lavena2009-04-251-0/+12
| | | | | | | | | | | | | - This allows build gems for both VC6 and MinGW builts of Ruby. Rake::ExtensionTask.new('my_extension', GEM_SPEC) do |ext| ext.cross_compile = true ext.cross_platform = ['i386-mswin32', 'i386-mingw32'] end This is highly experimental and exposed the need to refactor ExtensionTask internals. Right now it fires the compilation process twice, which is suboptimal.
* Tweak: changed describe to context for specs.Luis Lavena2009-04-251-23/+23
| | | | Made more sense for nested example groups.
* Fixed broken specs for rake-compiler configuration.Luis Lavena2009-04-091-6/+10
| | | | | - It no longer raises an error, but instead a warning. - Uses captured console output.
* Implement Ruby version faker.Luis Lavena2009-03-211-8/+22
| | | | | | | | | During cross compilation, rake-compiler will create a fake.rb file to mimic a different version than the one used to execute the build process. Yet still, there are some changes between 1.9 and 1.8 not yet ironed.
* Allow X.Y.Z version of Ruby be specified.Luis Lavena2009-03-211-8/+8
| | | | | This is part of the work required for getting you compile a extension from one version of ruby targetting another.
* Bended the convention for extension folder.Luis Lavena2009-02-221-4/+17
| | | | This allow define ext_dir for custom extension location.
* Allow RUBY_CC_VERSION to specify target Ruby version.Luis Lavena2008-12-071-0/+14
| | | | | This makes 'rake cross compile' more flexible when multiple Ruby versions exists into rake-compiler directory.
* Do not raise error if no configuration is found.Luis Lavena2008-11-291-2/+2
| | | | | This broke execution on Windows. Yet still 'cross' should only be defined certain platforms.
* Added cross compilation tasks and options.Luis Lavena2008-11-291-1/+97
| | | | | | | | | | Now is possible to rely on rake-compiler to cross compile extensions. rake compile #=> builds binaries for current platform rake cross compile #=> builds binaries using cross-ruby rake native gem #=> generates ruby and native gems. rake cross native gem #=> generates ruby and cross platform native gems.
* Renamed configure options to better suit purpose.Luis Lavena2008-11-291-2/+2
|
* Refactored generation of 'native' tasks.Luis Lavena2008-11-291-4/+5
| | | | | * It now only chains for current platform, open the door for cross compilation. * Ensure proper binary gets copied to lib folder prior generation of gem.