mirror of
https://github.com/rbenv/ruby-build.git
synced 2024-12-29 13:15:33 +01:00
db600ccdfd
TruffleRuby build definitions used to explicitly rely on `brew --prefix openssl@1.1` on macOS and abort installation if that was not found. However, this check didn't take into account that the user might have set OPENSSL_PREFIX in their environment, or that they have another `openssl@*` version installed via Homebrew. This change removes the `use_homebrew_openssl` check and allows TruffleRuby to perform its own OpenSSL detection. https://github.com/oracle/truffleruby/blob/vm-23.1.0/lib/truffle/truffle/openssl-prefix.rb#L14-L17
51 lines
993 B
Bash
Executable file
51 lines
993 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "usage: $0 VERSION RELEASE_DIRECTORY"
|
|
exit 1
|
|
fi
|
|
|
|
version="$1"
|
|
release_directory="$2"
|
|
file="share/ruby-build/truffleruby-${version}"
|
|
|
|
add_platform() {
|
|
platform="$1"
|
|
basename="truffleruby-${version}-${platform}.tar.gz"
|
|
url="https://github.com/oracle/truffleruby/releases/download/graal-${version}/${basename}"
|
|
sha256=$(sha256sum "$release_directory/$basename" | cut -d ' ' -f 1)
|
|
|
|
cat >> "$file" <<EOS
|
|
install_package "truffleruby-${version}" "${url}#${sha256}" truffleruby
|
|
;;
|
|
EOS
|
|
}
|
|
|
|
cat > "$file" <<EOS
|
|
platform="\$(uname -s)-\$(uname -m)"
|
|
case \$platform in
|
|
Linux-x86_64)
|
|
EOS
|
|
add_platform "linux-amd64"
|
|
cat >> "$file" <<EOS
|
|
Linux-aarch64)
|
|
EOS
|
|
add_platform "linux-aarch64"
|
|
cat >> "$file" <<EOS
|
|
Darwin-x86_64)
|
|
EOS
|
|
add_platform "macos-amd64"
|
|
cat >> "$file" <<EOS
|
|
Darwin-arm64)
|
|
EOS
|
|
add_platform "macos-aarch64"
|
|
cat >> "$file" <<EOS
|
|
*)
|
|
colorize 1 "Unsupported platform: \$platform"
|
|
return 1
|
|
;;
|
|
esac
|
|
EOS
|