Skip to content

Commit

Permalink
Fix installing Ruby with LibreSSL and MacPorts (Issue #4208) (#4209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robiathin authored and pkuczynski committed Oct 19, 2017
1 parent b37f12c commit 2120c46
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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)
Expand Down
17 changes: 13 additions & 4 deletions scripts/functions/requirements/osx_port
Expand Up @@ -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*)
Expand All @@ -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
Expand All @@ -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 $?
}
Expand Down

0 comments on commit 2120c46

Please sign in to comment.