diff -urpN webkitgtk-2.34.1.orig/CMakeLists.txt webkitgtk-2.34.1.cmake/CMakeLists.txt
--- webkitgtk-2.34.1.orig/CMakeLists.txt	2021-09-01 04:16:33.000000000 -0500
+++ webkitgtk-2.34.1.cmake/CMakeLists.txt	2021-11-18 12:05:12.033622095 -0600
@@ -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.5)
 project(WebKit)
 
 # -----------------------------------------------------------------------------
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/FindGDK3.cmake webkitgtk-2.34.1.cmake/Source/cmake/FindGDK3.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/FindGDK3.cmake	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.34.1.cmake/Source/cmake/FindGDK3.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -0,0 +1,49 @@
+# - Try to find GDK 3
+# Once done, this will define
+#
+#  GDK3_FOUND - system has GDK 3
+#  GDK3_INCLUDE_DIRS - the GDK 3 include directories
+#  GDK3_LIBRARIES - link these to use GDK 3
+#
+# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
+# Copyright (C) 2013 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_package(PkgConfig)
+pkg_check_modules(GDK3 gdk-3.0)
+
+set(VERSION_OK TRUE)
+if (GDK3_VERSION)
+    if (GDK3_FIND_VERSION_EXACT)
+        if (NOT("${GDK3_FIND_VERSION}" VERSION_EQUAL "${GDK3_VERSION}"))
+            set(VERSION_OK FALSE)
+        endif ()
+    else ()
+        if ("${GDK3_VERSION}" VERSION_LESS "${GDK3_FIND_VERSION}")
+            set(VERSION_OK FALSE)
+        endif ()
+    endif ()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDK3 DEFAULT_MSG GDK3_INCLUDE_DIRS GDK3_LIBRARIES VERSION_OK)
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/FindGObjectIntrospection.cmake webkitgtk-2.34.1.cmake/Source/cmake/FindGObjectIntrospection.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/FindGObjectIntrospection.cmake	2021-09-01 04:16:51.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/cmake/FindGObjectIntrospection.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -45,7 +45,7 @@ if (PKG_CONFIG_FOUND)
         _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir" "")
         _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir" "")
         set(INTROSPECTION_VERSION "${_pc_gir_VERSION}")
-        if (${INTROSPECTION_VERSION} VERSION_GREATER_EQUAL "1.59.1")
+        if (${INTROSPECTION_VERSION} VERSION_GREATER "1.59.1")
             set(INTROSPECTION_HAVE_SOURCES_TOP_DIRS YES)
         endif ()
         set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/FindGTK3.cmake webkitgtk-2.34.1.cmake/Source/cmake/FindGTK3.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/FindGTK3.cmake	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.34.1.cmake/Source/cmake/FindGTK3.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -0,0 +1,75 @@
