On 08/27 08:16, Stuart Henderson wrote:
> On 2021/08/27 15:30, Jeremy Evans wrote:
> > This updates mruby to 3.0.0.  Release notes available at:
> > 
> > https://u22788749.ct.sendgrid.net/ls/click?upn=yGPgKxLt0dQzFpcLvHl2PKt5t-2BXSL6jBeJFtWa8J6ek1Fkq4F7CLpJlx9PNUIUDAY4EV1DGrT6gryw339cicnQ2JYOiclBVEPMpFqHvt1WDBJEchEbPiyB5bUlBCSgza20Cgyp4MFH4fIVqtSEIxRQpcudsRU8AdToaPQ5kcikc-2Fx8AV6q-2FVFkzd1FPt640I1jj-2FAT7q-2BnJ5ZDomfO82BjzlELrshqntJDxb-2B2C16V8vFrL1jAaaIjKNuZIyFkBt4fejNaJon7B-2FafNaRpjwzK7q3DFSB5dc8kD5LwMMcqI7mgVwq0Wz02LEyJuqSNpXhq135PnLGViOATpG0koBF8kuT6G6gCGfdsNzmPd7Bs4deW5N9gq1eLERNIg-2BHzfxEbV91LApOhkB2yy5HJlmExtLdVU19Q745a9A5AHn0stQdj6TM9RijdfI4ltct-2FPHJ3dVJM0QnCzH4md49xM1YoeqD6voM4o2xf6SdFgJFPocPIEpmEZI0IIovUFAB1MCDvgaZqR1KG1UdqA-2FP3lCBKIE6eANT9fLya9IOrEdizc-3D3Vrg_7a8z5HXKglTa4iEppNBl7pmmyiLmNe-2BkBcvOJjbwgwQYaM-2FF409Z5JsGwn-2FV3RSMwvAwM3l64RnOkMfPlrf9RHVE7X13ddR9bPASGCK5BSPDMHh9ViO33cxfWkl3yTqLr-2FfGwZzU0ld1Y8x6nCgpaMea2ubh3TO2dy7-2B741O6w5u3DPHGN2h9Yj3O8tgACHCxnfZf0tT4vRps4uUvaq1qQ-3D-3D
> > 
> > Tested on amd64.  I'd like to commit it when I commit the default
> > Ruby version change to 3.0.
> > 
> > There is a comment about keeping the version in sync with www/h2o,
> > but otto@ (h2o maintainer) doesn't know why, and fcambus@ (who added the
> > comment) hasn't responded yet.  mruby is embedded, not linked, so I'm
> > not sure why the mruby version should need to be in sync.
> 
> www/h2o,mruby build fails if the newer version is present at build time.

I tested building www/h2o,mruby with mruby-3.0.0 installed, and it
worked correctly.  mruby does not expose a shared library (as it is
designed for embedding), and h2o embeds it's own copy of mruby, so
there should be no need for the versions to be in sync.

However, it looks like a build fix is needed for www/h2o,mruby if
the default Ruby version in ports is 3.0.0 (see below).  No bump as
this is only a build issue and should not affect runtime.  OKs to
commit this build fix? It should work fine even if the default Ruby
version is 2.7, it doesn't have to wait until the default version is
switched to 3.0.

Thanks,
Jeremy

Index: patches/patch-deps_mruby_Rakefile
===================================================================
RCS file: patches/patch-deps_mruby_Rakefile
diff -N patches/patch-deps_mruby_Rakefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-deps_mruby_Rakefile   27 Aug 2021 19:38:12 -0000
@@ -0,0 +1,68 @@
+$OpenBSD$
+
+Fix build with Ruby 3.0.
+
+Index: deps/mruby/Rakefile
+--- deps/mruby/Rakefile.orig
++++ deps/mruby/Rakefile
+@@ -37,15 +37,15 @@ load "#{MRUBY_ROOT}/tasks/gitlab.rake"
+ task :default => :all
+ 
+ bin_path = ENV['INSTALL_DIR'] || "#{MRUBY_ROOT}/bin"
+-FileUtils.mkdir_p bin_path, { :verbose => $verbose }
++FileUtils.mkdir_p bin_path, :verbose => $verbose
+ 
+ depfiles = MRuby.targets['host'].bins.map do |bin|
+   install_path = MRuby.targets['host'].exefile("#{bin_path}/#{bin}")
+   source_path = 
MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/#{bin}")
+ 
+   file install_path => source_path do |t|
+-    FileUtils.rm_f t.name, { :verbose => $verbose }
+-    FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose }
++    FileUtils.rm_f t.name, :verbose => $verbose
++    FileUtils.cp t.prerequisites.first, t.name, :verbose => $verbose
+   end
+ 
+   install_path
+@@ -78,8 +78,8 @@ MRuby.each_target do |target|
+         install_path = MRuby.targets['host'].exefile("#{bin_path}/#{bin}")
+ 
+         file install_path => exec do |t|
+-          FileUtils.rm_f t.name, { :verbose => $verbose }
+-          FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose }
++          FileUtils.rm_f t.name, :verbose => $verbose
++          FileUtils.cp t.prerequisites.first, t.name, :verbose => $verbose
+         end
+         depfiles += [ install_path ]
+       elsif target == MRuby.targets['host-debug']
+@@ -87,8 +87,8 @@ MRuby.each_target do |target|
+           install_path = 
MRuby.targets['host-debug'].exefile("#{bin_path}/#{bin}")
+ 
+           file install_path => exec do |t|
+-            FileUtils.rm_f t.name, { :verbose => $verbose }
+-            FileUtils.cp t.prerequisites.first, t.name, { :verbose => 
$verbose }
++            FileUtils.rm_f t.name, :verbose => $verbose
++            FileUtils.cp t.prerequisites.first, t.name, :verbose => $verbose
+           end
+           depfiles += [ install_path ]
+         end
+@@ -127,16 +127,16 @@ end
+ desc "clean all built and in-repo installed artifacts"
+ task :clean do
+   MRuby.each_target do |t|
+-    FileUtils.rm_rf t.build_dir, { :verbose => $verbose }
++    FileUtils.rm_rf t.build_dir, :verbose => $verbose
+   end
+-  FileUtils.rm_f depfiles, { :verbose => $verbose }
++  FileUtils.rm_f depfiles, :verbose => $verbose
+   puts "Cleaned up target build folder"
+ end
+ 
+ desc "clean everything!"
+ task :deep_clean => ["clean"] do
+   MRuby.each_target do |t|
+-    FileUtils.rm_rf t.gem_clone_dir, { :verbose => $verbose }
++    FileUtils.rm_rf t.gem_clone_dir, :verbose => $verbose
+   end
+   puts "Cleaned up mrbgems build folder"
+ end

Reply via email to