diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-01-05 19:36:06 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2023-01-07 15:59:12 +0100 |
commit | 88c8564eb58d28768165fde0d6ab9e88b42ddc8f (patch) | |
tree | 785e5876af9074778344bf2d4875ef0b9a5c7e49 /recipes-qt | |
parent | b119822b56f88fd50b97ce128cde217a74f85971 (diff) |
qtwebkit: Fix build with ruby 3.2+
Ruby 3.2 removes Object#=~ completely
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt')
-rw-r--r-- | recipes-qt/qt5/qtwebkit/0001-Offlineasm-warnings-with-newer-Ruby-versions-https-b.patch | 47 | ||||
-rw-r--r-- | recipes-qt/qt5/qtwebkit_git.bb | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebkit/0001-Offlineasm-warnings-with-newer-Ruby-versions-https-b.patch b/recipes-qt/qt5/qtwebkit/0001-Offlineasm-warnings-with-newer-Ruby-versions-https-b.patch new file mode 100644 index 00000000..cbe72874 --- /dev/null +++ b/recipes-qt/qt5/qtwebkit/0001-Offlineasm-warnings-with-newer-Ruby-versions-https-b.patch @@ -0,0 +1,47 @@ +From 330bdeeaa4389225c27d27188499543ddd184f69 Mon Sep 17 00:00:00 2001 +From: Adrian Perez de Castro <aperez@igalia.com> +Date: Wed, 15 Jan 2020 22:15:38 +0000 +Subject: [PATCH] Offlineasm warnings with newer Ruby versions + https://bugs.webkit.org/show_bug.cgi?id=206233 + +Reviewed by Yusuke Suzuki. + +Avoid a warning about using Object#=~ on Annotation instances, which +has been deprecated in Ruby 2.7. + +* offlineasm/parser.rb: Swap checks to prevent applying the =~ operator +to Annotation instances, which do not define it. + +Canonical link: https://commits.webkit.org/219400@main +git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254637 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Source/JavaScriptCore/offlineasm/parser.rb | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Source/JavaScriptCore/offlineasm/parser.rb b/Source/JavaScriptCore/offlineasm/parser.rb +index b44511245..cd1cffaec 100644 +--- a/Source/JavaScriptCore/offlineasm/parser.rb ++++ b/Source/JavaScriptCore/offlineasm/parser.rb +@@ -584,9 +584,7 @@ class Parser + firstCodeOrigin = @tokens[@idx].codeOrigin + list = [] + loop { +- if (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final) +- break +- elsif @tokens[@idx].is_a? Annotation ++ if @tokens[@idx].is_a? Annotation + # This is the only place where we can encounter a global + # annotation, and hence need to be able to distinguish between + # them. +@@ -600,6 +598,8 @@ class Parser + list << Instruction.new(codeOrigin, annotationOpcode, [], @tokens[@idx].string) + @annotation = nil + @idx += 2 # Consume the newline as well. ++ elsif (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final) ++ break + elsif @tokens[@idx] == "\n" + # ignore + @idx += 1 +-- +2.39.0 + diff --git a/recipes-qt/qt5/qtwebkit_git.bb b/recipes-qt/qt5/qtwebkit_git.bb index ee69a6a2..95dd010c 100644 --- a/recipes-qt/qt5/qtwebkit_git.bb +++ b/recipes-qt/qt5/qtwebkit_git.bb @@ -24,6 +24,7 @@ SRC_URI += "\ file://0008-Fix-build-with-icu-68.patch \ file://0009-Riscv-Add-support-for-riscv.patch \ file://mips-atomic.patch \ + file://0001-Offlineasm-warnings-with-newer-Ruby-versions-https-b.patch \ " SRC_URI:append:riscv32 = " file://0010-webdriver-libatomic.patch " |