Fix build with Ruby 3.2
This commit is contained in:
parent
7b4338a87a
commit
7e8299c50f
82
backport-Fix-build-with-Ruby-3.2.patch
Normal file
82
backport-Fix-build-with-Ruby-3.2.patch
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
From b7ac5d0ccc7ca3ed6bf4f2d40fde60247ce87d3c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
Date: Mon, 12 Dec 2022 21:24:11 -0800
|
||||||
|
Subject: [PATCH] Fix build with Ruby 3.2
|
||||||
|
https://bugs.webkit.org/show_bug.cgi?id=246743
|
||||||
|
|
||||||
|
Reviewed by Ross Kirsling.
|
||||||
|
|
||||||
|
File.exists has been declared deprecated since Ruby 2.1 (2013) and with Ruby 3.2 gets removed for good.
|
||||||
|
|
||||||
|
* Source/JavaScriptCore/offlineasm/config.rb:
|
||||||
|
* Source/JavaScriptCore/offlineasm/parser.rb:
|
||||||
|
* Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb:
|
||||||
|
|
||||||
|
Canonical link: https://commits.webkit.org/257775@main
|
||||||
|
---
|
||||||
|
Source/JavaScriptCore/offlineasm/config.rb | 4 ++--
|
||||||
|
Source/JavaScriptCore/offlineasm/parser.rb | 8 ++++----
|
||||||
|
.../Scripts/update-LegacyInspectorBackendCommands.rb | 2 +-
|
||||||
|
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Source/JavaScriptCore/offlineasm/config.rb b/Source/JavaScriptCore/offlineasm/config.rb
|
||||||
|
index ba0043119f32c..7811626db5e5b 100644
|
||||||
|
--- a/Source/JavaScriptCore/offlineasm/config.rb
|
||||||
|
+++ b/Source/JavaScriptCore/offlineasm/config.rb
|
||||||
|
@@ -23,11 +23,11 @@
|
||||||
|
|
||||||
|
buildProductsDirectory = ENV['BUILT_PRODUCTS_DIR'];
|
||||||
|
headersFolderPath = ENV['WK_LIBRARY_HEADERS_FOLDER_PATH'];
|
||||||
|
-if buildProductsDirectory and File.exists?(buildProductsDirectory)
|
||||||
|
+if buildProductsDirectory and File.exist?(buildProductsDirectory)
|
||||||
|
$: << "#{buildProductsDirectory}#{headersFolderPath}/WebKitAdditions/Scripts"
|
||||||
|
end
|
||||||
|
sdkRootDirectory = ENV['SDKROOT'];
|
||||||
|
-if sdkRootDirectory and File.exists?(sdkRootDirectory)
|
||||||
|
+if sdkRootDirectory and File.exist?(sdkRootDirectory)
|
||||||
|
$: << "#{sdkRootDirectory}#{headersFolderPath}/WebKitAdditions/Scripts"
|
||||||
|
end
|
||||||
|
|
||||||
|
diff --git a/Source/JavaScriptCore/offlineasm/parser.rb b/Source/JavaScriptCore/offlineasm/parser.rb
|
||||||
|
index 12a22b5cc819e..07e38b63972be 100644
|
||||||
|
--- a/Source/JavaScriptCore/offlineasm/parser.rb
|
||||||
|
+++ b/Source/JavaScriptCore/offlineasm/parser.rb
|
||||||
|
@@ -840,10 +840,10 @@ def parseSequence(final, comment)
|
||||||
|
additionsDirectoryName = "#{@buildProductsDirectory}#{@headersFolderPath}/WebKitAdditions/"
|
||||||
|
end
|
||||||
|
fileName = IncludeFile.new(moduleName, additionsDirectoryName).fileName
|
||||||
|
- if not File.exists?(fileName)
|
||||||
|
+ if not File.exist?(fileName)
|
||||||
|
fileName = IncludeFile.new(moduleName, @tokens[@idx].codeOrigin.fileName.dirname).fileName
|
||||||
|
end
|
||||||
|
- fileExists = File.exists?(fileName)
|
||||||
|
+ fileExists = File.exist?(fileName)
|
||||||
|
raise "File not found: #{fileName}" if not fileExists and not isOptional
|
||||||
|
list << parse(fileName, @options, @sources) if fileExists
|
||||||
|
else
|
||||||
|
@@ -876,10 +876,10 @@ def parseIncludes(final, comment, options)
|
||||||
|
additionsDirectoryName = "#{@buildProductsDirectory}#{@headersFolderPath}/WebKitAdditions/"
|
||||||
|
end
|
||||||
|
fileName = IncludeFile.new(moduleName, additionsDirectoryName).fileName
|
||||||
|
- if not File.exists?(fileName)
|
||||||
|
+ if not File.exist?(fileName)
|
||||||
|
fileName = IncludeFile.new(moduleName, @tokens[@idx].codeOrigin.fileName.dirname).fileName
|
||||||
|
end
|
||||||
|
- fileExists = File.exists?(fileName)
|
||||||
|
+ fileExists = File.exist?(fileName)
|
||||||
|
raise "File not found: #{fileName}" if not fileExists and not isOptional
|
||||||
|
if fileExists
|
||||||
|
parser = Parser.new(readTextFile(fileName), SourceFile.new(fileName), options)
|
||||||
|
diff --git a/Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb b/Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb
|
||||||
|
index 680dee7406d1e..40737afaa4c51 100755
|
||||||
|
--- a/Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb
|
||||||
|
+++ b/Source/WebInspectorUI/Scripts/update-LegacyInspectorBackendCommands.rb
|
||||||
|
@@ -36,7 +36,7 @@ def run
|
||||||
|
end
|
||||||
|
|
||||||
|
generated_path = File.join tmpdir, output_filename
|
||||||
|
- if !File.exists?(generated_path)
|
||||||
|
+ if !File.exist?(generated_path)
|
||||||
|
puts "ERROR: Generated file does not exist at expected path."
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
Name: webkit2gtk3
|
Name: webkit2gtk3
|
||||||
Version: 2.38.2
|
Version: 2.38.2
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: GTK web content engine library
|
Summary: GTK web content engine library
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
URL: https://www.webkitgtk.org/
|
URL: https://www.webkitgtk.org/
|
||||||
@ -31,6 +31,7 @@ Patch0002: webkitgtk-2.32.1-sw.patch
|
|||||||
Patch6000: backport-CVE-2023-28204.patch
|
Patch6000: backport-CVE-2023-28204.patch
|
||||||
Patch6001: backport-CVE-2023-32373.patch
|
Patch6001: backport-CVE-2023-32373.patch
|
||||||
Patch6002: backport-CVE-2023-32409.patch
|
Patch6002: backport-CVE-2023-32409.patch
|
||||||
|
Patch6003: backport-Fix-build-with-Ruby-3.2.patch
|
||||||
|
|
||||||
#Dependency
|
#Dependency
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
@ -567,6 +568,9 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 08 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.38.2-5
|
||||||
|
- Fix build with Ruby 3.2
|
||||||
|
|
||||||
* Mon May 29 2023 zhangpan <zhangpan103@h-partners.com> - 2.38.2-4
|
* Mon May 29 2023 zhangpan <zhangpan103@h-partners.com> - 2.38.2-4
|
||||||
- fix CVE-2023-28204 CVE-2023-32373 CVE-2023-32409
|
- fix CVE-2023-28204 CVE-2023-32373 CVE-2023-32409
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user