Commit dbd8c71d by Mislav Marohnić

Fix Rubinius gem binstubs path

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
parent 90cbc717
...@@ -431,6 +431,7 @@ build_package_rbx() { ...@@ -431,6 +431,7 @@ build_package_rbx() {
{ bundle { bundle
./configure --prefix="$PREFIX_PATH" $RUBY_CONFIGURE_OPTS ./configure --prefix="$PREFIX_PATH" $RUBY_CONFIGURE_OPTS
rake install rake install
fix_rbx_gem_binstubs "$PREFIX_PATH"
} >&4 2>&1 } >&4 2>&1
} }
...@@ -516,6 +517,20 @@ fix_directory_permissions() { ...@@ -516,6 +517,20 @@ fix_directory_permissions() {
find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \; find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \;
} }
fix_rbx_gem_binstubs() {
local prefix="$1"
local gemdir="${prefix}/gems/bin"
local bindir="${prefix}/bin"
# Symlink Rubinius' `gems/bin/` into `bin/`
if [ -d "$gemdir" ]; then
for file in "$gemdir"/*; do
[ -x "$file" ] && mv "$file" "$bindir"
done
rm -rf "$gemdir"
ln -s ../bin "$gemdir"
fi
}
require_gcc() { require_gcc() {
local gcc="$(locate_gcc || true)" local gcc="$(locate_gcc || true)"
......
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