+# - Try to find GTK+ 3
+# Once done, this will define
+#
+#  GTK3_FOUND - system has GTK+ 3.
+#  GTK3_INCLUDE_DIRS - the GTK+ 3. include directories
+#  GTK3_LIBRARIES - link these to use GTK+ 3.
+#  GTK3_SUPPORTS_QUARTZ - GTK+ supports Quartz backend
+#  GTK3_SUPPORTS_X11 - GTK+ supports X11 backend
+#  GTK3_SUPPORTS_WAYLAND - GTK+ supports Wayland backend
+#
+# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
+# Copyright (C) 2013, 2015 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_package(PkgConfig)
+pkg_check_modules(GTK3 gtk+-3.0)
+
+set(VERSION_OK TRUE)
+if (GTK3_VERSION)
+    if (GTK3_FIND_VERSION_EXACT)
+        if (NOT("${GTK3_FIND_VERSION}" VERSION_EQUAL "${GTK3_VERSION}"))
+            set(VERSION_OK FALSE)
+        endif ()
+    else ()
+        if ("${GTK3_VERSION}" VERSION_LESS "${GTK3_FIND_VERSION}")
+            set(VERSION_OK FALSE)
+        endif ()
+    endif ()
+endif ()
+
+if (GTK3_VERSION AND VERSION_OK)
+    pkg_check_modules(GTK3_QUARTZ gtk+-quartz-3.0)
+    if ("${GTK3_QUARTZ_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
+        set(GTK3_SUPPORTS_QUARTZ TRUE)
+    else ()
+        set(GTK3_SUPPORTS_QUARTZ FALSE)
+    endif ()
+
+    pkg_check_modules(GTK3_X11 gtk+-x11-3.0)
+    if ("${GTK3_X11_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
+        set(GTK3_SUPPORTS_X11 TRUE)
+    else ()
+        set(GTK3_SUPPORTS_X11 FALSE)
+    endif ()
+
+    pkg_check_modules(GTK3_WAYLAND gtk+-wayland-3.0)
+    if ("${GTK3_WAYLAND_VERSION}" VERSION_EQUAL "${GTK3_VERSION}")
+        set(GTK3_SUPPORTS_WAYLAND TRUE)
+    else ()
+        set(GTK3_SUPPORTS_WAYLAND FALSE)
+    endif ()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK3 DEFAULT_MSG GTK3_INCLUDE_DIRS GTK3_LIBRARIES VERSION_OK)
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/FindGTKUnixPrint.cmake webkitgtk-2.34.1.cmake/Source/cmake/FindGTKUnixPrint.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/FindGTKUnixPrint.cmake	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.34.1.cmake/Source/cmake/FindGTKUnixPrint.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -0,0 +1,49 @@
+# - Try to find gtk-unix-print
+# Once done, this will define
+#
+#  GTKUnixPrint_FOUND - system has gtk-unix-print
+#  GTK_UNIX_PRINT_INCLUDE_DIRS - the gtk-unix-print include directories
+#  GTK_UNIX_PRINT_LIBRARIES - link these to use gtk-unix-print
+#
+# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
+# Copyright (C) 2014 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_package(PkgConfig)
+pkg_check_modules(GTK_UNIX_PRINT gtk+-unix-print-3.0)
+
+set(VERSION_OK TRUE)
+if (GTK_UNIX_PRINT_VERSION)
+    if (GTK_UNIX_PRINT_FIND_VERSION_EXACT)
+        if (NOT("${GTK_UNIX_PRINT_FIND_VERSION}" VERSION_EQUAL "${GTK_UNIX_PRINT_VERSION}"))
+            set(VERSION_OK FALSE)
+        endif ()
+    else ()
+        if ("${GTK_UNIX_PRINT_VERSION}" VERSION_LESS "${GTK_UNIX_PRINT_FIND_VERSION}")
+            set(VERSION_OK FALSE)
+        endif ()
+    endif ()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GTKUnixPrint REQUIRED_VARS GTK_UNIX_PRINT_INCLUDE_DIRS GTK_UNIX_PRINT_LIBRARIES VERSION_OK)
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/FindICU.cmake webkitgtk-2.34.1.cmake/Source/cmake/FindICU.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/FindICU.cmake	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.34.1.cmake/Source/cmake/FindICU.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -0,0 +1,110 @@
+# Finds the International Components for Unicode (ICU) Library
+#
+#  ICU_FOUND          - True if ICU found.
+#  ICU_I18N_FOUND     - True if ICU's internationalization library found.
+#  ICU_INCLUDE_DIRS   - Directory to include to get ICU headers
+#                       Note: always include ICU headers as, e.g.,
+#                       unicode/utypes.h
+#  ICU_LIBRARIES      - Libraries to link against for the common ICU
+#  ICU_I18N_LIBRARIES - Libraries to link against for ICU internationaliation
+#                       (note: in addition to ICU_LIBRARIES)
+
+find_package(PkgConfig)
+pkg_check_modules(PC_ICU icu-uc)
+
+# Look for the header file.
+find_path(
+    ICU_INCLUDE_DIR
+    NAMES unicode/utypes.h
+    HINTS ${PC_ICU_INCLUDE_DIRS}
+          ${PC_ICU_INCLUDEDIR}
+          ${WEBKIT_LIBRARIES_INCLUDE_DIR}
+    DOC "Include directory for the ICU library")
+mark_as_advanced(ICU_INCLUDE_DIR)
+
+# Look for the library.
+find_library(
+    ICU_LIBRARY
+    NAMES libicuuc cygicuuc cygicuuc32 icuuc
+    HINTS ${PC_ICU_LIBRARY_DIRS}
+          ${PC_ICU_LIBDIR}
+          ${WEBKIT_LIBRARIES_LINK_DIR}
+    DOC "Libraries to link against for the common parts of ICU")
+mark_as_advanced(ICU_LIBRARY)
+
+# Copy the results to the output variables.
+if (ICU_INCLUDE_DIR AND ICU_LIBRARY)
+    set(ICU_FOUND 1)
+    set(ICU_LIBRARIES ${ICU_LIBRARY})
+    set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
+
+    set(ICU_VERSION 0)
+    set(ICU_MAJOR_VERSION 0)
+    set(ICU_MINOR_VERSION 0)
+    file(READ "${ICU_INCLUDE_DIR}/unicode/uversion.h" _ICU_VERSION_CONENTS)
+    string(REGEX REPLACE ".*#define U_ICU_VERSION_MAJOR_NUM ([0-9]+).*" "\\1" ICU_MAJOR_VERSION "${_ICU_VERSION_CONENTS}")
+    string(REGEX REPLACE ".*#define U_ICU_VERSION_MINOR_NUM ([0-9]+).*" "\\1" ICU_MINOR_VERSION "${_ICU_VERSION_CONENTS}")
+
+    set(ICU_VERSION "${ICU_MAJOR_VERSION}.${ICU_MINOR_VERSION}")
+
+    # Look for the ICU internationalization libraries
+    pkg_check_modules(PC_ICU_I18N icu-i18n)
+    find_library(
+        ICU_I18N_LIBRARY
+        NAMES icui18n libicui18n libicuin cygicuin cygicuin32 icuin
+        HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
+              ${PC_ICU_I18N_LIBDIR}
+              ${WEBKIT_LIBRARIES_LINK_DIR}
+        DOC "Libraries to link against for ICU internationalization")
+    mark_as_advanced(ICU_I18N_LIBRARY)
+    if (ICU_I18N_LIBRARY)
+        set(ICU_I18N_FOUND 1)
+        set(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
+    else ()
+        set(ICU_I18N_FOUND 0)
+        set(ICU_I18N_LIBRARIES)
+    endif ()
+
+    # Look for the ICU data libraries
+    find_library(
+        ICU_DATA_LIBRARY
+        NAMES icudata libicudata cygicudata cygicudata32
+        HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
+              ${PC_ICU_I18N_LIBDIR}
+              ${WEBKIT_LIBRARIES_LINK_DIR}
+        DOC "Libraries to link against for ICU data")
+    mark_as_advanced(ICU_DATA_LIBRARY)
+    if (ICU_DATA_LIBRARY)
+        set(ICU_DATA_FOUND 1)
+        set(ICU_DATA_LIBRARIES ${ICU_DATA_LIBRARY})
+    else ()
+        set(ICU_DATA_FOUND 0)
+        set(ICU_DATA_LIBRARIES)
+    endif ()
+else ()
+    set(ICU_FOUND 0)
+    set(ICU_I18N_FOUND 0)
+    set(ICU_DATA_FOUND 0)
+    set(ICU_LIBRARIES)
+    set(ICU_I18N_LIBRARIES)
+    set(ICU_DATA_LIBRARIES)
+    set(ICU_INCLUDE_DIRS)
+    set(ICU_VERSION)
+    set(ICU_MAJOR_VERSION)
+    set(ICU_MINOR_VERSION)
+endif ()
+
+if (ICU_FOUND)
+    if (NOT ICU_FIND_QUIETLY)
+        message(STATUS "Found ICU header files in ${ICU_INCLUDE_DIRS}")
+        message(STATUS "Found ICU libraries: ${ICU_LIBRARIES}")
+        message(STATUS "Found ICU internationaliation libraries: ${ICU_I18N_LIBRARIES}")
+        message(STATUS "Found ICU data libraries: ${ICU_DATA_LIBRARIES}")
+    endif ()
+else ()
+    if (ICU_FIND_REQUIRED)
+        message(FATAL_ERROR "Could not find ICU")
+    else ()
+        message(STATUS "Optional package ICU was not found")
+    endif ()
+endif ()
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/OptionsCommon.cmake webkitgtk-2.34.1.cmake/Source/cmake/OptionsCommon.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/OptionsCommon.cmake	2021-09-01 04:16:51.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/cmake/OptionsCommon.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -1,7 +1,3 @@
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_EXTENSIONS OFF)
-
 add_definitions(-DBUILDING_WITH_CMAKE=1)
 add_definitions(-DHAVE_CONFIG_H=1)
 
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/OptionsGTK.cmake webkitgtk-2.34.1.cmake/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/OptionsGTK.cmake	2021-11-09 14:45:36.676310377 -0600
+++ webkitgtk-2.34.1.cmake/Source/cmake/OptionsGTK.cmake	2021-11-18 16:24:53.900884695 -0600
@@ -14,7 +14,7 @@ find_package(Freetype 2.4.2 REQUIRED)
 find_package(LibGcrypt 1.6.0 REQUIRED)
 find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
 find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
