ruby33: update to 3.3.11

See:
https://www.ruby-lang.org/en/news/2026/03/26/ruby-3-3-11-released/

Also includes a few Portfile cleanups from v4.0.1, fixing a bug in
the +jemalloc variant.

Also disables the unnecessary compiler wrapper.

TESTED:
Built successfully on OSX 10.4-10.6 i386, 10.5-12.x x86_64, and
11.x-26.x arm64.  Included all variants compatible with available
dependencies on the respective platforms.
This commit is contained in:
Fred Wright
2026-03-26 11:29:50 -07:00
committed by Renee Otten
parent ce865bd703
commit d57a6e62ac
2 changed files with 59 additions and 39 deletions
+41 -21
View File
@@ -16,7 +16,7 @@ legacysupport.newest_darwin_requires_legacy 14
# This property should be preserved.
set ruby_ver 3.3
set ruby_patch 10
set ruby_patch 11
set ruby_ver_nodot [string map {. {}} ${ruby_ver}]
name ruby${ruby_ver_nodot}
version ${ruby_ver}.${ruby_patch}
@@ -41,9 +41,9 @@ master_sites ruby:${ruby_ver}
distname ruby-${version}
dist_subdir ruby${ruby_ver_nodot}
checksums rmd160 63dd14b6ea0c92f49e8b02b7330303b7abcd5d53 \
sha256 b555baa467a306cfc8e6c6ed24d0d27b27e9a1bed1d91d95509859eac6b0e928 \
size 22233705
checksums rmd160 39baeb72a0e981d372e490efc2e92446ea9b1a71 \
sha256 59f0fafb1a59a05dc3765117af3fa68e153eb48254708549f321c1e9e078d7a0 \
size 21483089
# Universal builds don't currently work, including via the approach used
# in ruby30.
@@ -68,22 +68,20 @@ select.file ${filespath}/ruby${ruby_ver_nodot}
# patch-sources.diff: fixes for various issues.
#
# This diff is from v3_3_10 vs. macports-3_3_10.
# This diff is from v3_3_11 vs. macports-3_3_11.
patchfiles-append patch-sources.diff
# note: compiler_blacklist_versions was obsoleted at July, 2025.
#-------------------------------------------------------------------------------
# Fix compilation on buildbots for 10.12 and earlier.
# Fix compilation on 10.12.
# Issue: 62183: error: use of undeclared identifier 'fmt'; did you mean 'fma'?
#
# This issue only appears in Xcode clang 9 (clang 900), not MacPorts clang 9
# (clang 901), so the blacklisting can be narrow.
#-------------------------------------------------------------------------------
compiler.blacklist-append \
{ clang >= 900 < 901 }
compiler.blacklist-append { clang >= 900 < 901 }
# Ruby3.3 no longer builds with Xcode clang 425 on 10.7
# Ruby3.2+ doesn't build with Xcode clang 425 on 10.7
compiler.blacklist-append { clang < 500 }
# Ensure that the correct dsymutil is used.
@@ -108,6 +106,11 @@ if {[string match *clang* ${configure.compiler}] \
configure.cxxflags-append -std=c++03
}
# The openssl PG brings in the unnecessary compiler_wrapper PG.
# Disable it to reduce logfile clutter and obfuscation.
#
compwrap.compilers_to_wrap
configure.args --enable-shared \
--enable-install-static-library \
--disable-install-doc \
@@ -116,21 +119,18 @@ configure.args --enable-shared \
--disable-yjit \
--disable-rjit \
--without-gmp \
--without-jemalloc \
--enable-mkmf-verbose \
--with-opt-dir="${prefix}" \
--program-suffix=${ruby_ver} \
--with-rubyhdrdir=${prefix}/include/ruby-${version} \
--with-rubylibprefix="${prefix}/lib/ruby${ruby_ver}" \
--with-openssl-dir=[openssl::install_area] \
--without-baseruby
--without-baseruby \
--with-arch="${build_arch}"
# prefer Apple cctools to GNU binutils, build with binutils may fail.
configure.args-append AR=${prefix}/bin/ar RANLIB=${prefix}/bin/ranlib
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} != ""} {
configure.args-append "--with-arch=${build_arch}"
}
post-destroot {
foreach type {site vendor} {
set libdir ${destroot}${prefix}/lib/ruby${ruby_ver}/${type}_ruby/${version}
@@ -140,7 +140,7 @@ post-destroot {
}
}
# install destination of commands from port:rb32*
# install destination of commands from port:ruby33
xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby${ruby_ver}
destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby${ruby_ver}
}
@@ -184,20 +184,40 @@ variant relative description "Enable relative loading of libraries to allow for
# legacy systems support
platform darwin {
if {${os.major} < 11} {
depends_build-append port:gmake
build.cmd ${prefix}/bin/gmake
configure.args-append --disable-dtrace
if {${os.major} < 10} {
# Disable broken compiler
compiler.blacklist-append macports-gcc-15
# libdtrace lacks a 64-bit slice
if { [string match *64 ${build_arch}] } {
configure.args-append --disable-dtrace
}
}
if {${os.major} == 8} {
configure.cppflags-append -DCPU_SUBTYPE_MASK=0xff000000
depends_build-append port:gmake
build.cmd ${prefix}/bin/gmake
compiler.blacklist-append macports-clang-*
}
}
# Tests don't fully pass on any platform, though the details are platform-
# dependent. We allow them for investigative purposes, along with a warning
# and a workaround for a pair of Makefile bugs that conspire to cause a
# permissions failure in the initial test setup.
test.run yes
test.target check
pre-test {
ui_warn "Tests are not expected to fully pass."
# Remove a file erroneously owned by root and superfluously rebuilt.
# One of the following two names is used, depending on the platform.
file delete ${worksrcpath}/${build_arch}-${os.platform}${os.major}-fake.rb
file delete ${worksrcpath}/${build_arch}-${os.platform}${os.major}.0-fake.rb
}
livecheck.type regex
livecheck.url https://cache.ruby-lang.org/pub/ruby/${ruby_ver}/
livecheck.regex ruby-(3\\.3\\.\\d+)[quotemeta ${extract.suffix}]
+18 -18
View File
@@ -1,5 +1,5 @@
--- .gdbinit.orig 2025-10-23 03:00:15.000000000 -0700
+++ .gdbinit 2025-10-23 10:31:29.000000000 -0700
--- .gdbinit.orig 2026-03-25 17:05:04.000000000 -0700
+++ .gdbinit 2026-03-26 11:33:51.000000000 -0700
@@ -1,4 +1,5 @@
-set startup-with-shell off
+# Move this to end, so failure on older gdbs doesn't blow the rest
@@ -14,8 +14,8 @@
+
+# Moved from beginning, since it fails on older gdbs
+set startup-with-shell off
--- ext/digest/md5/md5cc.h.orig 2025-10-23 03:00:15.000000000 -0700
+++ ext/digest/md5/md5cc.h 2025-10-23 10:31:29.000000000 -0700
--- ext/digest/md5/md5cc.h.orig 2026-03-25 17:05:04.000000000 -0700
+++ ext/digest/md5/md5cc.h 2026-03-26 11:33:51.000000000 -0700
@@ -17,3 +17,11 @@ static DEFINE_FINISH_FUNC_FROM_FINAL(MD5
#undef MD5_Finish
#define MD5_Update rb_digest_MD5_update
@@ -28,8 +28,8 @@
+ */
+#undef MD5_Init
+#define MD5_Init CC_MD5_Init
--- ext/digest/sha1/sha1cc.h.orig 2025-10-23 03:00:15.000000000 -0700
+++ ext/digest/sha1/sha1cc.h 2025-10-23 10:31:29.000000000 -0700
--- ext/digest/sha1/sha1cc.h.orig 2026-03-25 17:05:04.000000000 -0700
+++ ext/digest/sha1/sha1cc.h 2026-03-26 11:33:51.000000000 -0700
@@ -12,3 +12,11 @@ static DEFINE_FINISH_FUNC_FROM_FINAL(SHA
#undef SHA1_Finish
#define SHA1_Update rb_digest_SHA1_update
@@ -42,8 +42,8 @@
+ */
+#undef SHA1_Init
+#define SHA1_Init CC_SHA1_Init
--- ext/digest/sha2/sha2cc.h.orig 2025-10-23 03:00:15.000000000 -0700
+++ ext/digest/sha2/sha2cc.h 2025-10-23 10:31:29.000000000 -0700
--- ext/digest/sha2/sha2cc.h.orig 2026-03-25 17:05:04.000000000 -0700
+++ ext/digest/sha2/sha2cc.h 2026-03-26 11:33:51.000000000 -0700
@@ -1,6 +1,33 @@
#define COMMON_DIGEST_FOR_OPENSSL 1
#include <CommonCrypto/CommonDigest.h>
@@ -94,8 +94,8 @@
+#define SHA384_Init CC_SHA384_Init
+#undef SHA512_Init
+#define SHA512_Init CC_SHA512_Init
--- file.c.orig 2025-10-23 03:00:15.000000000 -0700
+++ file.c 2025-10-23 10:31:29.000000000 -0700
--- file.c.orig 2026-03-25 17:05:04.000000000 -0700
+++ file.c 2026-03-26 11:33:51.000000000 -0700
@@ -299,10 +299,30 @@ rb_CFString_class_initialize_before_fork
long len = sizeof(small_str) - 1;
@@ -147,8 +147,8 @@
CFMutableStringRef m = CFStringCreateMutableCopy(kCFAllocatorDefault, len, s);
long oldlen = RSTRING_LEN(str);
--- lib/bundler/gem_helper.rb.orig 2025-10-23 03:00:15.000000000 -0700
+++ lib/bundler/gem_helper.rb 2025-10-23 10:31:29.000000000 -0700
--- lib/bundler/gem_helper.rb.orig 2026-03-25 17:05:04.000000000 -0700
+++ lib/bundler/gem_helper.rb 2026-03-26 11:33:51.000000000 -0700
@@ -231,7 +231,7 @@ module Bundler
end
@@ -158,8 +158,8 @@
end
end
end
--- signal.c.orig 2025-10-23 03:00:15.000000000 -0700
+++ signal.c 2025-10-23 10:31:29.000000000 -0700
--- signal.c.orig 2026-03-25 17:05:04.000000000 -0700
+++ signal.c 2026-03-26 11:33:51.000000000 -0700
@@ -804,7 +804,8 @@ check_stack_overflow(int sig, const uint
const greg_t bp = mctx->gregs[REG_EBP];
# endif
@@ -170,8 +170,8 @@
# define MCTX_SS_REG(reg) __ss.__##reg
# else
# define MCTX_SS_REG(reg) ss.reg
--- thread_pthread.c.orig 2025-10-23 03:00:15.000000000 -0700
+++ thread_pthread.c 2025-10-23 10:31:29.000000000 -0700
--- thread_pthread.c.orig 2026-03-25 17:05:04.000000000 -0700
+++ thread_pthread.c 2026-03-26 11:33:51.000000000 -0700
@@ -42,6 +42,22 @@
#if defined __APPLE__
@@ -195,8 +195,8 @@
#endif
#if defined(HAVE_SYS_EVENTFD_H) && defined(HAVE_EVENTFD)
--- vm_dump.c.orig 2025-10-23 03:00:15.000000000 -0700
+++ vm_dump.c 2025-10-23 10:31:29.000000000 -0700
--- vm_dump.c.orig 2026-03-25 17:05:04.000000000 -0700
+++ vm_dump.c 2026-03-26 11:33:51.000000000 -0700
@@ -490,7 +490,8 @@ rb_vmdebug_thread_dump_state(FILE *errou
}