Skip to content

Commit f7a161a

Browse files
committed
Add PicoRuby 3.4.2 with new build function for r2p2
This commit adds PicoRuby 3.4.2 and introduces a new build function to accommodate changes in the build artifacts. Version numbering context: PicoRuby's version numbers are aligned with mruby's VM code specification compatibility. Version 3.4 indicates compatibility with mruby 3.4 VM code format, or RITE0300. Version 3.4.2 indicates minor bug fix in PicoRuby. Build artifact changes: Starting from version 3.4.2, PicoRuby has replaced the irb executable with r2p2 (POSIX version of PicoRuby shell system including IRB). The new build produces three executables: - picoruby: main Ruby interpreter - picorbc: Ruby bytecode compiler - r2p2: interactive REPL (replaces picoirb) Implementation: - Added build_package_picoruby_r2p2() function for version 3.4.2+ - Existing build_package_picoruby() remains for version 3.0.0 - The new function creates only the 'ruby' symlink, omitting 'irb' - Added picoruby-3.4.2 definition file The split in build functions allows proper support for both the legacy 3.0.0 release with irb and newer releases with r2p2.
1 parent d099da0 commit f7a161a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

bin/ruby-build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,13 @@ build_package_picoruby() {
888888
ln -fs picoirb "$PREFIX_PATH/bin/irb"
889889
}
890890

891+
build_package_picoruby_r2p2() {
892+
capture_command ./minirake
893+
mkdir -p "$PREFIX_PATH"
894+
cp -fR build/host/* include "$PREFIX_PATH"
895+
ln -fs picoruby "$PREFIX_PATH/bin/ruby"
896+
}
897+
891898
build_package_jruby() {
892899
build_package_copy
893900
# shellcheck disable=SC2164

share/ruby-build/picoruby-3.4.2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
install_package "picoruby-3.4.2" "https://github.com/picoruby/picoruby/releases/download/3.4.2/picoruby-3.4.2.tar.gz#75a7dded2b2dff443a80e3bb8075ccf2fe7b77282f8a8a69689fc700b51d61f3" picoruby_r2p2

0 commit comments

Comments
 (0)