diff -urpN webkitgtk-2.44.0.gtk/Source/cmake/FindGI.cmake webkitgtk-2.44.0.glib244/Source/cmake/FindGI.cmake
--- webkitgtk-2.44.0.gtk/Source/cmake/FindGI.cmake	2024-03-16 01:45:51.284670000 -0500
+++ webkitgtk-2.44.0.glib244/Source/cmake/FindGI.cmake	2024-03-22 15:54:02.960063120 -0500
@@ -334,6 +334,13 @@ function(GI_INTROSPECT namespace nsversi
     # Generate .gir
     set(target_def "$<TARGET_PROPERTY:${opt_TARGET},COMPILE_DEFINITIONS>")
     set(target_inc "$<TARGET_PROPERTY:${opt_TARGET},INTERFACE_INCLUDE_DIRECTORIES>")
+    set(PREV_LOADER_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}")
+    string(COMPARE EQUAL "${PREV_LOADER_LIBRARY_PATH}" "" ld_library_path_does_not_exist)
+    if (ld_library_path_does_not_exist)
+        set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+    else ()
+        set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:${PREV_LOADER_LIBRARY_PATH}")
+    endif ()
     add_custom_command(
         OUTPUT "${gir_path}"
         COMMENT "Generating ${gir_name}.gir"
@@ -342,6 +349,7 @@ function(GI_INTROSPECT namespace nsversi
         VERBATIM
         COMMAND_EXPAND_LISTS
         COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}"
+            "LD_LIBRARY_PATH=${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
             "${GI_SCANNER_EXE}" --quiet --warn-all --warn-error --no-libtool
             "--output=${gir_path}"
             "--library=$<TARGET_FILE_BASE_NAME:${opt_TARGET}>"
diff -urpN webkitgtk-2.44.0.gtk/Source/cmake/OptionsGTK.cmake webkitgtk-2.44.0.glib244/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.44.0.gtk/Source/cmake/OptionsGTK.cmake	2024-03-22 15:52:25.439709513 -0500
+++ webkitgtk-2.44.0.glib244/Source/cmake/OptionsGTK.cmake	2024-03-22 15:54:02.960063120 -0500
@@ -207,7 +207,7 @@ endif ()
 if (ENABLE_2022_GLIB_API)
     set(GLIB_MINIMUM_VERSION 2.70.0)
 else ()
-    set(GLIB_MINIMUM_VERSION 2.56.4)
+    set(GLIB_MINIMUM_VERSION 2.48.2)
 endif ()
 find_package(GLIB ${GLIB_MINIMUM_VERSION} REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
 
diff -urpN webkitgtk-2.44.0.gtk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp webkitgtk-2.44.0.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
--- webkitgtk-2.44.0.gtk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2024-03-22 15:51:58.352944614 -0500
+++ webkitgtk-2.44.0.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2024-03-22 15:53:53.353361622 -0500
@@ -85,6 +85,7 @@
 #include <gst/video/gstvideometa.h>
 #include <limits>
 #include <wtf/FileSystem.h>
+#include <wtf/glib/GLibUtilities.h>
 #include <wtf/glib/GUniquePtr.h>
 #include <wtf/glib/RunLoopSourcePriority.h>
 #include <wtf/MathExtras.h>
@@ -2159,10 +2160,7 @@ void MediaPlayerPrivateGStreamer::update
 {
     bool wasBuffering = m_isBuffering;
 
-#ifndef GST_DISABLE_GST_DEBUG
-    GUniquePtr<char> modeString(g_enum_to_string(GST_TYPE_BUFFERING_MODE, mode));
-    GST_DEBUG_OBJECT(pipeline(), "[Buffering] mode: %s, status: %f%%", modeString.get(), percentage);
-#endif
+    GST_DEBUG_OBJECT(pipeline(), "[Buffering] mode: %s, status: %f%%", enumToString(GST_TYPE_BUFFERING_MODE, mode).data(), percentage);
 
     m_didDownloadFinish = percentage == 100;
 
@@ -2188,9 +2186,7 @@ void MediaPlayerPrivateGStreamer::update
         break;
     }
     default:
-#ifndef GST_DISABLE_GST_DEBUG
-        GST_DEBUG_OBJECT(pipeline(), "Unhandled buffering mode: %s", modeString.get());
-#endif
+        GST_DEBUG_OBJECT(pipeline(), "Unhandled buffering mode: %s", enumToString(GST_TYPE_BUFFERING_MODE, mode).data());
         break;
     }
 }
diff -urpN webkitgtk-2.44.0.gtk/Source/WebKit/InspectorGResources.cmake webkitgtk-2.44.0.glib244/Source/WebKit/InspectorGResources.cmake
--- webkitgtk-2.44.0.gtk/Source/WebKit/InspectorGResources.cmake	2024-03-16 01:45:50.836670900 -0500
+++ webkitgtk-2.44.0.glib244/Source/WebKit/InspectorGResources.cmake	2024-03-22 15:54:02.963396465 -0500
@@ -12,7 +12,7 @@ macro(WEBKIT_BUILD_INSPECTOR_GRESOURCES
         OUTPUT ${_derived_sources_dir}/InspectorGResourceBundle.c ${_derived_sources_dir}/InspectorGResourceBundle.deps
         DEPENDS ${_derived_sources_dir}/InspectorGResourceBundle.xml
         DEPFILE ${_derived_sources_dir}/InspectorGResourceBundle.deps
-        COMMAND glib-compile-resources --generate --sourcedir=${_derived_sources_dir}/InspectorResources/WebInspectorUI --target=${_derived_sources_dir}/InspectorGResourceBundle.c --dependency-file=${_derived_sources_dir}/InspectorGResourceBundle.deps ${_derived_sources_dir}/InspectorGResourceBundle.xml
+        COMMAND glib-compile-resources --generate --sourcedir=${_derived_sources_dir}/InspectorResources/WebInspectorUI --target=${_derived_sources_dir}/InspectorGResourceBundle.c ${_derived_sources_dir}/InspectorGResourceBundle.xml
         VERBATIM
     )
 endmacro()
diff -urpN webkitgtk-2.44.0.gtk/Source/WebKit/ModernMediaControlsGResources.cmake webkitgtk-2.44.0.glib244/Source/WebKit/ModernMediaControlsGResources.cmake
--- webkitgtk-2.44.0.gtk/Source/WebKit/ModernMediaControlsGResources.cmake	2024-03-16 01:45:50.836670900 -0500
+++ webkitgtk-2.44.0.glib244/Source/WebKit/ModernMediaControlsGResources.cmake	2024-03-22 15:54:02.963396465 -0500
@@ -11,7 +11,7 @@ macro(WEBKIT_BUILD_MODERN_MEDIA_CONTROLS
         OUTPUT ${_derived_sources_dir}/ModernMediaControlsGResourceBundle.c ${_derived_sources_dir}/ModernMediaControlsGResourceBundle.deps
         DEPENDS ${_derived_sources_dir}/ModernMediaControlsGResourceBundle.xml
         DEPFILE ${_derived_sources_dir}/ModernMediaControlsGResourceBundle.deps
-        COMMAND glib-compile-resources --generate --sourcedir=${WEBCORE_DIR}/Modules/modern-media-controls/images/adwaita --target=${_derived_sources_dir}/ModernMediaControlsGResourceBundle.c --dependency-file=${_derived_sources_dir}/ModernMediaControlsGResourceBundle.deps ${_derived_sources_dir}/ModernMediaControlsGResourceBundle.xml
+        COMMAND glib-compile-resources --generate --sourcedir=${WEBCORE_DIR}/Modules/modern-media-controls/images/adwaita --target=${_derived_sources_dir}/ModernMediaControlsGResourceBundle.c ${_derived_sources_dir}/ModernMediaControlsGResourceBundle.xml
         VERBATIM
     )
 endmacro()
diff -urpN webkitgtk-2.44.0.gtk/Source/WebKit/PdfJSGResources.cmake webkitgtk-2.44.0.glib244/Source/WebKit/PdfJSGResources.cmake
--- webkitgtk-2.44.0.gtk/Source/WebKit/PdfJSGResources.cmake	2024-03-16 01:45:50.864670800 -0500
+++ webkitgtk-2.44.0.glib244/Source/WebKit/PdfJSGResources.cmake	2024-03-22 15:54:02.963396465 -0500
@@ -14,7 +14,7 @@ macro(WEBKIT_BUILD_PDFJS_GRESOURCES _der
         OUTPUT ${_derived_sources_dir}/PdfJSGResourceBundle.c ${_derived_sources_dir}/PdfJSGResourceBundle.deps
         DEPENDS ${_derived_sources_dir}/PdfJSGResourceBundle.xml
         DEPFILE ${_derived_sources_dir}/PdfJSGResourceBundle.deps
-        COMMAND glib-compile-resources --generate --sourcedir=${THIRDPARTY_DIR}/pdfjs --target=${_derived_sources_dir}/PdfJSGResourceBundle.c --dependency-file=${_derived_sources_dir}/PdfJSGResourceBundle.deps ${_derived_sources_dir}/PdfJSGResourceBundle.xml
+        COMMAND glib-compile-resources --generate --sourcedir=${THIRDPARTY_DIR}/pdfjs --target=${_derived_sources_dir}/PdfJSGResourceBundle.c ${_derived_sources_dir}/PdfJSGResourceBundle.xml
         VERBATIM
     )
 
@@ -30,7 +30,7 @@ macro(WEBKIT_BUILD_PDFJS_GRESOURCES _der
         OUTPUT ${_derived_sources_dir}/PdfJSGResourceBundleExtras.c ${_derived_sources_dir}/PdfJSGResourceBundleExtras.deps
         DEPENDS ${_derived_sources_dir}/PdfJSGResourceBundleExtras.xml
         DEPFILE ${_derived_sources_dir}/PdfJSGResourceBundleExtras.deps
-        COMMAND glib-compile-resources --generate --sourcedir=${WEBCORE_DIR}/Modules/pdfjs-extras --target=${_derived_sources_dir}/PdfJSGResourceBundleExtras.c --dependency-file=${_derived_sources_dir}/PdfJSGResourceBundleExtras.deps ${_derived_sources_dir}/PdfJSGResourceBundleExtras.xml
+        COMMAND glib-compile-resources --generate --sourcedir=${WEBCORE_DIR}/Modules/pdfjs-extras --target=${_derived_sources_dir}/PdfJSGResourceBundleExtras.c ${_derived_sources_dir}/PdfJSGResourceBundleExtras.xml
         VERBATIM
     )
 endmacro()
diff -urpN webkitgtk-2.44.0.gtk/Source/WebKit/PlatformGTK.cmake webkitgtk-2.44.0.glib244/Source/WebKit/PlatformGTK.cmake
--- webkitgtk-2.44.0.gtk/Source/WebKit/PlatformGTK.cmake	2024-03-22 15:51:22.472814501 -0500
+++ webkitgtk-2.44.0.glib244/Source/WebKit/PlatformGTK.cmake	2024-03-22 15:54:02.966729811 -0500
@@ -470,7 +470,7 @@ add_custom_command(
     OUTPUT ${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.c ${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.deps
     DEPENDS ${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.xml
     DEPFILE ${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.deps
-    COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebKit/Resources/gtk --target=${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.c --dependency-file=${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.deps ${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.xml
+    COMMAND glib-compile-resources --generate --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/Resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebCore/platform/audio/resources --sourcedir=${CMAKE_SOURCE_DIR}/Source/WebKit/Resources/gtk --target=${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.c ${WebKitGTK_DERIVED_SOURCES_DIR}/WebKitResourcesGResourceBundle.xml
     VERBATIM
 )
 
diff -urpN webkitgtk-2.44.0.gtk/Source/WTF/wtf/glib/GLibUtilities.cpp webkitgtk-2.44.0.glib244/Source/WTF/wtf/glib/GLibUtilities.cpp
--- webkitgtk-2.44.0.gtk/Source/WTF/wtf/glib/GLibUtilities.cpp	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.44.0.glib244/Source/WTF/wtf/glib/GLibUtilities.cpp	2024-03-22 15:53:53.353361622 -0500
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010 Igalia, S.L.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include <wtf/glib/GLibUtilities.h>
+
+#include <glib.h>
+#include <wtf/glib/GUniquePtr.h>
+
+#if OS(WINDOWS)
+#include <windows.h>
+#include <wtf/text/WTFString.h>
+#else
+#include <limits.h>
+#include <unistd.h>
+#endif
+
+CString enumToString(GType type, guint value)
+{
+#if GLIB_CHECK_VERSION(2, 54, 0)
+    GUniquePtr<char> result(g_enum_to_string(type, value));
+    return result.get();
+#else
+    GEnumClass* enumClass = reinterpret_cast<GEnumClass*>(g_type_class_ref(type));
+    GEnumValue* enumValue = g_enum_get_value(enumClass, value);
+    char* representation = enumValue ? g_strdup(enumValue->value_nick) : nullptr;
+    g_type_class_unref(enumClass);
+    GUniquePtr<char> result(representation);
+    return result.get();
+#endif
+}
diff -urpN webkitgtk-2.44.0.gtk/Source/WTF/wtf/glib/GLibUtilities.h webkitgtk-2.44.0.glib244/Source/WTF/wtf/glib/GLibUtilities.h
--- webkitgtk-2.44.0.gtk/Source/WTF/wtf/glib/GLibUtilities.h	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.44.0.glib244/Source/WTF/wtf/glib/GLibUtilities.h	2024-03-22 15:53:53.356694968 -0500
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2010 Igalia, S.L.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GLibUtilities_h
+#define GLibUtilities_h
+
+#include <glib-object.h>
+#include <wtf/Assertions.h>
+#include <wtf/text/CString.h>
+
+WTF_EXPORT_PRIVATE CString enumToString(GType, guint value);
+
+// These might be added to glib in the future, but in the meantime they're defined here.
+#ifndef GULONG_TO_POINTER
+#define GULONG_TO_POINTER(ul) ((gpointer) (gulong) (ul))
+#endif
+
+#ifndef GPOINTER_TO_ULONG
+#define GPOINTER_TO_ULONG(p) ((gulong) (p))
+#endif
+
+#endif
diff -urpN webkitgtk-2.44.0.gtk/Source/WTF/wtf/PlatformGTK.cmake webkitgtk-2.44.0.glib244/Source/WTF/wtf/PlatformGTK.cmake
--- webkitgtk-2.44.0.gtk/Source/WTF/wtf/PlatformGTK.cmake	2024-03-16 01:45:49.644672600 -0500
+++ webkitgtk-2.44.0.glib244/Source/WTF/wtf/PlatformGTK.cmake	2024-03-22 15:53:53.356694968 -0500
@@ -2,6 +2,7 @@ set(WTF_OUTPUT_NAME WTFGTK)
 
 list(APPEND WTF_PUBLIC_HEADERS
     glib/ChassisType.h
+    glib/GLibUtilities.h
     glib/GMutexLocker.h
     glib/GRefPtr.h
     glib/GSocketMonitor.h
@@ -37,6 +38,7 @@ list(APPEND WTF_SOURCES
 
     glib/ChassisType.cpp
     glib/FileSystemGlib.cpp
+    glib/GLibUtilities.cpp
     glib/GRefPtr.cpp
     glib/GSocketMonitor.cpp
     glib/RunLoopGLib.cpp
diff -urpN webkitgtk-2.44.0.gtk/Tools/glib/generate-modern-media-controls-gresource-manifest.py webkitgtk-2.44.0.glib244/Tools/glib/generate-modern-media-controls-gresource-manifest.py
--- webkitgtk-2.44.0.gtk/Tools/glib/generate-modern-media-controls-gresource-manifest.py	2024-03-16 01:45:51.856669200 -0500
+++ webkitgtk-2.44.0.glib244/Tools/glib/generate-modern-media-controls-gresource-manifest.py	2024-03-22 15:54:02.970063157 -0500
@@ -54,7 +54,7 @@ if __name__ == "__main__":
         extra_attributes = ""
         if extension == "svg":
             extra_attributes = 'preprocess="xml-stripblanks"'
-        args.output.write(f'{indent}<file compressed="true" {extra_attributes} alias="{alias}">{path}</file>\n')
+        args.output.write(indent + '<file compressed="true" ' + extra_attributes + ' alias="' + alias + '">' + path + '</file>\n')
 
     args.output.write("""    </gresource>
 </gresources>
