Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,6 @@
[JRuby]: https://jruby.org/
[MagLev]: https://maglev.github.io/
[MRuby]: https://github.com/mruby/mruby#readme
[truffleruby]: https://github.com/oracle/truffleruby#readme
[truffleruby]: https://github.com/truffleruby/truffleruby#readme

[ruby-versions]: https://github.com/postmodern/ruby-versions#readme
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ of [rbenv]

[Ruby]: https://www.ruby-lang.org/
[JRuby]: https://jruby.org/
[TruffleRuby]: https://github.com/oracle/truffleruby
[TruffleRuby]: https://github.com/truffleruby/truffleruby
[mruby]: https://github.com/mruby/mruby#readme

[Ubuntu]: https://ubuntu.com/
Expand Down
74 changes: 2 additions & 72 deletions share/ruby-install/truffleruby-graalvm/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,74 +1,4 @@
#!/usr/bin/env bash

case "$package_manager" in
apt)
ruby_dependencies=(
make
gcc
zlib1g-dev
libssl-dev
libxml2
libyaml-dev
)
;;
dnf|yum)
ruby_dependencies=(
make
gcc
zlib-devel
openssl-devel
libxml2
libyaml-devel
)
;;
pacman)
ruby_dependencies=(
make
gcc
zlib
openssl
libxml2
libyaml
)
;;
zypper)
ruby_dependencies=(
make
gcc
zlib-devel
libopenssl-devel
libxml2
libyaml-devel
)
;;
pkg)
ruby_dependencies=(
gmake
gcc
openssl
libxml2
libyaml
)
;;
brew)
ruby_dependencies=(
openssl@3
libyaml
)
;;
port)
ruby_dependencies=(
openssl
libyaml
)
;;
xbps)
ruby_dependencies=(
base-devel
openssl-devel
zlib-devel
libxml2
libyaml-devel
)
;;
esac
# Same as truffleruby dependencies
source "${BASH_SOURCE[0]%/*}/../truffleruby/dependencies.sh"
Comment on lines +3 to +4
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also be a symlink, not sure what you prefer.

4 changes: 2 additions & 2 deletions share/ruby-install/truffleruby-graalvm/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [[ "$ruby_version" == "23.0.0" ]]; then
elif (( truffleruby_major > 23 || (truffleruby_major == 23 && truffleruby_minor >= 1) )); then # 23.1+
ruby_dir_name="truffleruby-$ruby_version-${graalvm_platform/darwin/macos}-$graalvm_arch"
ruby_archive="${ruby_archive:-truffleruby-jvm-$ruby_version-${graalvm_platform/darwin/macos}-$graalvm_arch.tar.gz}"
ruby_mirror="${ruby_mirror:-https://github.com/oracle/truffleruby/releases/download}"
ruby_mirror="${ruby_mirror:-https://github.com/truffleruby/truffleruby/releases/download}"
ruby_url="${ruby_url:-$ruby_mirror/graal-$ruby_version/$ruby_archive}"
else
ruby_dir_name="graalvm-ce-java11-$ruby_version"
Expand All @@ -43,7 +43,7 @@ fi
function install_ruby()
{
if [[ "$install_dir" == '/usr/local' ]]; then
error "Unsupported see https://github.com/oracle/truffleruby/issues/1389"
error "Unsupported see https://github.com/truffleruby/truffleruby/issues/1389"
return 1
fi

Expand Down
77 changes: 47 additions & 30 deletions share/ruby-install/truffleruby/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,74 +1,91 @@
#!/usr/bin/env bash

# See https://github.com/truffleruby/truffleruby/blob/master/README.md#dependencies

truffleruby_major="${ruby_version%%.*}"

case "$package_manager" in
apt)
ruby_dependencies=(
make
gcc
zlib1g-dev
libssl-dev
libxml2
libyaml-dev
ca-certificates
)
;;
dnf|yum)
dnf|yum|zypper)
ruby_dependencies=(
make
gcc
zlib-devel
openssl-devel
libxml2
libyaml-devel
ca-certificates
)
;;
pacman)
ruby_dependencies=(
make
gcc
zlib
openssl
libxml2
libyaml
)
;;
zypper)
ruby_dependencies=(
make
gcc
zlib-devel
libopenssl-devel
libxml2
libyaml-devel
ca-certificates
)
;;
port)
ruby_dependencies=(
openssl
libyaml
curl-ca-bundle
)
;;
brew)
ruby_dependencies=(
openssl@3
libyaml
ca-certificates
)
;;
pkg)
ruby_dependencies=(
gmake
gcc
openssl
libxml2
libyaml
ca-certificates
)
;;
xbps)
ruby_dependencies=(
base-devel
openssl-devel
zlib-devel
libxml2
libyaml-devel
ca-certificates
)
;;
esac

