-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Determine the homebrew openssl version based on the ruby version (closes
#474). * Ruby <= 3.0 requires openssl 1.1. * Ruby >= 3.1.0 requires openssl 3.0. * Removed `[email protected]` from `dependencies.txt` in favor of using `install_optional_deps` to install the variable openssl version.
- Loading branch information
1 parent
1ee0921
commit 352f78f
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ apt: xz-utils build-essential bison zlib1g-dev libyaml-dev libssl-dev libgdbm-de | |
dnf: xz gcc automake bison zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel | ||
yum: xz gcc automake bison zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel | ||
port: automake bison openssl readline libyaml gdbm libffi | ||
brew: automake bison [email protected] readline libyaml gdbm libffi | ||
brew: automake bison readline libyaml gdbm libffi | ||
pacman: xz gcc make bison zlib ncurses openssl readline libyaml gdbm libffi | ||
zypper: xz gcc make automake zlib-devel libyaml-devel libopenssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel | ||
pkg: openssl readline libyaml gdbm libffi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,24 @@ ruby_dir_name="ruby-$ruby_version" | |
ruby_mirror="${ruby_mirror:-https://cache.ruby-lang.org/pub/ruby}" | ||
ruby_url="${ruby_url:-$ruby_mirror/$ruby_version_family/$ruby_archive}" | ||
|
||
if [[ "$package_manager" == "brew" ]]; then | ||
case "$ruby_version_family" in | ||
2.*|3.0) openssl_version="1.1" ;; | ||
*) openssl_version="3.0" ;; | ||
esac | ||
fi | ||
|
||
# | ||
# Install [email protected] or [email protected] depending on the Ruby version, | ||
# only for homebrew. | ||
# | ||
function install_optional_deps() | ||
{ | ||
if [[ "$package_manager" == "brew" ]]; then | ||
install_packages "openssl@${openssl_version}" | ||
fi | ||
} | ||
|
||
# | ||
# Configures Ruby. | ||
# | ||
|
@@ -30,7 +48,8 @@ function configure_ruby() | |
case "$package_manager" in | ||
brew) | ||
opt_dir="$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm)" | ||
openssl_dir="$(brew --prefix [email protected])" | ||
|
||
openssl_dir="$(brew --prefix "openssl@$openssl_version")" | ||
;; | ||
port) | ||
opt_dir="/opt/local" | ||
|