mirror of
https://github.com/rbenv/ruby-build.git
synced 2026-11-09 15:49:20 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
573f87a93b |
||
|
|
3943d26446 | ||
|
|
cd54d2c33d |
||
|
|
efb9c19a56 |
||
|
|
4ef3159f94 |
||
|
|
6c959eabd8 | ||
|
|
b84455fe38 |
||
|
|
091a117c6f | ||
|
|
1123436bc9 |
||
|
|
13e8b39e0b | ||
|
|
b6a92c15f0 |
||
|
|
3f5262a6c8 | ||
|
|
bc1bc55b04 | ||
|
|
64bea4d22f | ||
|
|
4137d03923 | ||
|
|
1d2189d7dd |
||
|
|
4cb0afbecc |
||
|
|
7eacc0aaf0 |
||
|
|
36d503707c | ||
|
|
1d79f385aa |
||
|
|
b1d1866855 |
87 changed files with 442 additions and 100 deletions
|
|
@ -18,7 +18,7 @@
|
|||
# -6, --ipv6 Resolve names to IPv6 addresses only
|
||||
#
|
||||
|
||||
RUBY_BUILD_VERSION="20260924"
|
||||
RUBY_BUILD_VERSION="20261023"
|
||||
|
||||
OLDIFS="$IFS"
|
||||
|
||||
|
|
@ -208,16 +208,24 @@ is_freebsd() {
|
|||
[ "$(uname -s)" = "FreeBSD" ]
|
||||
}
|
||||
|
||||
is_fedora() {
|
||||
[ -r /etc/os-release ] || return 1
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/os-release
|
||||
# Treat Aurora, Bazzite, BlueFin, uCore, and other Fedora variants as "fedora".
|
||||
if [[ "${ID_LIKE:-$ID}" != "fedora" || ( $# -gt 0 && "${VERSION_ID%%.*}" -lt "$1") ]]; then
|
||||
return 1
|
||||
# The C compiler that Ruby's configure picks: $CC, otherwise gcc if available, otherwise cc.
|
||||
c_compiler() {
|
||||
if [ -n "$CC" ]; then
|
||||
echo "$CC"
|
||||
elif command -v gcc >/dev/null; then
|
||||
echo gcc
|
||||
else
|
||||
echo cc
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints the major version of GCC, or nothing if the given C compiler is not GCC (e.g. Clang).
|
||||
gcc_major_version() {
|
||||
# shellcheck disable=SC2086
|
||||
$1 -E -dM - </dev/null 2>/dev/null |
|
||||
awk '/^#define __clang__ /{clang=1} /^#define __GNUC__ /{gnuc=$3} END{if (!clang) print gnuc}'
|
||||
}
|
||||
|
||||
freebsd_package_prefix() {
|
||||
local package="$1"
|
||||
pkg info --prefix "$package" 2>/dev/null | cut -wf2
|
||||
|
|
@ -735,24 +743,37 @@ build_package_standard() {
|
|||
fi
|
||||
fi
|
||||
|
||||
local cc_override extra_cflags
|
||||
if [ -z "$CC" ] && is_mac 1010; then
|
||||
cc_override=clang
|
||||
elif [[ "$package_var_name" = "RUBY" && "$ruby_semver" -lt 30200 ]]; then
|
||||
local cc gcc_version
|
||||
cc="$(c_compiler)"
|
||||
gcc_version="$(gcc_major_version "$cc")"
|
||||
if [ "${gcc_version:-0}" -ge 15 ]; then
|
||||
# GCC 15 changed the default C mode from gnu17 to gnu23: https://gcc.gnu.org/gcc-15/changes.html#c
|
||||
# Ruby < 3.2 can't compile as C23, where `()` in a declaration means `(void)`.
|
||||
extra_cflags="-std=gnu17"
|
||||
fi
|
||||
if [[ -n "$extra_cflags" && "$ruby_semver" -ge 20600 && "$ruby_semver" -lt 20800 ]]; then
|
||||
# Ruby 2.6 checks its MJIT header with a bare $(CC), and the configure script of Ruby 2.7
|
||||
# (generated by Autoconf 2.71) silently ignores cflags, so the flags go on CC for those.
|
||||
cc_override="$cc $extra_cflags"
|
||||
extra_cflags=
|
||||
fi
|
||||
fi
|
||||
|
||||
( if [ "${CFLAGS+defined}" ] || [ "${!PACKAGE_CFLAGS+defined}" ]; then
|
||||
export CFLAGS="$CFLAGS ${!PACKAGE_CFLAGS}"
|
||||
fi
|
||||
if [ -z "$CC" ] && is_mac 1010; then
|
||||
export CC=clang
|
||||
elif [[ "$package_var_name" = "RUBY" && "$ruby_semver" -lt 30200 ]] && is_fedora 42; then
|
||||
# Fedora 42+ has updated to GCC v15. GCC v15 changed the default
|
||||
# mode from gnu17 to gnu23: https://gcc.gnu.org/gcc-15/changes.html#c
|
||||
#
|
||||
# Ruby < 3.2 can't compile on GCC v15 in the default mode of gnu23.
|
||||
#
|
||||
# TODO: Consider changing this to check for GCC v15 specifically
|
||||
# rather than inspecting the OS itself.
|
||||
|
||||
if [ -n "$cc_override" ]; then
|
||||
export CC="$cc_override"
|
||||
fi
|
||||
if [ -n "$extra_cflags" ]; then
|
||||
# Use the cflags configure variable, which Ruby's configure appends to
|
||||
# its default optflags/debugflags/warnflags, unlike CFLAGS which would
|
||||
# override them and notably lose the -O3, producing a -O0 Ruby.
|
||||
export cflags="-std=gnu17 $cflags"
|
||||
export cflags="$extra_cflags${cflags:+ $cflags}"
|
||||
fi
|
||||
if [ "$package_var_name" = "RUBY" ] && is_mac && ! is_mac 2700; then
|
||||
# The macOS 27 SDK declares dup3() and pipe2() as available since macOS 27.0.
|
||||
|
|
@ -1297,6 +1318,10 @@ build_package_openssl() {
|
|||
# Disable SSLv2 and Kerberos on older OpenSSL
|
||||
[[ "$1" != openssl-1.0.* ]] || package_option openssl configure no-ssl2 no-krb5
|
||||
|
||||
# OpenSSL 1.0 can't be built in parallel, as two `ar` runs may create libcrypto.a at once and drop each other's objects.
|
||||
# OPENSSL_MAKE_OPTS goes after MAKE_OPTS on the make command line, and a user's OPENSSL_MAKE_OPTS still goes after this.
|
||||
[[ "$1" != openssl-1.0.* ]] || local OPENSSL_MAKE_OPTS="-j 1${OPENSSL_MAKE_OPTS:+ $OPENSSL_MAKE_OPTS}"
|
||||
|
||||
# Skip building OpenSSL docs, which is slow.
|
||||
local make_target="install_sw install_ssldirs"
|
||||
[[ "$1" != openssl-1.0.* ]] || make_target="install_sw" # OpenSSL 1.0 does not have `install_ssldirs`
|
||||
|
|
|
|||
|
|
@ -36,11 +36,20 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
major_version=$(echo ${version} | cut -d '.' -f 1)
|
||||
IFS=.- read -r major_version minor_version patch_version _prerelease <<< "$version"
|
||||
openssl_upper_bound="3.x.x"
|
||||
# These releases include Ruby/OpenSSL 3.2.4, 3.3.3, and 4.0.2, respectively.
|
||||
if (( (major_version == 3 && minor_version == 3 && patch_version >= 12) ||
|
||||
(major_version == 3 && minor_version == 4 && patch_version >= 10) ||
|
||||
(major_version == 4 && (minor_version >= 1 || patch_version >= 6)) ||
|
||||
major_version > 4 )); then
|
||||
openssl_upper_bound="4.x.x"
|
||||
fi
|
||||
|
||||
if [ "$major_version" -ge 4 ]; then
|
||||
needs_openssl="needs_openssl:1.1.1-3.x.x"
|
||||
needs_openssl="needs_openssl:1.1.1-${openssl_upper_bound}"
|
||||
else
|
||||
needs_openssl="needs_openssl:1.0.2-3.x.x"
|
||||
needs_openssl="needs_openssl:1.0.2-${openssl_upper_bound}"
|
||||
fi
|
||||
|
||||
cat > "$file" <<EOS
|
||||
|
|
|
|||
4
share/man/man1/ruby-build.1
generated
4
share/man/man1/ruby-build.1
generated
|
|
@ -4,10 +4,10 @@
|
|||
.\" Generator: Asciidoctor 2.0.26
|
||||
.\" Date: 2026-05-07
|
||||
.\" Manual: ruby-build Manual
|
||||
.\" Source: ruby-build 20260924
|
||||
.\" Source: ruby-build 20261023
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "RUBY\-BUILD" "1" "2026-05-07" "ruby\-build 20260924" "ruby\-build Manual"
|
||||
.TH "RUBY\-BUILD" "1" "2026-05-07" "ruby\-build 20261023" "ruby\-build Manual"
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.ss \n[.ss] 0
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.0.2-3.x.x
|
||||
install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_git "ruby-3.3-dev" "https://github.com/ruby/ruby.git" "ruby_3_3" autoconf enable_shared standard_install_with_bundled_gems
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.21" "https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz#617e29af8e421f46649484a4937e48c685e47f46488167c982f88bc4ec1d522f" openssl --if needs_openssl:1.0.2-3.x.x
|
||||
install_package "openssl-3.0.21" "https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz#617e29af8e421f46649484a4937e48c685e47f46488167c982f88bc4ec1d522f" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_package "ruby-3.3.12" "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.12.tar.gz#b06d63beae271933033e27f0a389bc582a009e7845357d44365c39de525a051b" enable_shared standard
|
||||
|
|
|
|||
2
share/ruby-build/3.3.13
Normal file
2
share/ruby-build/3.3.13
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_package "ruby-3.3.13" "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.13.tar.gz#4cae72e971bd1cdb20ca87d299111182417c5276c162de8ead0ab0531426cd61" enable_shared standard
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.0.2-3.x.x
|
||||
install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_git "ruby-3.4-dev" "https://github.com/ruby/ruby.git" "ruby_3_4" autoconf enable_shared standard_install_with_bundled_gems
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.21" "https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz#617e29af8e421f46649484a4937e48c685e47f46488167c982f88bc4ec1d522f" openssl --if needs_openssl:1.0.2-3.x.x
|
||||
install_package "openssl-3.0.21" "https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz#617e29af8e421f46649484a4937e48c685e47f46488167c982f88bc4ec1d522f" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_package "ruby-3.4.10" "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.10.tar.gz#ecee2d072a14f2d14347dd56dfd8fe5c3130abf5117bfaacbda0f4ef9cc429ec" enable_shared standard
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.0.2-3.x.x
|
||||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_package "ruby-3.4.11" "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.11.tar.gz#5c22be44524312b3d433d68739bcc530633b1da5ef8ba0afa0a37680da17d3de" enable_shared standard
|
||||
|
|
|
|||
2
share/ruby-build/3.4.12
Normal file
2
share/ruby-build/3.4.12
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.0.2-4.x.x
|
||||
install_package "ruby-3.4.12" "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.12.tar.gz#5e5d85ad93b0adcccbad47733680f4892bd0078e3342437f7babce01c1872479" enable_shared standard
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.1.1-3.x.x
|
||||
install_package "openssl-3.0.18" "https://github.com/openssl/openssl/releases/download/openssl-3.0.18/openssl-3.0.18.tar.gz#d80c34f5cf902dccf1f1b5df5ebb86d0392e37049e5d73df1b3abae72e4ffe8b" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_git "ruby-4.0-dev" "https://github.com/ruby/ruby.git" "ruby_4_0" autoconf enable_shared standard_install_with_bundled_gems
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.21" "https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz#617e29af8e421f46649484a4937e48c685e47f46488167c982f88bc4ec1d522f" openssl --if needs_openssl:1.1.1-3.x.x
|
||||
install_package "openssl-3.0.21" "https://github.com/openssl/openssl/releases/download/openssl-3.0.21/openssl-3.0.21.tar.gz#617e29af8e421f46649484a4937e48c685e47f46488167c982f88bc4ec1d522f" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_package "ruby-4.0.6" "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.6.tar.gz#837d299e8f7ddf2be31a229a7a7e019d354979825117989acb3b32b1a9be262a" enable_shared standard
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.1.1-3.x.x
|
||||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_package "ruby-4.0.7" "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.7.tar.gz#911ace20f90d068ca0e4dda6d0e4f0f81e52e52f2dd4f4004c721e253412e82d" enable_shared standard
|
||||
|
|
|
|||
2
share/ruby-build/4.0.8
Normal file
2
share/ruby-build/4.0.8
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_package "ruby-4.0.8" "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.8.tar.gz#0968e2ac4cbd6f1fd85d3092aed66cd3c2d8ba4a5e2493d6e6c6cb0c431897d2" enable_shared standard
|
||||
2
share/ruby-build/4.0.9
Normal file
2
share/ruby-build/4.0.9
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_package "ruby-4.0.9" "https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.9.tar.gz#c35350682ff050b79702d57ade4516e7336063f510155d19fb2fb5b3f3909511" enable_shared standard
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
install_package "openssl-3.5.4" "https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz#967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99" openssl --if needs_openssl:1.1.1-3.x.x
|
||||
install_package "openssl-3.5.4" "https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz#967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_git "ruby-master" "https://github.com/ruby/ruby.git" "master" autoconf enable_shared standard_install_with_bundled_gems
|
||||
|
|
|
|||
2
share/ruby-build/4.1.0-preview1
Normal file
2
share/ruby-build/4.1.0-preview1
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
install_package "openssl-3.0.22" "https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz#67ebca7e50d17383028045486653492195b83db95f8558709701bb47b5c1ef81" openssl --if needs_openssl:1.1.1-4.x.x
|
||||
install_package "ruby-4.1.0-preview1" "https://cache.ruby-lang.org/pub/ruby/4.1/ruby-4.1.0-preview1.tar.gz#fb530bb88e90de3ae91c1310a27ae090e6bd989b8726de50ef12a890a85b88ef" enable_shared standard
|
||||
|
|
@ -1 +1 @@
|
|||
install_package "jruby-1.7.10" "https://s3.amazonaws.com/jruby.org/downloads/1.7.10/jruby-bin-1.7.10.tar.gz#223285ee2fca5a4825f017b8a441232ec05d3fba5de213336c7ef6b6a36de651" warn_eol jruby
|
||||
install_package "jruby-1.7.10" "https://repo1.maven.org/maven2/org/jruby/jruby-dist/1.7.10/jruby-dist-1.7.10-bin.tar.gz#223285ee2fca5a4825f017b8a441232ec05d3fba5de213336c7ef6b6a36de651" warn_eol jruby
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
install_package "jruby-1.7.11" "https://s3.amazonaws.com/jruby.org/downloads/1.7.11/jruby-bin-1.7.11.tar.gz#d634ffc692a8ee5bae513266956609d41d785f912facf11749609a7763120fb3" warn_eol jruby
|
||||
install_package "jruby-1.7.11" "https://repo1.maven.org/maven2/org/jruby/jruby-dist/1.7.11/jruby-dist-1.7.11-bin.tar.gz#d634ffc692a8ee5bae513266956609d41d785f912facf11749609a7763120fb3" warn_eol jruby
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
install_package "jruby-1.7.12" "https://s3.amazonaws.com/jruby.org/downloads/1.7.12/jruby-bin-1.7.12.tar.gz#2c15858dbc06d6346a30704fb6dcc779f2e67053566c9c21973f96e309eac609" warn_eol jruby
|
||||
install_package "jruby-1.7.12" "https://repo1.maven.org/maven2/org/jruby/jruby-dist/1.7.12/jruby-dist-1.7.12-bin.tar.gz#2c15858dbc06d6346a30704fb6dcc779f2e67053566c9c21973f96e309eac609" warn_eol jruby
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue