Created attachment 242325 [details] Patch to fix qt5-webkit build with Ruby 3.x www/qt5-webkit fails to build with Ruby 3.2.2 for me (and almost certainly others), since one of its files uses deprecated Ruby syntax. Searching on the error led me to https://www.linuxquestions.org/questions/slackware-14/regression-on-current-with-qt5-webkit-4175720296/ and applying that patch locally fixes the build. Here is the build error: FAILED: DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h /usr/ports/www/qt5-webkit/work/.build/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h cd /usr/ports/www/qt5-webkit/work/.build/Source/JavaScriptCore && /usr/local/bin/ruby /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb -I/usr/ports/www/qt5-webkit/work/.build/DerivedSources/JavaScriptCore/ /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/llint/LowLevelInterpreter.asm /usr/ports/www/qt5-webkit/work/.build/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:587:in `block in parseSequence': undefined method `=~' for #<Annotation:0x0000000806bf2468 @codeOrigin=#<CodeOrigin:0x0000000806bf2530 @sourceFile=#<SourceFile:0x0000000806c1fb70 @name=#<Pathname:/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm>, @fileNumber=3>, @lineNumber=511>, @type=:local, @string="Check if there are some unaligned slots we can use"> (NoMethodError) from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:654:in `block in parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:814:in `parseData' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:818:in `parse' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:780:in `block in parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:625:in `block in parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `loop' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:586:in `parseSequence' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:814:in `parseData' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/parser.rb:818:in `parse' from /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha4/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb:68:in `<main>' Using the attached patch as www/qt5-webkit/files/patch-Source_JavaScriptCore_offlineasm_parser.rb allows the port to build successfully
Worked for me. Thank you! Question: will unconditionally applying this patch break the build for the current default case of Ruby 3.1?
qt5-webkit is going away (as it is unmaintained) at the end of the calendar year; I'd prefer not to land changes in it with potential impact in languages I don't speak, just ahead of getting rid of it entirely. Any consumers of qt5-webkit should be looking at porting to something else, rather than worrying about Ruby 3.2 compatibility of a deprecated web browser.
Moin moin I think rather than patching support in for a modern ruby version, the port should just use an older ruby :) -- it is a build-only dependency after all. That way the port can be built even on systems with a more current DEFAULT_VERSION of ruby. Please give the attached patch a go. https://people.freebsd.org/~tcberner/patches/0001-www-qt5-webkit-force-ruby-3.1.patch mfg Tobias
Closing this as www/qt5-webengine has been since removed from the ports tree. [1] [1] https://cgit.freebsd.org/ports/commit/?id=cb3615b528c288d90aff6aa0e7a9778f80c9e85d
I meant www/qt5-webkit has been removed, not webengine.