-find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc)
+find_package(ICU REQUIRED)
 find_package(JPEG REQUIRED)
 find_package(LibXml2 2.8.0 REQUIRED)
 find_package(PNG REQUIRED)
@@ -25,6 +25,7 @@ find_package(ATK 2.16.0 REQUIRED)
 find_package(WebP REQUIRED COMPONENTS demux)
 find_package(ATSPI 2.5.3)
 find_package(EGL)
+find_package(GTKUnixPrint)
 find_package(OpenGL)
 find_package(OpenGLES2)
 
@@ -186,15 +187,16 @@ else ()
     set(GTK_MINIMUM_VERSION 3.22.0)
     set(GTK_PC_NAME gtk+-3.0)
 endif ()
-find_package(GTK ${GTK_MINIMUM_VERSION} REQUIRED OPTIONAL_COMPONENTS unix-print)
+find_package(GTK3 3.20.0 REQUIRED)
+find_package(GDK3 3.20.0 REQUIRED)
 
-if (ENABLE_QUARTZ_TARGET AND NOT ${GTK_SUPPORTS_QUARTZ})
+if (ENABLE_QUARTZ_TARGET AND NOT ${GTK3_SUPPORTS_QUARTZ})
     set(ENABLE_QUARTZ_TARGET OFF)
 endif ()
