Commit 3e5c31f2 authored by Mislav Marohnić's avatar Mislav Marohnić
Browse files

Support Rubinius linking against Homebrew openssl

Internally, ruby-build will want to set `--with-openssl-dir` if we try
to detect Homebrew's OpenSSL or build one for the OS X. However,
Rubinius doesn't support that configure flag. So, this translates
`--with-openssl-dir` to a combination of `--with-lib-dir` and
`--with-include-dir`.
parent c431c25e
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -564,7 +564,20 @@ build_package_rbx() {
      mkdir -p vendor
      ln -s "$RUBY_BUILD_CACHE_PATH" vendor/prebuilt
    fi
    RUBYOPT="-rubygems $RUBYOPT" ./configure --prefix="$PREFIX_PATH" $RUBY_CONFIGURE_OPTS "${RUBY_CONFIGURE_OPTS_ARRAY[@]}"

    local opt
    local -a configure_opts
    for opt in "${RUBY_CONFIGURE_OPTS_ARRAY[@]}"; do
      if [[ $opt == --with-openssl-dir=* ]]; then
        local openssl_dir="${opt#*=}"
        configure_opts[${#configure_opts[@]}]="--with-lib-dir=${openssl_dir}/lib"
        configure_opts[${#configure_opts[@]}]="--with-include-dir=${openssl_dir}/include"
      else
        configure_opts[${#configure_opts[@]}]="$opt"
      fi
    done

    RUBYOPT="-rubygems $RUBYOPT" ./configure --prefix="$PREFIX_PATH" $RUBY_CONFIGURE_OPTS "${configure_opts[@]}"
    rake install
    fix_rbx_gem_binstubs "$PREFIX_PATH"
    fix_rbx_irb "$PREFIX_PATH"
+1 −0
Original line number Diff line number Diff line
require_llvm 3.5
install_package "openssl-1.0.1q" "https://www.openssl.org/source/openssl-1.0.1q.tar.gz#b3658b84e9ea606a5ded3c972a5517cd785282e7ea86b20c78aa4b773a047fb7" mac_openssl --if has_broken_mac_openssl
install_package "rubinius-2.5.8" "https://s3.amazonaws.com/releases.rubini.us/rubinius-2.5.8.tar.bz2#d6b411732aa035865f2855845abe5405119560f0979062672d576601de89e59a" rbx