if (( truffleruby_major < 33 )); then
case "$package_manager" in
apt)
ruby_dependencies+=(
libssl-dev
libyaml-dev
)
;;
dnf|yum|xbps)
ruby_dependencies+=(
openssl-devel
libyaml-devel
)
;;
pacman|port|pkg)
ruby_dependencies+=(
openssl
libyaml
)
;;
zypper)
ruby_dependencies+=(
libopenssl-devel
libyaml-devel
)
;;
brew)
ruby_dependencies+=(
openssl@3
libyaml
)
;;
esac
fi
23 changes: 5 additions & 18 deletions share/ruby-install/truffleruby/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,17 @@ esac
ruby_dir_name="truffleruby-$ruby_version-$truffleruby_platform-$truffleruby_arch"
ruby_archive="${ruby_archive:-$ruby_dir_name.tar.gz}"
truffleruby_major="${ruby_version%%.*}"
truffleruby_without_major="${ruby_version#*.}"
truffleruby_minor="${truffleruby_without_major%%.*}"

if [[ "$ruby_version" == "23.0.0" ]]; then
log "TruffleRuby 23.0 and later installed by ruby-install use the faster Oracle GraalVM distribution"
log "Oracle GraalVM uses the GFTC license, which is free for development and production use, see https://medium.com/graalvm/161527df3d76"
fi

ruby_mirror="${ruby_mirror:-https://gds.oracle.com/api/20220101/artifacts}"
truffleruby_artifact_id=""

case "$truffleruby_platform-$truffleruby_arch" in
linux-amd64) truffleruby_artifact_id="FD4AB182EA4CEDFDE0531518000AF13E" ;;
linux-aarch64) truffleruby_artifact_id="FD40BA2367C226B6E0531518000AE71A" ;;
macos-amd64) truffleruby_artifact_id="FD4AB182EA51EDFDE0531518000AF13E" ;;
macos-aarch64) truffleruby_artifact_id="FD40BBF6750C366CE0531518000ABEAF" ;;
*) fail "Unsupported platform $truffleruby_platform-$truffleruby_arch" ;;
esac

ruby_url="${ruby_url:-$ruby_mirror/$truffleruby_artifact_id/content}"
elif (( truffleruby_major > 23 || (truffleruby_major == 23 && truffleruby_minor >= 1) )); then # 23.1+
ruby_mirror="${ruby_mirror:-https://github.com/oracle/truffleruby/releases/download}"
if (( truffleruby_major >= 23 )); then
ruby_mirror="${ruby_mirror:-https://github.com/truffleruby/truffleruby/releases/download}"
ruby_url="${ruby_url:-$ruby_mirror/graal-$ruby_version/$ruby_archive}"
else
ruby_mirror="${ruby_mirror:-https://github.com/oracle/truffleruby/releases/download}"
ruby_mirror="${ruby_mirror:-https://github.com/truffleruby/truffleruby/releases/download}"
ruby_url="${ruby_url:-$ruby_mirror/vm-$ruby_version/$ruby_archive}"
fi

Expand All @@ -49,7 +36,7 @@ fi
function install_ruby()
{
if [[ "$install_dir" == '/usr/local' ]]; then
error "Unsupported see https://github.com/oracle/truffleruby/issues/1389"
error "Unsupported see https://github.com/truffleruby/truffleruby/issues/1389"
return 1
fi

Expand Down
Loading
Loading