Download raw body.
qtwebkit: Allow building with current Ruby
On Wed, Nov 13, 2024 at 7:01 PM George Koehler <kernigh@gmail.com> wrote: > > On Sat, Oct 5, 2024 at 10:03 AM Jeremy Evans <jeremy@openbsd.org> wrote: > > > > > This allows building qtwebkit the current default ports version of > > > Ruby. This is a necessary step to remove Ruby 3.1. > > > > > > No RDEP on ruby means this is only a build system change, not a > > > package change, so no bump is needed. > > Cc rsadowski, who is maintainer of x11/qt5/*. > > jeremy's parser.rb patch works for me. I looked at webkit in > https://repology.org/ and noticed that some Linux distros use a patch > from upstream webkit (https://commits.webkit.org/219400@main). I > swapped in that patch, which also works for me. With either patch, I > can package qtwebkit-5.212.0alpha4p13v0 on my amd64 with Ruby 3.3 and > without Ruby 3.1. > > The problem is a change to operator =~ in Ruby 3.2. If @tokens[@idx] > was in the wrong class, then "@tokens[@idx] =~ final" was false in 3.1 > but raised an error in 3.2. jeremy's patch fixes it by defining > Object#=~ to be false. Upstream's patch is less complete; it moves up > 1 of 3 checks for "@tokens[@idx].is_a? Annotation", fixing only 1 of 3 > "=~"s. The other 2 "=~"s might still raise an error, but they didn't > break my build. > > jeremy's patch also redefines String#=~ in a way that would break the > match variables like $& and $1, but didn't break my qtwebkit build. > If we pick jeremy's patch and it builds without the String#=~ part, > ok gkoehler@ > > If we pick upstream's patch, ok gkoehler@ > Thank you very much for testing. I'll commit upstream's patch. No point in deviating unnecessarily from upstream. I'll see if I can do it via a distpatch instead of a local patch. Thanks, Jeremy
qtwebkit: Allow building with current Ruby