- Split into `Ext` and `Lib` classes.
- `Ext#files` should not include built extension libraries.
- `Ext#files` should include scripts under its own `lib`.
- `Lib#files` should be prefixed with `lib/`.
Pointing `Gem.ruby` to the newly installed ruby gives mkmf the right
inputs to build extensions in bundled gems. Previously, this patching
was only done for compressed bundled gems.
This patch also prevents `tool/fake.rb` from propagating to the child
process running mkmf for the native extension. The way `tool/fake.rb`
changes mkmf variables using `Kernel#trace_var` created spooky action at
a distance which made debugging difficult.
AppVeyor Windows CI started to fail starting with
8a3663789c because it enabled extension
building for bundled gems on mswin. This patch should address the CI
failures.
When building with --with-static-linked-ext, some exts without rb file
doesn't produce neither .so or .rb under .ext/common. Therefore, change
rbinstall.rb to install gemspec even if there is no .so or .rb for that
case.
With /Z7, no .pdb file is generated, so trying to link it during build
fails on my machine even though it's okay on CI.
By the way, in my local testing, no .pdb is generated in cwd at runtime
even without the /Fd option. I guess we can pass it just in case.
For the `test-bundled-gems`, make `debug.so` with extconf.rb and
`make` command directly because `rake-compiler` assume ruby is
installed (but `test-bundled-gems` can run without installation).
To uniform directory structures, sometimes files are gathered in
different directory than the upstreams, executable files in
`libexec` for instance. Re-map these files to consistent with the
upstreams.
Because unexpected names are listed in gemspec files.
* "Fix gemspec only case"
fc56b96b09
* "Refined installation of gemspecs placed other than ext and lib"
31f4dec637
Use UnpackedInstaller for installation of default gems similarly it is
already used to install bundled gems.
This allows to reuse RubyGems functionality instead of custom code full
of exceptions.
Although gemspec file (e.g., power_assert and rake) often uses
`git ls-files`, as it does not make sense in other than its own
repository, it has been ignored now. Gather all files expanded
from the bundled gem to install, instead.