-if (ENABLE_X11_TARGET AND NOT ${GTK_SUPPORTS_X11})
+if (ENABLE_X11_TARGET AND NOT ${GTK3_SUPPORTS_X11})
     set(ENABLE_X11_TARGET OFF)
 endif ()
-if (ENABLE_WAYLAND_TARGET AND NOT ${GTK_SUPPORTS_WAYLAND})
+if (ENABLE_WAYLAND_TARGET AND NOT ${GTK3_SUPPORTS_WAYLAND})
     set(ENABLE_WAYLAND_TARGET OFF)
 endif ()
 
@@ -277,6 +279,11 @@ if (NOT EXISTS "${TOOLS_DIR}/glib/apply-
     set(BUILD_REVISION "tarball")
 endif ()
 
+set(GTK_LIBRARIES ${GTK3_LIBRARIES})
+set(GTK_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS})
+set(GDK_LIBRARIES ${GDK3_LIBRARIES})
+set(GDK_INCLUDE_DIRS ${GDK3_INCLUDE_DIRS})
+
 SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTK_UNIX_PRINT_FOUND})
 SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1)
 
@@ -349,7 +356,7 @@ if (USE_OPENGL_OR_ES)
         SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES TRUE)
         SET_AND_EXPOSE_TO_BUILD(USE_OPENGL FALSE)
 
-        if (OpenGLES2_API_VERSION VERSION_GREATER_EQUAL 3.0)
+        if (OpenGLES2_API_VERSION VERSION_GREATER 3.0 OR OpenGLES2_API_VERSION VERSION_EQUAL 3.0)
             SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 ON)
         endif ()
 
@@ -388,13 +395,13 @@ if (ENABLE_SPELLCHECK)
 endif ()
 
 if (ENABLE_QUARTZ_TARGET)
-    if (NOT GTK_SUPPORTS_QUARTZ)
+    if (NOT GTK3_SUPPORTS_QUARTZ)
         message(FATAL_ERROR "Recompile GTK with Quartz backend to use ENABLE_QUARTZ_TARGET")
     endif ()
 endif ()
 
 if (ENABLE_X11_TARGET)
-    if (NOT GTK_SUPPORTS_X11)
+    if (NOT GTK3_SUPPORTS_X11)
         message(FATAL_ERROR "Recompile GTK with X11 backend to use ENABLE_X11_TARGET")
     endif ()
 
@@ -411,7 +418,7 @@ if (ENABLE_X11_TARGET)
 endif ()
 
 if (ENABLE_WAYLAND_TARGET)
-    if (NOT GTK_SUPPORTS_WAYLAND)
+    if (NOT GTK3_SUPPORTS_WAYLAND)
         message(FATAL_ERROR "Recompile GTK with Wayland backend to use ENABLE_WAYLAND_TARGET")
     endif ()
 
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/OptionsJSCOnly.cmake webkitgtk-2.34.1.cmake/Source/cmake/OptionsJSCOnly.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/OptionsJSCOnly.cmake	2021-09-01 04:16:51.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/cmake/OptionsJSCOnly.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -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 -urpN webkitgtk-2.34.1.orig/Source/cmake/WebKitCommon.cmake webkitgtk-2.34.1.cmake/Source/cmake/WebKitCommon.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/WebKitCommon.cmake	2021-09-17 04:07:45.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/cmake/WebKitCommon.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -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
@@ -214,7 +212,6 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     include(WebKitCompilerFlags)
     include(WebKitStaticAnalysis)
     include(WebKitFeatures)
-    include(WebKitFindPackage)
 
     include(OptionsCommon)
     include(Options${PORT})
diff -urpN webkitgtk-2.34.1.orig/Source/cmake/WebKitCompilerFlags.cmake webkitgtk-2.34.1.cmake/Source/cmake/WebKitCompilerFlags.cmake
--- webkitgtk-2.34.1.orig/Source/cmake/WebKitCompilerFlags.cmake	2021-09-01 04:16:51.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/cmake/WebKitCompilerFlags.cmake	2021-11-18 12:05:12.033622095 -0600
@@ -104,6 +104,13 @@ if (COMPILER_IS_GCC_OR_CLANG)
         WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
         WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti)
 
+        check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17)
+        if (CXX_COMPILER_SUPPORTS_CXX17)
+            WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17)
+        else ()
+            message(FATAL_ERROR "Compiler with C++17 support is required")
+        endif ()
+
         WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-tautological-compare)
 
         if (WIN32)
@@ -138,7 +145,7 @@ if (COMPILER_IS_GCC_OR_CLANG)
 
     # Since GCC 11, these warnings produce too many false positives to be useful. We'll rely on
     # developers who build with Clang to notice these warnings.
-    if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL "11.0")
+    if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "11.0")
         WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-array-bounds)
         WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-nonnull)
     endif ()
