Thursday, May 07, 2026

Update: lang/jruby 10.1.0.0

This updates to the latest release of JRuby, 10.1.0.0. Release announcement at https://www.jruby.org/2026/04/21/jruby-10-1-0-0.html This is a significant release, changing the Ruby version from 3.4 to 4.0. This makes the following port changes: * Update jffi version from 1.3.10 to 1.3.15 * Update jruby-launcher version from 1.1.19 to 2.0.2 This disables AppCDS usage unless the user has configured a JRUBY_JSA environment variable, as the default location is not writable and results in a warning. This ships more of the jruby bin files. There were some hidden files needed to avoid warnings, as well as some new programs that should be added. These go in /usr/local/jruby/bin, which is not in PATH, so conflicts aren't an issue. The changes in jruby-launcher now require shipping jruby.sh again, so this makes that change. One issue with this version is it ships a version of minitest that doesn't work, as the version it ships depends on a prism library that it doesn't ship. This should be fixed in the next version, but in the meantime, comment out a couple minitest files in the PLIST. Users can use the following to install a usable minitest version: # jruby -S gem install minitest --version '<6' Tested on amd64, the only supported arch. I plan to commit in a couple days unless I hear objections. Best, Jeremy Index: Makefile =================================================================== RCS file: /cvs/ports/lang/jruby/Makefile,v diff -u -p -r1.130 Makefile --- Makefile 7 Mar 2026 02:49:44 -0000 1.130 +++ Makefile 8 May 2026 00:06:06 -0000 @@ -3,11 +3,11 @@ ONLY_FOR_ARCHS = amd64 COMMENT = pure-Java implementation of the Ruby language -V = 10.0.4.0 +V = 10.1.0.0 DISTNAME = jruby-dist-${V}-bin PKGNAME = jruby-${V} CATEGORIES = lang lang/ruby -DISTFILES.jffi =jffi-1.3.10.tar.gz +DISTFILES.jffi =jffi-1.3.15.tar.gz DISTFILES.gem = ${JRUBY_LAUNCHER_GEM} HOMEPAGE = http://www.jruby.org/ @@ -42,8 +42,8 @@ WRKDIST = ${WRKDIR}/jruby-${V} JFFI_HOME = ${WRKDIST}/jffi JFFI_ARCH = ${MACHINE_ARCH:S/amd64/x86_64/}-OpenBSD FFI_ARCH = ${JFFI_ARCH:L} -JRUBY_LAUNCHER_GEM = jruby-launcher-1.1.19-java.gem -JRUBY_RUBY_VERSION = 3.1 +JRUBY_LAUNCHER_GEM = jruby-launcher-2.0.2-java.gem +JRUBY_RUBY_VERSION = 4.0 SUBST_VARS = JRUBY_HOME JFFI_ARCH FFI_ARCH RAKE_V RDOC_V JAVA_HOME MODJAVA_BUILD_DIR = ${JFFI_HOME} @@ -58,7 +58,7 @@ post-extract: do-configure: ${SUBST_CMD} ${WRKSRC}/jruby-launcher/jrubyexe.cpp \ - ${WRKSRC}/jruby-launcher/unixlauncher.cpp + ${WRKSRC}/jruby-launcher/unixlauncher.c cd ${WRKSRC}/jruby-launcher/ && ${SETENV} ${MAKE_ENV} \ ../bin/jruby extconf.rb perl -pi -e '$$. == 1 && s|^.*env j?ruby.*$$|\#!${LOCALBASE}/bin/jruby|;' \ @@ -80,8 +80,9 @@ do-install: ln -s ${TRUEPREFIX}/jruby/bin/jruby ${PREFIX}/bin/jruby ${INSTALL_DATA_DIR} ${JRUBY_HOME} ${INSTALL_DATA_DIR} ${JRUBY_HOME}/bin - for file in ast bundle bundler erb irb gem jgem jirb jirb_swing jrubyc racc rake rdoc ri; \ - do ${INSTALL_SCRIPT} ${WRKBUILD}/bin/$$file ${JRUBY_HOME}/bin/$$file; \ + cd ${WRKBUILD}/bin/ && for file in .* ast bundle bundler erb irb gem jgem jirb jirb_swing \ + jruby.sh jrubyc lock_jars racc rake rdoc ri syntax_suggest test-unit; \ + do ${INSTALL_SCRIPT} $$file ${JRUBY_HOME}/bin/$$file; \ done ${INSTALL_PROGRAM} ${WRKBUILD}/bin/jruby ${JRUBY_HOME}/bin/jruby # not a shell script; used in #! lines ${INSTALL_DATA_DIR} ${JRUBY_HOME}/lib @@ -96,7 +97,6 @@ do-install: rm -f ${PREFIX}/jruby/lib/jruby-java*.jsa # tied to exact jdk build; may need jruby.sh to use? # JRuby doesn't ship tests in the binary distribution -# Try running the database/ruby-sequel,jruby tests after an update NO_TEST = Yes .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/lang/jruby/distinfo,v diff -u -p -r1.89 distinfo --- distinfo 7 Mar 2026 02:49:44 -0000 1.89 +++ distinfo 8 May 2026 00:06:06 -0000 @@ -1,6 +1,6 @@ -SHA256 (jffi-1.3.10.tar.gz) = QZWOTjjcxTOTidj4/JjERqcokJJ5SOiQualLs/ivHsw= -SHA256 (jruby-dist-10.0.4.0-bin.tar.gz) = 0CYOvHU6Xprkm+HuwOTuyQeq8rcYT6qvyHmw7DJTyiQ= -SHA256 (jruby-launcher-1.1.19-java.gem) = LPGrpNcsdLNq7MSjCxiSXh4h+vcPVuC0ykUyUYquGJo= -SIZE (jffi-1.3.10.tar.gz) = 3304571 -SIZE (jruby-dist-10.0.4.0-bin.tar.gz) = 35992123 -SIZE (jruby-launcher-1.1.19-java.gem) = 64000 +SHA256 (jffi-1.3.15.tar.gz) = L53N7ekYdGxXhLpVyZIhTjDq9isjrSYJVhcwZEkXoYk= +SHA256 (jruby-dist-10.1.0.0-bin.tar.gz) = nBSgzoHzoxL9mMQVmGmCEy6R02sSy410o9/a6T/phKw= +SHA256 (jruby-launcher-2.0.2-java.gem) = ihfw3lp6/Yay9PeKRjPlPRsBfRnSWZ7wp5WAQUqMtXw= +SIZE (jffi-1.3.15.tar.gz) = 3032180 +SIZE (jruby-dist-10.1.0.0-bin.tar.gz) = 40774952 +SIZE (jruby-launcher-2.0.2-java.gem) = 71680 Index: patches/patch-bin_jruby_sh =================================================================== RCS file: patches/patch-bin_jruby_sh diff -N patches/patch-bin_jruby_sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-bin_jruby_sh 8 May 2026 00:06:06 -0000 @@ -0,0 +1,18 @@ +Avoid the following warning on every startup: + +Warning: AppCDS archive directory is not writable, disabling AppCDS operations + +Users can set the JRUBY_JSA environment variable to a writeable file; doing so +improves performance significantly. + +Index: bin/jruby.sh +--- bin/jruby.sh.orig ++++ bin/jruby.sh +@@ -875,6 +875,7 @@ if [ -n "${JRUBY_JSA-}" ]; then + else + # Default JVM Class Data Sharing Archive (jsa) file for JVMs that support it + jruby_jsa_file="$JRUBY_HOME/lib/jruby-java$java_runtime_version.jsa" ++ use_jsa_file=false + fi + readonly jruby_jsa_file + Index: patches/patch-jffi_build_xml =================================================================== RCS file: /cvs/ports/lang/jruby/patches/patch-jffi_build_xml,v diff -u -p -r1.6 patch-jffi_build_xml --- patches/patch-jffi_build_xml 23 Dec 2022 16:44:53 -0000 1.6 +++ patches/patch-jffi_build_xml 8 May 2026 00:06:06 -0000 @@ -3,7 +3,7 @@ Work with Java 10+. Index: jffi/build.xml --- jffi/build.xml.orig +++ jffi/build.xml -@@ -151,8 +151,9 @@ +@@ -162,8 +162,9 @@ <target name="-do-compile" depends="-init"> <mkdir dir="${build.classes.dir}"/> @@ -14,7 +14,7 @@ Index: jffi/build.xml </target> <target name="-compile-java" depends="-do-compile"/> -@@ -320,27 +321,10 @@ +@@ -331,27 +332,10 @@ <target name="-generate-version" depends="-init,-init-vars,-generate-version-source"> Index: patches/patch-jruby-launcher_jrubyexe_cpp =================================================================== RCS file: /cvs/ports/lang/jruby/patches/patch-jruby-launcher_jrubyexe_cpp,v diff -u -p -r1.2 patch-jruby-launcher_jrubyexe_cpp --- patches/patch-jruby-launcher_jrubyexe_cpp 11 Mar 2022 19:29:04 -0000 1.2 +++ patches/patch-jruby-launcher_jrubyexe_cpp 8 May 2026 00:06:06 -0000 @@ -1,16 +1,17 @@ Hardcode executable path so that the symlink in the standard PATH works correctly. ---- jruby-launcher/jrubyexe.cpp.orig Fri Dec 2 09:34:43 2011 -+++ jruby-launcher/jrubyexe.cpp Fri Dec 2 09:35:02 2011 +Index: jruby-launcher/jrubyexe.cpp +--- jruby-launcher/jrubyexe.cpp.orig ++++ jruby-launcher/jrubyexe.cpp @@ -57,8 +57,10 @@ const char *CON_ATTACH_MSG = - - #include "utilsfuncs.h" + #include "unixlauncher.h" +

No comments:

Post a Comment