Index: Source/cmake/WebKitCommon.cmake
--- Source/cmake/WebKitCommon.cmake.orig
+++ Source/cmake/WebKitCommon.cmake
@@ -133,6 +133,8 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
         set(WTF_CPU_RISCV64 1)
     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^loongarch64")
         set(WTF_CPU_LOONGARCH64 1)
+    elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sparc64")
+        set(WTF_CPU_SPARC64 1)
     else ()
         set(WTF_CPU_UNKNOWN 1)
     endif ()
@@ -205,10 +207,10 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
     # for finding only the Ruby interpreter.
     message(CHECK_START "Ruby interpreter executable")
-    find_package(Ruby 2.5 QUIET)
+    find_package(Ruby ${MODRUBY_REV} QUIET)
     if (Ruby_EXECUTABLE AND Ruby_VERSION)
-        if (Ruby_VERSION VERSION_LESS 2.5)
-            message(CHECK_FAIL "${Ruby_EXECUTABLE} (version: ${Ruby_VERSION}, minimum required 2.5)")
+        if (Ruby_VERSION VERSION_LESS ${MODRUBY_REV})
+            message(CHECK_FAIL "${Ruby_EXECUTABLE} (version: ${Ruby_VERSION}, minimum required ${MODRUBY_REV})")
             set(Ruby_EXECUTABLE NOTFOUND)
         else ()
             message(CHECK_PASS "${Ruby_EXECUTABLE} (version: ${Ruby_VERSION})")
@@ -230,7 +232,7 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     include(CheckCXXCompilerFlag)
     include(CheckCXXSourceCompiles)
     include(CheckFunctionExists)
-    include(CheckIncludeFile)
+    include(CheckIncludeFiles)
     include(CheckSymbolExists)
     include(CheckStructHasMember)
     include(CheckTypeSize)