diff -urpN webkitgtk-2.34.1.orig/Source/JavaScriptCore/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/JavaScriptCore/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/JavaScriptCore/CMakeLists.txt	2021-09-01 04:16:46.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/JavaScriptCore/CMakeLists.txt	2021-11-18 12:05:12.033622095 -0600
@@ -1,8 +1,6 @@
-cmake_minimum_required(VERSION 3.12)
-
+cmake_minimum_required(VERSION 3.5)
 include(WebKitCommon)
 include(target/TargetWTF)
-
 set_property(DIRECTORY . PROPERTY FOLDER "JavaScriptCore")
 
 list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
@@ -56,6 +54,10 @@ if (USE_CAPSTONE)
     list(APPEND JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/capstone/Source/include")
 endif ()
 
+set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
+    "${ICU_INCLUDE_DIRS}"
+)
+
 set(JavaScriptCore_OBJECT_LUT_SOURCES
     runtime/ArrayConstructor.cpp
     runtime/AsyncFromSyncIteratorPrototype.cpp
@@ -253,12 +255,7 @@ add_custom_command(
     VERBATIM)
 add_custom_target(Bytecodes DEPENDS "${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h")
 
-
-if (WTF_OS_MAC_OS_X)
-    execute_process(COMMAND bash -c "date +'%s'" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
-else ()
-    string(TIMESTAMP BUILD_TIME "%s")
-endif ()
+execute_process(COMMAND bash -c "date +'%s'" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 list(APPEND JavaScriptCore_HEADERS
     ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
diff -urpN webkitgtk-2.34.1.orig/Source/ThirdParty/ANGLE/include/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/ThirdParty/ANGLE/include/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/ThirdParty/ANGLE/include/CMakeLists.txt	2021-09-01 04:16:46.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/ThirdParty/ANGLE/include/CMakeLists.txt	2021-11-18 12:05:12.033622095 -0600
@@ -1,19 +1,39 @@
 string(REGEX REPLACE "(^|;)include/" "\\1" includes "${libangle_includes}")
 
-set(egl_headers ${includes})
-list(FILTER egl_headers INCLUDE REGEX "EGL/.*")
+set(egl_headers
+    EGL/egl.h
+    EGL/eglext.h
+    EGL/eglext_angle.h
+    EGL/eglplatform.h
+)
+
+set(gles_headers
+    GLES/egl.h
+    GLES/gl.h
+    GLES/glext.h
+    GLES/glext_explicit_context_autogen.inc
+    GLES/glext_angle.h
+    GLES/glplatform.h
+)
+
+set(gles2_headers
+    GLES2/gl2.h
+    GLES2/gl2ext.h
+    GLES2/gl2ext_explicit_context_autogen.inc
+    GLES2/gl2ext_angle.h
+    GLES2/gl2platform.h
+)
+
+set(gles3_headers
+    GLES3/gl3.h
+    GLES3/gl3ext_explicit_context_autogen.inc
+    GLES3/gl31.h
+    GLES3/gl31ext_explicit_context_autogen.inc
+    GLES3/gl32.h
+    GLES3/gl3platform.h
+)
 
-set(gles_headers ${includes})
-list(FILTER gles_headers INCLUDE REGEX "GLES/.*")
-
-set(gles2_headers ${includes})
-list(FILTER gles2_headers INCLUDE REGEX "GLES2/.*")
-
-set(gles3_headers ${includes})
-list(FILTER gles3_headers INCLUDE REGEX "GLES3/.*")
-
-set(khr_headers ${includes})
-list(FILTER khr_headers INCLUDE REGEX "KHR/.*")
+set(khr_headers KHR/khrplatform.h)
 
 set(glslang_headers
     GLSLANG/ShaderLang.h
diff -urpN webkitgtk-2.34.1.orig/Source/ThirdParty/ANGLE/PlatformGTK.cmake webkitgtk-2.34.1.cmake/Source/ThirdParty/ANGLE/PlatformGTK.cmake
--- webkitgtk-2.34.1.orig/Source/ThirdParty/ANGLE/PlatformGTK.cmake	2021-09-01 04:16:46.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/ThirdParty/ANGLE/PlatformGTK.cmake	2021-11-18 12:05:14.317634298 -0600
@@ -32,7 +32,7 @@ if (USE_ANGLE_EGL OR USE_ANGLE_WEBGL)
     if (USE_OPENGL)
         list(APPEND ANGLEGLESv2_LIBRARIES ${OPENGL_LIBRARIES})
     else ()
-        list(APPEND ANGLEGLESv2_LIBRARIES OpenGL::GLES)
+        list(APPEND ANGLEGLESv2_LIBRARIES ${OpenGLES2_LIBRARIES})
     endif ()
 
     # NOTE: When both Wayland and X11 are enabled, ANGLE_USE_X11 will be
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/WebCore/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/WebCore/CMakeLists.txt	2021-09-01 04:16:49.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/CMakeLists.txt	2021-11-18 12:05:12.033622095 -0600
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.5)
 
 include(WebKitCommon)
 include(target/TargetWTF)
@@ -174,6 +174,13 @@ set(WebCore_PRIVATE_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/xml/parser"
 )
 
+set(WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${ICU_INCLUDE_DIR}
+    ${LIBXML2_INCLUDE_DIR}
+    ${LIBXSLT_INCLUDE_DIR}
+    ${ZLIB_INCLUDE_DIRS}
+)
+
 set(WebCore_IDL_INCLUDES
     css
     dom
@@ -1404,9 +1411,11 @@ set(WebCore_PLUG_INS_RESOURCES
 )
 
 set(WebCore_LIBRARIES
-    LibXml2::LibXml2
-    SQLite::SQLite3
-    ZLIB::ZLIB
+    ${ICU_LIBRARIES}
+    ${SQLite3_LIBRARIES}
+    ${LIBXML2_LIBRARIES}
+    ${LIBXSLT_LIBRARIES}
+    ${ZLIB_LIBRARIES}
 )
 set(WebCore_FRAMEWORKS
     JavaScriptCore
@@ -1418,7 +1427,7 @@ if (NOT USE_SYSTEM_MALLOC)
 endif ()
 
 if (ENABLE_XSLT)
-    list(APPEND WebCore_LIBRARIES LibXslt::LibXslt)
+    list(APPEND WebCore_LIBRARIES ${LIBXSLT_LIBRARIES})
 endif ()
 
 # For platforms that want to use system-provided OpenGL (ES) / EGL headers,
@@ -1447,7 +1456,7 @@ else ()
         )
         add_definitions(${OPENGL_DEFINITIONS})
     elseif (USE_OPENGL_ES)
-        list(APPEND WebCore_LIBRARIES OpenGL::GLES)
+        list(APPEND WebCore_LIBRARIES ${OpenGLES2_LIBRARIES})
     endif ()
 
     if (USE_EGL)
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/PAL/pal/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/WebCore/PAL/pal/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/WebCore/PAL/pal/CMakeLists.txt	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/PAL/pal/CMakeLists.txt	2021-11-18 12:05:12.033622095 -0600
@@ -37,6 +37,10 @@ set(PAL_PRIVATE_INCLUDE_DIRECTORIES
     "${PAL_DIR}/pal/text"
 )
 
+set(PAL_SYSTEM_INCLUDE_DIRECTORIES
+    ${ICU_INCLUDE_DIRS}
+)
+
 set(PAL_FRAMEWORKS WTF)
 if (NOT USE_SYSTEM_MALLOC)
     list(APPEND PAL_FRAMEWORKS bmalloc)
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/PAL/pal/PlatformGTK.cmake webkitgtk-2.34.1.cmake/Source/WebCore/PAL/pal/PlatformGTK.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/PAL/pal/PlatformGTK.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/PAL/pal/PlatformGTK.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -30,6 +30,6 @@ if (ENABLE_WEB_CRYPTO)
     )
 endif ()
 
-list(APPEND PAL_LIBRARIES
-    GTK::GTK
-)
+list(APPEND PAL_SYSTEM_INCLUDE_DIRECTORIES
+    ${GDK_INCLUDE_DIRS}
+ )
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/platform/Cairo.cmake webkitgtk-2.34.1.cmake/Source/WebCore/platform/Cairo.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/platform/Cairo.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/platform/Cairo.cmake	2021-11-18 12:43:31.265906758 -0600
@@ -20,5 +20,5 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HE
 )
 
 list(APPEND WebCore_LIBRARIES
-    Cairo::Cairo
+    ${Cairo_LIBRARIES}
 )
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/platform/Curl.cmake webkitgtk-2.34.1.cmake/Source/WebCore/platform/Curl.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/platform/Curl.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/platform/Curl.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -70,8 +70,12 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HE
     platform/network/curl/SocketStreamHandleImpl.h
 )
 
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${CURL_INCLUDE_DIRS}
+    ${OPENSSL_INCLUDE_DIR}
+)
+
 list(APPEND WebCore_LIBRARIES
-    CURL::libcurl
-    LibPSL::LibPSL
-    OpenSSL::SSL
+    ${CURL_LIBRARIES}
+    ${OPENSSL_LIBRARIES}
 )
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/platform/FreeType.cmake webkitgtk-2.34.1.cmake/Source/WebCore/platform/FreeType.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/platform/FreeType.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/platform/FreeType.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -31,9 +31,12 @@ if (USE_CAIRO)
     )
 endif ()
 
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${FREETYPE_INCLUDE_DIRS}
+)
+
 list(APPEND WebCore_LIBRARIES
-    Fontconfig::Fontconfig
-    Freetype::Freetype
-    HarfBuzz::HarfBuzz
-    HarfBuzz::ICU
+    ${Fontconfig_LIBRARIES}
+    ${FREETYPE_LIBRARIES}
+    ${HarfBuzz_LIBRARIES}
 )
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/platform/GCrypt.cmake webkitgtk-2.34.1.cmake/Source/WebCore/platform/GCrypt.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/platform/GCrypt.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/platform/GCrypt.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -5,5 +5,5 @@ if (ENABLE_WEB_CRYPTO)
 endif ()
 
 list(APPEND WebCore_LIBRARIES
-    LibGcrypt::LibGcrypt
+    ${LibGcrypt_LIBRARIES}
 )
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/platform/ImageDecoders.cmake webkitgtk-2.34.1.cmake/Source/WebCore/platform/ImageDecoders.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/platform/ImageDecoders.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/platform/ImageDecoders.cmake	2021-11-18 12:47:23.315146683 -0600
@@ -34,19 +34,26 @@ list(APPEND WebCore_SOURCES
     platform/image-decoders/webp/WEBPImageDecoder.cpp
 )
 
