Commit 50bf60f9 authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Really fix installing Ruby 2.1.0 from trunk

The problem wasn't in quoting as per 0b520617, but in the fact that
Ruby trunk added a LDFLAGS checker that aborts if any of the paths
listed in it are missing:
https://github.com/ruby/ruby/commit/3636f8c0f56ddf15e26e28e7a38e748588fad976

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
parent 0b520617
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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 "$@"
+1 −1
Original line number Diff line number Diff line
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