From 2120c4602459b07ee89be89b4908679f3296e59d Mon Sep 17 00:00:00 2001 From: Robert Tate Date: Thu, 19 Oct 2017 04:11:37 -0400 Subject: [PATCH] Fix installing Ruby with LibreSSL and MacPorts (Issue #4208) (#4209) --- CHANGELOG.md | 1 + scripts/functions/requirements/osx_port | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb40658b99..708df6532e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ * Require make for JRuby 9 [\#4058](https://github.com/rvm/rvm/issues/4058) * Fix support for zsh 5.4.1 [bash_zsh_support \#6](https://github.com/mpapis/bash_zsh_support/pull/6) * Installing rbx-3.70 fails on PCLinuxOS 64-bit [\#3895](https://github.com/rvm/rvm/issues/3895) +* Can't install Ruby with MacPorts and LibreSSL [\#4208](https://github.com/rvm/rvm/issues/4208) #### Upgraded Ruby interpreters: * Add support for Ruby 2.2.8, 2.3.5 and 2.4.2 [\#4159](https://github.com/rvm/rvm/pull/4159) diff --git a/scripts/functions/requirements/osx_port b/scripts/functions/requirements/osx_port index 46ec570164..836def6c99 100644 --- a/scripts/functions/requirements/osx_port +++ b/scripts/functions/requirements/osx_port @@ -58,12 +58,14 @@ requirements_osx_port_before() requirements_osx_port_libs_default() { port_libs=( - autoconf automake libtool pkgconfig + autoconf automake gdbm libffi libiconv libksba libtool libyaml pkgconfig readline sqlite3 zlib ) + case "$1" in (*-head) __rvm_which git >/dev/null || port_libs+=( git ) ;; esac + __rvm_selected_compiler >/dev/null || case "$1" in (ruby-1*|ree*) @@ -77,9 +79,15 @@ requirements_osx_port_libs_default() fi ;; esac - port_libs+=( - libiconv libyaml libffi readline libksba openssl sqlite3 zlib gdbm - ) + + # LibreSSL is a fork of OpenSSL and is interchangable + # If it is installed, then don't worry about OpenSSL + if + ! requirements_osx_port_lib_installed libressl + then + port_libs+=( openssl ) + fi + if requirements_osx_port_lib_installed ncursesw then @@ -90,6 +98,7 @@ Error! ncursesw was replaced by ncurses a long time ago, please uninstall 'ncurs else port_libs+=( ncurses ) fi + requirements_check_fallback curl-ca-bundle certsync || return $? requirements_check "${port_libs[@]}" || return $? }