+list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+    ${JPEG_INCLUDE_DIR}
+    ${PNG_INCLUDE_DIRS}
+)
+
 list(APPEND WebCore_LIBRARIES
-    JPEG::JPEG
-    PNG::PNG
+    ${JPEG_LIBRARIES}
+    ${PNG_LIBRARIES}
 )
 
 if (OpenJPEG_FOUND)
     list(APPEND WebCore_LIBRARIES OpenJPEG::OpenJPEG)
 endif ()
 
-if (WebP_FOUND)
+if (WEBP_FOUND)
+    list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+        ${WebP_INCLUDE_DIRS}
+    )
     list(APPEND WebCore_LIBRARIES
-        WebP::demux
-        WebP::libwebp
+        ${WebP_LIBRARIES}
     )
 endif ()
 
diff -urpN webkitgtk-2.34.1.orig/Source/WebCore/PlatformGTK.cmake webkitgtk-2.34.1.cmake/Source/WebCore/PlatformGTK.cmake
--- webkitgtk-2.34.1.orig/Source/WebCore/PlatformGTK.cmake	2021-09-01 04:16:50.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WebCore/PlatformGTK.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -84,10 +84,12 @@ set(WebCore_USER_AGENT_SCRIPTS_DEPENDENC
 list(APPEND WebCore_LIBRARIES
     ${ATK_LIBRARIES}
     ${ENCHANT_LIBRARIES}
+    ${GDK_LIBRARIES}
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GMODULE_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
+    ${GTK_LIBRARIES}
     ${LIBSECRET_LIBRARIES}
     ${LIBTASN1_LIBRARIES}
     ${HYPHEN_LIBRARIES}
@@ -97,12 +99,12 @@ list(APPEND WebCore_LIBRARIES
     ${X11_Xdamage_LIB}
     ${X11_Xrender_LIB}
     ${X11_Xt_LIB}
-    GTK::GTK
+    ${ZLIB_LIBRARIES}
 )
 
 if (USE_LCMS)
     list(APPEND WebCore_LIBRARIES
-        LCMS2::LCMS2
+        ${LCMS2_LIBRARIES}
     )
 endif ()
 
@@ -115,11 +117,14 @@ endif ()
 list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
     ${ATK_INCLUDE_DIRS}
     ${ENCHANT_INCLUDE_DIRS}
+    ${GDK_INCLUDE_DIRS}
     ${GIO_UNIX_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
+    ${GTK_INCLUDE_DIRS}
     ${LIBSECRET_INCLUDE_DIRS}
     ${LIBTASN1_INCLUDE_DIRS}
     ${UPOWERGLIB_INCLUDE_DIRS}
+    ${ZLIB_INCLUDE_DIRS}
 )
 
 if (USE_OPENGL)
@@ -158,7 +163,8 @@ include_directories(SYSTEM
     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
 )
 
-list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE GTK::GTK)
+list(APPEND WebCoreTestSupport_LIBRARIES PRIVATE ${GTK_LIBRARIES})
+ list(APPEND WebCoreTestSupport_SYSTEM_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS})
 
 add_definitions(-DBUILDING_WEBKIT)
 
