From fbd0b5a186b1538aa12e97e43000fffba9925609 Mon Sep 17 00:00:00 2001 From: jeremy Date: Tue, 20 Jan 2026 06:51:00 +0000 Subject: [PATCH] Add patches missed in mruby 3.4.0 update From Miguel Landaeta --- .../patches/patch-lib_mruby_build_command_rb | 12 ++++++++++++ .../patch-mrbgems_mruby-bin-mirb_mrbgem_rake | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 lang/mruby/patches/patch-lib_mruby_build_command_rb create mode 100644 lang/mruby/patches/patch-mrbgems_mruby-bin-mirb_mrbgem_rake diff --git a/lang/mruby/patches/patch-lib_mruby_build_command_rb b/lang/mruby/patches/patch-lib_mruby_build_command_rb new file mode 100644 index 00000000000..a22b1e14cde --- /dev/null +++ b/lang/mruby/patches/patch-lib_mruby_build_command_rb @@ -0,0 +1,12 @@ +Index: lib/mruby/build/command.rb +--- lib/mruby/build/command.rb.orig ++++ lib/mruby/build/command.rb +@@ -249,7 +249,7 @@ module MRuby + + def initialize(build) + super +- @command = "ruby #{MRUBY_ROOT}/tools/lrama/exe/lrama" ++ @command = "${RUBY} #{MRUBY_ROOT}/tools/lrama/exe/lrama" + @compile_options = %q[-o "%{outfile}" "%{infile}"] + end + diff --git a/lang/mruby/patches/patch-mrbgems_mruby-bin-mirb_mrbgem_rake b/lang/mruby/patches/patch-mrbgems_mruby-bin-mirb_mrbgem_rake new file mode 100644 index 00000000000..afe799c49cc --- /dev/null +++ b/lang/mruby/patches/patch-mrbgems_mruby-bin-mirb_mrbgem_rake @@ -0,0 +1,17 @@ +Do not link against libtinfo, which is not used on OpenBSD. + +Not sent upstream, as mirb build configuration changes in mruby 3.5.0 +make this unnecessary. + +Index: mrbgems/mruby-bin-mirb/mrbgem.rake +--- mrbgems/mruby-bin-mirb/mrbgem.rake.orig ++++ mrbgems/mruby-bin-mirb/mrbgem.rake +@@ -32,7 +32,7 @@ MRuby::Gem::Specification.new('mruby-bin-mirb') do |sp + spec.linker.library_paths << lib_path if lib_path + elsif spec.build.cc.search_header_path 'curses.h' + spec.linker.libraries << 'ncurses' +- if spec.build.cc.search_header_path 'term.h' ++ if spec.build.cc.search_header_path 'term.h' && !MRUBY_BUILD_HOST_IS_OPENBSD + spec.linker.libraries << 'tinfo' + end + elsif spec.build.cc.search_header_path 'ncursesw/curses.h'