Homebrew bumped the version of LLVM installed with `brew install llvm`
from 3.5.1 to 3.6.0. So now users will have to tap homebrew-versions and
run `brew install llvm35` in order to get the version necessary to
install recent versions of Rubinius. The 3.5-specific `llvm-config`
becomes `llvm-config-3.5` accordingly.
0196a069a0
The main "llvm" Homebrew package is occasionally getting updated and is
not guaranteed to be version 3.5. Right now it's 3.6, but that depends
on the version of Homebrew that someone has installed.
This lists through all installed Homebrew packages named "llvm*" and
tests each `llvm-config --version` for "3.5*" until it finds one.
OpenJDK reports its version slightly different than Oracle Java, and
this was causing the logic in bin/ruby-build to not detect Java 7 or
higher when OpenJDK was used.
This is to fix the error when installing new gems that have executables
which match existing binstubs in the Rubinius bin directory:
"bundle" from bundler conflicts with PREFIX/gems/bin/bundle
RubyGems is supposed to override the binstub if it detects that the
previous one was also generated by RubyGems for the gem of the same
name, but its detection mechanism gets thrown off by having a double
shebang as a result of our binstubs fixing process.
https://github.com/rubygems/rubygems/blob/v2.2.2/lib/rubygems/installer.rb#L149-L154
This avoids generating binstubs with a double shebang.
When generating SHA2 checksums with `openssl`, we want to give
preference to the newer OpenSSL that might have been installed with
Homebrew. However if there's no `brew` command the ERR trap will kick in
and display the "BUILD FAILED" notice although the build would proceed
to run.
Related: c0dc8908e1Fixes#713
Prior to this we tried to use pre-built LLVM binaries since Yosemite,
but starting with Rubinius 2.3.0 this is no longer a feature of its
build system. Instead, look for "llvm" Homebrew package and suggest
installing it if it's missing.
When requested via `-h|--help`, usage text should be displayed on stdout
and the exit status should be 0.
When usage text is shown due to invalid arguments, it should be
printed to stderr and exit status should be 1.
The current error message for missing subversion is "error: please install \`svn\` and try again", leading the user to try to find and install a package named "svn" (eg. `aptitude install svn for # debian / ubuntu). Changing it to "subversion" can help users unaware that svn is a binary installed by the subversion package, get through the error.
This fixes `rbenv install -l` displaying each version twice due to
RUBY_BUILD_DEFINITIONS path containing ruby-build's own definitions path
twice: both as an rbenv plugin and by appending its own internal path.
When installing rbx over an existing location, the `gems/bin` directory
will already be a symlink to `bin/` and an attempt to recreate this will
end up in recursion that keeps growing a binstub file until the disk is full.
If RUBY_BUILD_CACHE_PATH is set (typically "`rbenv root`/cache" if it
exists), have Rubinius `./configure` script download prebuilt LLVM
versions into that directory and re-use them if already present.