Here is a patch to make some existing Ruby ports with native extensions build or avoid warnings on Ruby 3.2. After committing this, I plan to start building ruby32 FLAVORs for ruby gems with native extensions by default.
Here are the ports affected: * databases/ruby-tiny_tds (new version:2.1.5+patch) * devel/ruby-prof (new version:1.4.5) * sysutils/ruby-shadow (distpatches) * www/ruby-passenger (patch) * x11/ruby-tk (distpatch) Additionally, this switches ruby-tk to use Tk 8.6 and use MODTK_WANTLIB. I think that part was from stu@ a while back. I plan to commit this in a couple days unless I hear objections. Thanks, Jeremy Index: databases/ruby-tiny_tds/Makefile =================================================================== RCS file: /cvs/ports/databases/ruby-tiny_tds/Makefile,v retrieving revision 1.21 diff -u -p -r1.21 Makefile --- databases/ruby-tiny_tds/Makefile 11 Mar 2022 18:31:46 -0000 1.21 +++ databases/ruby-tiny_tds/Makefile 6 Jan 2023 00:33:46 -0000 @@ -1,6 +1,6 @@ COMMENT = simple and fast ruby binding to FreeTDS -DISTNAME = tiny_tds-2.1.4 +DISTNAME = tiny_tds-2.1.5 CATEGORIES = databases HOMEPAGE = https://github.com/rails-sqlserver/tiny_tds Index: databases/ruby-tiny_tds/distinfo =================================================================== RCS file: /cvs/ports/databases/ruby-tiny_tds/distinfo,v retrieving revision 1.10 diff -u -p -r1.10 distinfo --- databases/ruby-tiny_tds/distinfo 21 May 2021 22:27:05 -0000 1.10 +++ databases/ruby-tiny_tds/distinfo 6 Jan 2023 00:33:50 -0000 @@ -1,2 +1,2 @@ -SHA256 (tiny_tds-2.1.4.gem) = xniC7Qs5QWi1gvk8e8RtmekzyGAH84OkBqyEksS/hzs= -SIZE (tiny_tds-2.1.4.gem) = 62464 +SHA256 (tiny_tds-2.1.5.gem) = yYtl9VoRW+q7rkFhei8UYiaCNaKGCN3Agzb/wm8vyhk= +SIZE (tiny_tds-2.1.5.gem) = 62976 Index: databases/ruby-tiny_tds/patches/patch-ext_tiny_tds_result_c =================================================================== RCS file: databases/ruby-tiny_tds/patches/patch-ext_tiny_tds_result_c diff -N databases/ruby-tiny_tds/patches/patch-ext_tiny_tds_result_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ databases/ruby-tiny_tds/patches/patch-ext_tiny_tds_result_c 6 Jan 2023 00:31:42 -0000 @@ -0,0 +1,13 @@ +Avoid warning on Ruby 3.2+. + +Index: ext/tiny_tds/result.c +--- ext/tiny_tds/result.c.orig ++++ ext/tiny_tds/result.c +@@ -582,6 +582,7 @@ void init_tinytds_result() { + cDate = rb_const_get(rb_cObject, rb_intern("Date")); + /* Define TinyTds::Result */ + cTinyTdsResult = rb_define_class_under(mTinyTds, "Result", rb_cObject); ++ rb_undef_alloc_func(cTinyTdsResult); + /* Define TinyTds::Result Public Methods */ + rb_define_method(cTinyTdsResult, "fields", rb_tinytds_result_fields, 0); + rb_define_method(cTinyTdsResult, "each", rb_tinytds_result_each, -1); Index: devel/ruby-prof/Makefile =================================================================== RCS file: /cvs/ports/devel/ruby-prof/Makefile,v retrieving revision 1.18 diff -u -p -r1.18 Makefile --- devel/ruby-prof/Makefile 11 Mar 2022 18:53:17 -0000 1.18 +++ devel/ruby-prof/Makefile 5 Jan 2023 23:10:51 -0000 @@ -1,7 +1,7 @@ COMMENT = fast code profiler for Ruby DISTNAME = ruby-${PKGNAME} -PKGNAME = prof-1.0.0 +PKGNAME = prof-1.4.5 CATEGORIES = devel HOMEPAGE = https://github.com/ruby-prof/ruby-prof Index: devel/ruby-prof/distinfo =================================================================== RCS file: /cvs/ports/devel/ruby-prof/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- devel/ruby-prof/distinfo 12 Nov 2019 06:42:43 -0000 1.5 +++ devel/ruby-prof/distinfo 5 Jan 2023 23:10:56 -0000 @@ -1,2 +1,2 @@ -SHA256 (ruby-prof-1.0.0.gem) = qFhb5wR3VaQOebJVTggqPhX6IS/XcuOAQBoZ0seugyk= -SIZE (ruby-prof-1.0.0.gem) = 79872 +SHA256 (ruby-prof-1.4.5.gem) = njFkxu8KnDAcn+OeHU6K4jY849mhdxTGNyXdUP8awSY= +SIZE (ruby-prof-1.4.5.gem) = 90624 Index: devel/ruby-prof/pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/ruby-prof/pkg/PLIST,v retrieving revision 1.6 diff -u -p -r1.6 PLIST --- devel/ruby-prof/pkg/PLIST 11 Mar 2022 18:53:17 -0000 1.6 +++ devel/ruby-prof/pkg/PLIST 5 Jan 2023 23:23:34 -0000 @@ -4,7 +4,7 @@ ${GEM_LIB}/cache/${DISTNAME}.gem ${GEM_LIB}/gems/${DISTNAME}/ ${GEM_LIB}/gems/${DISTNAME}/CHANGES ${GEM_LIB}/gems/${DISTNAME}/LICENSE -${GEM_LIB}/gems/${DISTNAME}/README.rdoc +${GEM_LIB}/gems/${DISTNAME}/README.md ${GEM_LIB}/gems/${DISTNAME}/Rakefile ${GEM_LIB}/gems/${DISTNAME}/bin/ ${GEM_LIB}/gems/${DISTNAME}/bin/ruby-prof @@ -13,12 +13,11 @@ ${GEM_LIB}/gems/${DISTNAME}/lib/ ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/ ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof.rb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/assets/ -${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/assets/call_stack_printer.css.html -${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/assets/call_stack_printer.js.html +${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/assets/call_stack_printer.html.erb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/assets/call_stack_printer.png ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/assets/graph_printer.html.erb -${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/call_info.rb -${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/call_info_visitor.rb +${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/call_tree.rb +${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/call_tree_visitor.rb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/compatibility.rb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/exclude_common_methods.rb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/measurement.rb @@ -38,40 +37,45 @@ ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-pro ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/task.rb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/thread.rb ${GEM_LIB}/gems/${DISTNAME}/lib/ruby-prof/version.rb -${GEM_LIB}/gems/${DISTNAME}/lib/ruby_prof.so +@so ${GEM_LIB}/gems/${DISTNAME}/lib/ruby_prof.so ${GEM_LIB}/gems/${DISTNAME}/lib/unprof.rb ${GEM_LIB}/gems/${DISTNAME}/ruby-prof.gemspec ${GEM_LIB}/gems/${DISTNAME}/test/ ${GEM_LIB}/gems/${DISTNAME}/test/abstract_printer_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/alias_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/basic_test.rb -${GEM_LIB}/gems/${DISTNAME}/test/call_info_visitor_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/call_tree_visitor_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/call_trees_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/duplicate_names_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/dynamic_method_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/enumerable_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/exceptions_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/exclude_methods_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/exclude_threads_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/fiber_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/gc_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/inverse_call_tree_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/line_number_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/marshal_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/measure_allocations.rb ${GEM_LIB}/gems/${DISTNAME}/test/measure_allocations_test.rb -${GEM_LIB}/gems/${DISTNAME}/test/measure_allocations_trace_test.rb -${GEM_LIB}/gems/${DISTNAME}/test/measure_memory_trace_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/measure_memory_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/measure_process_time_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/measure_times.rb ${GEM_LIB}/gems/${DISTNAME}/test/measure_wall_time_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/multi_printer_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/no_method_class_test.rb -${GEM_LIB}/gems/${DISTNAME}/test/parser_timings.rb ${GEM_LIB}/gems/${DISTNAME}/test/pause_resume_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/prime.rb +${GEM_LIB}/gems/${DISTNAME}/test/prime_script.rb +${GEM_LIB}/gems/${DISTNAME}/test/printer_call_stack_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/printer_call_tree_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/printer_flat_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/printer_graph_html_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/printer_graph_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/printers_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/printing_recursive_graph_test.rb +${GEM_LIB}/gems/${DISTNAME}/test/profile_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/rack_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/recursive_test.rb ${GEM_LIB}/gems/${DISTNAME}/test/singleton_test.rb Index: sysutils/ruby-shadow/Makefile =================================================================== RCS file: /cvs/ports/sysutils/ruby-shadow/Makefile,v retrieving revision 1.19 diff -u -p -r1.19 Makefile --- sysutils/ruby-shadow/Makefile 11 Mar 2022 19:57:59 -0000 1.19 +++ sysutils/ruby-shadow/Makefile 5 Jan 2023 23:01:17 -0000 @@ -2,8 +2,13 @@ COMMENT = module to access shadow passw DISTNAME = ruby-shadow-2.5.0 PKGNAME = ${DISTNAME:S/ruby-//} -REVISION = 4 +REVISION = 5 CATEGORIES = sysutils + +MASTER_SITES0= https://github.com/apalmblad/ruby-shadow/commit/ +PATCHFILES= ruby-shadow-taint-fix{70330521b99e84c8f7445c213dfde0768f45a690}.patch:0 \ + ruby-shadow-config-fix{eab4aba3f5e06ea8f124d3e5ff6b3fa88c4807cd}.patch:0 +PATCH_DIST_STRIP= -p1 # PD PERMIT_PACKAGE = Yes Index: sysutils/ruby-shadow/distinfo =================================================================== RCS file: /cvs/ports/sysutils/ruby-shadow/distinfo,v retrieving revision 1.7 diff -u -p -r1.7 distinfo --- sysutils/ruby-shadow/distinfo 9 Oct 2015 07:06:35 -0000 1.7 +++ sysutils/ruby-shadow/distinfo 5 Jan 2023 23:01:28 -0000 @@ -1,2 +1,6 @@ SHA256 (ruby-shadow-2.5.0.gem) = xegv77AxaRl6ZT/+rlM/gemUYtE7kO5+V4Yoei4hlKE= +SHA256 (ruby-shadow-config-fix.patch) = MID93EFejdutWfQmqT7GPi1dnklzZzD80kHAmSUASSI= +SHA256 (ruby-shadow-taint-fix.patch) = HlgmbzgSN4/lwxOuLs0dPYxPxLjOwZl3EEBwRXyUBio= SIZE (ruby-shadow-2.5.0.gem) = 11264 +SIZE (ruby-shadow-config-fix.patch) = 1151 +SIZE (ruby-shadow-taint-fix.patch) = 2265 Index: www/ruby-passenger/Makefile =================================================================== RCS file: /cvs/ports/www/ruby-passenger/Makefile,v retrieving revision 1.68 diff -u -p -r1.68 Makefile --- www/ruby-passenger/Makefile 11 Mar 2022 20:10:55 -0000 1.68 +++ www/ruby-passenger/Makefile 6 Jan 2023 00:45:54 -0000 @@ -5,6 +5,7 @@ BROKEN-hppa = rake fails when linking P PASS_VERSION = 6.0.4 NGINX_VERSION = 1.16.1 DISTNAME = passenger-${PASS_VERSION} +REVISION = 0 ONLY_FOR_ARCHS = aarch64 amd64 arm i386 Index: www/ruby-passenger/patches/patch-src_ruby_supportlib_phusion_passenger_platform_info_operating_system_rb =================================================================== RCS file: www/ruby-passenger/patches/patch-src_ruby_supportlib_phusion_passenger_platform_info_operating_system_rb diff -N www/ruby-passenger/patches/patch-src_ruby_supportlib_phusion_passenger_platform_info_operating_system_rb --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/ruby-passenger/patches/patch-src_ruby_supportlib_phusion_passenger_platform_info_operating_system_rb 5 Jan 2023 23:06:27 -0000 @@ -0,0 +1,14 @@ +Remove use of File.exists?, removed in Ruby 3.2 + +Index: src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +--- src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb.orig ++++ src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +@@ -236,7 +236,7 @@ module PhusionPassenger + memoize :supports_lfence_instruction?, true + + def self.requires_no_tls_direct_seg_refs? +- return File.exists?("/proc/xen/capabilities") && cpu_architectures[0] == "x86" ++ return File.exist?("/proc/xen/capabilities") && cpu_architectures[0] == "x86" + end + memoize :requires_no_tls_direct_seg_refs?, true + end Index: x11/ruby-tk/Makefile =================================================================== RCS file: /cvs/ports/x11/ruby-tk/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- x11/ruby-tk/Makefile 11 Mar 2022 20:17:18 -0000 1.8 +++ x11/ruby-tk/Makefile 6 Jan 2023 00:42:44 -0000 @@ -1,16 +1,22 @@ -COMMENT= ruby graphical tooklit using Tk +COMMENT= Ruby interface to the Tk graphical toolkit DISTNAME= tk-0.4.0 CATEGORIES= x11 +REVISION= 0 HOMEPAGE= https://github.com/ruby/tk MAINTAINER= Jeremy Evans <jer...@openbsd.org> +MASTER_SITES0= https://github.com/ruby/tk/commit/ +PATCHFILES= ruby-tk-undef-fix{bf02b2aaa1e4d7688b84ea771a56d9d53e63015c}.patch:0 +PATCH_DIST_STRIP= -p1 + # MIT PERMIT_PACKAGE= Yes MODULES= lang/ruby x11/tk +MODTK_VERSION= 8.6 CONFIGURE_STYLE= ruby gem ext @@ -21,7 +27,7 @@ CONFIGURE_ARGS = --with-tcl-include=${MO --with-tcllib=${MODTCL_LIB} \ --with-tklib=${MODTK_LIB} \ --with-X11-dir=${X11BASE} -WANTLIB = X11 ${MODTCL_LIB} ${MODTK_LIB} +WANTLIB = X11 ${MODTK_WANTLIB} LIB_DEPENDS = ${MODTK_LIB_DEPENDS} .include <bsd.port.mk> Index: x11/ruby-tk/distinfo =================================================================== RCS file: /cvs/ports/x11/ruby-tk/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- x11/ruby-tk/distinfo 26 May 2021 20:35:49 -0000 1.3 +++ x11/ruby-tk/distinfo 6 Jan 2023 00:07:24 -0000 @@ -1,2 +1,4 @@ +SHA256 (ruby-tk-undef-fix.patch) = 3sW75HfWh66KtK5/WCIHrcY4K74zKFwlwtTj2+XO1ZA= SHA256 (tk-0.4.0.gem) = ar/8VrYKR+g6+acG0b9doQzmmOgSGfgdq24tTYZtt6o= +SIZE (ruby-tk-undef-fix.patch) = 919 SIZE (tk-0.4.0.gem) = 1721856