File webkit2gtk3-old-cmake.patch of Package webkit2gtk3.21618

diff -urp webkitgtk-2.34.0.orig/CMakeLists.txt webkitgtk-2.34.0/CMakeLists.txt
--- webkitgtk-2.34.0.orig/CMakeLists.txt	2021-09-01 04:16:33.000000000 -0500
+++ webkitgtk-2.34.0/CMakeLists.txt	2021-10-01 10:01:47.823146694 -0500
@@ -6,11 +6,7 @@
 # latter in particular handles loading a bunch of shared CMake definitions
 # and loading the cross-compilation settings from CMAKE_TOOLCHAIN_FILE.
 #
-# cmake_minimum_required is also set inside Source/${FRAMEWORK}/CMakeLists.txt
-# in support of the AppleWin internal build so this version should be kept in
-# sync across those files.
-#
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.10)
 project(WebKit)
 
 # -----------------------------------------------------------------------------
diff -urp webkitgtk-2.34.0.orig/Source/cmake/OptionsJSCOnly.cmake webkitgtk-2.34.0/Source/cmake/OptionsJSCOnly.cmake
--- webkitgtk-2.34.0.orig/Source/cmake/OptionsJSCOnly.cmake	2021-09-01 04:16:51.000000000 -0500
+++ webkitgtk-2.34.0/Source/cmake/OptionsJSCOnly.cmake	2021-10-01 10:02:41.227429710 -0500
@@ -3,6 +3,15 @@ find_package(Threads REQUIRED)
 if (MSVC)
     include(OptionsMSVC)
 else ()
+    # CMake uses OBJECT libraries as a cross platform way of doing --whole-archive which is needed
+    # when compiling bmalloc/WTF into JavaScriptCore. However they were extremely limited prior to
+    # CMake 3.12 <https://gitlab.kitware.com/cmake/cmake/-/issues/18010>
+    #
+    # FIXME: Remove when cmake_minimum_required is raised https://bugs.webkit.org/show_bug.cgi?id=221727
+    if (CMAKE_VERSION VERSION_LESS 3.12)
+        message(FATAL_ERROR "CMake 3.12 or greater is required to compile JSCOnly")
+    endif ()
+
     set(CMAKE_C_VISIBILITY_PRESET hidden)
     set(CMAKE_CXX_VISIBILITY_PRESET hidden)
     set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
diff -urp webkitgtk-2.34.0.orig/Source/cmake/WebKitCommon.cmake webkitgtk-2.34.0/Source/cmake/WebKitCommon.cmake
--- webkitgtk-2.34.0.orig/Source/cmake/WebKitCommon.cmake	2021-09-17 04:07:45.000000000 -0500
+++ webkitgtk-2.34.0/Source/cmake/WebKitCommon.cmake	2021-10-01 10:29:58.352107670 -0500
@@ -177,10 +177,8 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     find_package(Perl 5.10.0 REQUIRED)
     find_package(PerlModules COMPONENTS JSON::PP REQUIRED)
 
-    # This module looks preferably for version 3 of Python. If not found, version 2 is searched.
-    find_package(Python COMPONENTS Interpreter REQUIRED)
-    # Set the variable with uppercase name to keep compatibility with code and users expecting it.
-    set(PYTHON_EXECUTABLE ${Python_EXECUTABLE} CACHE FILEPATH "Path to the Python interpreter")
+    set(Python_ADDITIONAL_VERSIONS 3)
+    find_package(PythonInterp 2.7.0 REQUIRED)
 
     # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
     # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
diff -urp webkitgtk-2.34.0.orig/Source/JavaScriptCore/CMakeLists.txt webkitgtk-2.34.0/Source/JavaScriptCore/CMakeLists.txt
--- webkitgtk-2.34.0.orig/Source/JavaScriptCore/CMakeLists.txt	2021-09-01 04:16:46.000000000 -0500
+++ webkitgtk-2.34.0/Source/JavaScriptCore/CMakeLists.txt	2021-10-01 10:01:54.619182711 -0500
@@ -1,8 +1,6 @@
-cmake_minimum_required(VERSION 3.12)
-
+cmake_minimum_required(VERSION 3.10)
 include(WebKitCommon)
 include(target/TargetWTF)
-
 set_property(DIRECTORY . PROPERTY FOLDER "JavaScriptCore")
 
 list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
diff -urp webkitgtk-2.34.0.orig/Source/WebCore/CMakeLists.txt webkitgtk-2.34.0/Source/WebCore/CMakeLists.txt
--- webkitgtk-2.34.0.orig/Source/WebCore/CMakeLists.txt	2021-09-01 04:16:49.000000000 -0500
+++ webkitgtk-2.34.0/Source/WebCore/CMakeLists.txt	2021-10-01 10:02:10.203265292 -0500
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.10)
 
 include(WebKitCommon)
 include(target/TargetWTF)
diff -urp webkitgtk-2.34.0.orig/Source/WTF/CMakeLists.txt webkitgtk-2.34.0/Source/WTF/CMakeLists.txt
--- webkitgtk-2.34.0.orig/Source/WTF/CMakeLists.txt	2021-09-01 04:16:49.000000000 -0500
+++ webkitgtk-2.34.0/Source/WTF/CMakeLists.txt	2021-10-01 10:02:02.203222904 -0500
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.10)
 include(WebKitCommon)
 set_property(DIRECTORY . PROPERTY FOLDER "WTF")
 
openSUSE Build Service is sponsored by