Allows for passing environment variables specifically to the "make install"
step of package building.
This can be helpful for providing a different DESTDIR= to a ruby install from
the --prefix that is used
There doesn't seem to be a way to construct a sed invocation for
in-place editing that is compatible with both BSD and GNU sed.
http://stackoverflow.com/q/5694228/11687Fixes#475
The default shebang for binstubs in a JRuby installation is
`#!/usr/bin/env jruby`. On a rbenv-managed JRuby, this will execute the
`jruby` rbenv shim. In a situation where a JRuby tool like `gem` is
executed from within a running rbenv by a rbenv plugin, (e.g.
rbenv-gemset) this can trigger another rbenv run to resolve the shim.
This can lead to endless recursion of rbenv calls.
Fixes#471, closes#473
References jf/rbenv-gemset#56
I thought this was not necessary, but a number of people had problems
when linking to OS X's "readline" (actually Editline wrapper):
- Some components of Pry wouldn't work
- Writing literal Unicode characters was not possible #379
- The compilation would downright fail in some cases #82#461Fixes#461
If `-p|--patch` flag was set while invoking `ruby-build` or
`rbenv install`, ruby-build will use `patch -p0 -i -` to apply a patch
from stdin to Ruby, Rubinius, or JRuby source code before running the
rest of `build_package_*` commands.
References #443
We symlink Rubinius' `PREFIX/gems/bin` into `PREFIX/bin` so that new
RubyGems binstubs get added to the main bin directory and therefore
become available to rbenv.
However, by throwing away `irb`, `rake`, `rdoc`, and `ri` binstubs
during this process (which are non-executable and have an invalid
shebang), we break the same commands in latest versions of Rubinius.
This change ensures that these binstubs get preserved, their shebang
corrected to `#!PREFIX/bin/rbx`, their executable bit flipped on, and
copied over to the main bin directory.
Fixes#468
`grep -c` would correctly output "0", which is handled specially later
on, but would also exit with a nonzero status which would abort the
script. Piping the output to `wc` to do the counting makes the exit
status of grep irrelevant.
Fixes#447
Installing Rubinius would print "BUILD FAILED" at the `bundle` step but
the installation would proceed nevertheless and finish successfully.
It turns out that the `command ...` expression will trigger the ERR trap
on failure even when it's a part of `||` list or a condition inside an
`if` statement. This defies how the ERR trap is supposed to work, so the
workaround is to execute it in a subshell which doesn't inherit the ERR
trap of its parent.
Because OS X Mountain Lion removed X Windows, compiling Ruby 1.8 would
fail unless the user installed XQuartz manually and passed:
CPPFLAGS=-I/opt/X11/include rbenv install 1.8.7-p374
This auto-detects if `/opt/X11/include` is present on the system and
configures CPPFLAGS accordingly. However if XQuartz was never installed,
we simply configure Ruby using `--without-tk`.
Fixes#193#207
References 353246926c
The problem wasn't in quoting as per 0b5206172, but in the fact that
Ruby trunk added a LDFLAGS checker that aborts if any of the paths
listed in it are missing:
3636f8c0f5
This is probably a bug in Ruby, but for now a simple workaround is to
iterate through paths in LDFLAGS and ensure they exist.
References #441
Some Rubies need Rake or Bundler for the installation process. However,
since the host Ruby version might not have those gems installed, install
them in a temporary GEM_HOME and add their executables to PATH.
Fixes#426
When installing mruby-dev, the cp command doesn't use the force flag.
This causes an issue when using a custom build configuration (via
MRUBY_CONFIG environment variable) and installing mrbgems from Github,
as the pack files in the git repositories are read-only.
Previously, if `http get` failed, the `download_tarball` function would
still continue since the ERR trap had no effect at that point.
Given a script in the form of `{ ... } || return 1`, the expressions
that are the part of the first group are not subject to ERR trap since
they are non-last in a chain of expressions.
However, since we still can't count on the ERR trap taking effect in
this phase, better just rewrite the function to manually abort.
Fixes#394
`tar` on OS X auto-detects the type of compression used, so it doesn't
care whether `-z` or `-j` flags were passed to it for extraction.
However, since latest Rubinius archives are compressed with bzip2, we
must handle this distinction explicitly for the sake of other platforms.
fixes#470
Rubinius 2 insists that it installs RubyGems binstubs into
`PREFIX/gems/bin` instead of `PREFIX/bin`.
This creates complexity for rbenv rehash and exec processes, so we
symlink `gems/bin` into `bin` and have RubyGems create binstubs at a
location that is consistent with other Ruby implementations.
See sstephenson/rbenv#178, sstephenson/rbenv#461