diff -urpN webkitgtk-2.34.1.orig/Source/WebKit/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/WebKit/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/WebKit/CMakeLists.txt	2021-11-09 14:45:36.680310399 -0600
+++ webkitgtk-2.34.1.cmake/Source/WebKit/CMakeLists.txt	2021-11-18 12:34:05.522883976 -0600
@@ -118,6 +118,10 @@ set(WebKit_INCLUDE_DIRECTORIES
 
 set(PROTOCOL_GENERATOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
 
+set(WebKit_SYSTEM_INCLUDE_DIRECTORIES
+    ${ICU_INCLUDE_DIRS}
+)
+
 list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
     "Sources.txt"
 )
@@ -343,7 +347,7 @@ else ()
         )
         add_definitions(${OPENGL_DEFINITIONS})
     elseif (USE_OPENGL_ES)
-        list(APPEND WebKit_PRIVATE_LIBRARIES OpenGL::GLES)
+        list(APPEND WebKit_PRIVATE_LIBRARIES ${OpenGLES2_LIBRARIES})
     endif ()
 
     if (USE_EGL)
diff -urpN webkitgtk-2.34.1.orig/Source/WebKit/PlatformGTK.cmake webkitgtk-2.34.1.cmake/Source/WebKit/PlatformGTK.cmake
--- webkitgtk-2.34.1.orig/Source/WebKit/PlatformGTK.cmake	2021-11-09 14:45:36.680310399 -0600
+++ webkitgtk-2.34.1.cmake/Source/WebKit/PlatformGTK.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -467,6 +467,7 @@ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECT
     ${GSTREAMER_INCLUDE_DIRS}
     ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
     ${GTK_INCLUDE_DIRS}
