Use openssl from Homebrew for TruffleRuby on macOS

* The openssl built by ruby-build was not used by TruffleRuby,
  and causes https://github.com/oracle/truffleruby/issues/1818
* Improve error message when openssl from Homebrew is not available.
* Change the definition code so it checks the operating system too.
This commit is contained in:
Benoit Daloze 2019-11-21 15:59:28 +01:00 committed by Benoit Daloze
parent f0a393d20a
commit 47074b9174
21 changed files with 245 additions and 120 deletions

View file

@ -1,7 +1,13 @@
install_package "openssl-1.1.0j" "https://www.openssl.org/source/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
if is_mac; then
install_package "truffleruby-1.0.0-rc11" "https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc11/truffleruby-1.0.0-rc11-macos-amd64.tar.gz#c8c86fe7a77cacd690ddb64c66fbd92ff1f08788e40494cb4662b3d4731b02a6" truffleruby
else
case $(uname -s) in
Linux)
install_package "truffleruby-1.0.0-rc11" "https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc11/truffleruby-1.0.0-rc11-linux-amd64.tar.gz#268c38f01331db4cbeae584aea4e9336b6a01aa1fcc621dda1232dcaac89da45" truffleruby
fi
;;
Darwin)
use_homebrew_openssl
install_package "truffleruby-1.0.0-rc11" "https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc11/truffleruby-1.0.0-rc11-macos-amd64.tar.gz#c8c86fe7a77cacd690ddb64c66fbd92ff1f08788e40494cb4662b3d4731b02a6" truffleruby
;;
*)
colorize 1 "Unsupported operating system: Linux"
return 1
;;
esac