Skip to content

Commit

Permalink
Really fix installing Ruby 2.1.0 from trunk
Browse files Browse the repository at this point in the history
The problem wasn't in quoting as per 0b52061, but in the fact that
Ruby trunk added a LDFLAGS checker that aborts if any of the paths
listed in it are missing:
ruby/ruby@3636f8c

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
  • Loading branch information
mislav committed Oct 27, 2013
1 parent 0b52061 commit 50bf60f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,16 @@ build_package_verify_openssl() {
end' >&4 2>&1
}

# Ensure that directories listed in LDFLAGS exist
build_package_ldflags_dirs() {
local arg
for arg in $LDFLAGS; do
case "$arg" in
-L* ) mkdir -p "${arg#-L}" ;;
esac
done
}

rake() {
if [ -e "./Gemfile" ]; then
bundle exec rake "$@"
Expand Down
2 changes: 1 addition & 1 deletion share/ruby-build/2.1.0-dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_git "ruby-2.1.0-dev" "https://github.com/ruby/ruby.git" "trunk" autoconf standard verify_openssl
install_git "ruby-2.1.0-dev" "https://github.com/ruby/ruby.git" "trunk" ldflags_dirs autoconf standard verify_openssl

0 comments on commit 50bf60f

Please sign in to comment.