+    ${GTK_UNIX_PRINT_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
 )
 
@@ -496,6 +497,10 @@ list(APPEND NetworkProcess_SOURCES
     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
 )
 
+list(APPEND WebKit_LIBRARIES
+    ${GTK_UNIX_PRINT_LIBRARIES}
+)
+
 list(APPEND GPUProcess_SOURCES
     GPUProcess/EntryPoint/unix/GPUProcessMain.cpp
 )
@@ -507,10 +512,6 @@ if (USE_WPE_RENDERER)
     )
 endif ()
 
-if (GTK_UNIX_PRINT_FOUND)
-    list(APPEND WebKit_LIBRARIES GTK::UnixPrint)
-endif ()
-
 if (LIBNOTIFY_FOUND)
     list(APPEND WebKit_PRIVATE_LIBRARIES
         ${LIBNOTIFY_LIBRARIES}
diff -urpN webkitgtk-2.34.1.orig/Source/WTF/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/WTF/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/WTF/CMakeLists.txt	2021-09-01 04:16:49.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WTF/CMakeLists.txt	2021-11-18 12:05:12.037622117 -0600
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.5)
 include(WebKitCommon)
 set_property(DIRECTORY . PROPERTY FOLDER "WTF")
 
diff -urpN webkitgtk-2.34.1.orig/Source/WTF/wtf/CMakeLists.txt webkitgtk-2.34.1.cmake/Source/WTF/wtf/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Source/WTF/wtf/CMakeLists.txt	2021-09-01 04:16:49.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WTF/wtf/CMakeLists.txt	2021-11-18 12:05:12.037622117 -0600
@@ -543,11 +543,15 @@ set(WTF_PRIVATE_INCLUDE_DIRECTORIES
     "${WTF_DIR}/wtf/unicode"
 )
 
+set(WTF_SYSTEM_INCLUDE_DIRECTORIES
+    ${ICU_INCLUDE_DIRS}
+)
+
 set(WTF_LIBRARIES
     ${CMAKE_DL_LIBS}
-    ICU::data
-    ICU::i18n
-    ICU::uc
+    ${ICU_DATA_LIBRARIES}
+    ${ICU_I18N_LIBRARIES}
+    ${ICU_LIBRARIES}
 )
 
 if (NOT USE_SYSTEM_MALLOC)
diff -urpN webkitgtk-2.34.1.orig/Source/WTF/wtf/PlatformGTK.cmake webkitgtk-2.34.1.cmake/Source/WTF/wtf/PlatformGTK.cmake
--- webkitgtk-2.34.1.orig/Source/WTF/wtf/PlatformGTK.cmake	2021-09-01 04:16:49.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Source/WTF/wtf/PlatformGTK.cmake	2021-11-18 12:05:12.037622117 -0600
@@ -69,11 +69,11 @@ else ()
 endif ()
 
 list(APPEND WTF_LIBRARIES
+    ${CMAKE_THREAD_LIBS_INIT}
     ${GLIB_GIO_LIBRARIES}
     ${GLIB_GOBJECT_LIBRARIES}
     ${GLIB_LIBRARIES}
-    Threads::Threads
-    ZLIB::ZLIB
+    ${ZLIB_LIBRARIES}
 )
 
 if (Systemd_FOUND)
diff -urpN webkitgtk-2.34.1.orig/Tools/MiniBrowser/gtk/CMakeLists.txt webkitgtk-2.34.1.cmake/Tools/MiniBrowser/gtk/CMakeLists.txt
--- webkitgtk-2.34.1.orig/Tools/MiniBrowser/gtk/CMakeLists.txt	2021-09-01 04:16:51.000000000 -0500
+++ webkitgtk-2.34.1.cmake/Tools/MiniBrowser/gtk/CMakeLists.txt	2021-11-18 12:05:12.037622117 -0600
@@ -29,15 +29,17 @@ set(MiniBrowser_PRIVATE_INCLUDE_DIRECTOR
 )
 
 set(MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES
+    ${GTK3_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
+    ${GSTREAMER_INCLUDE_DIRS}
 )
 
 set(MiniBrowser_PRIVATE_LIBRARIES
     ${GLIB_LIBRARIES}
     ${JavaScriptCore_LIBRARY_NAME}
     ${LIBSOUP_LIBRARIES}
-    GTK::GTK
+    ${GTK3_LIBRARIES}
     WebKit::WebKit
 )
 
