diff -urpN webkitgtk-2.46.6.gtk/Source/cmake/FindGI.cmake webkitgtk-2.46.6.glib244/Source/cmake/FindGI.cmake
--- webkitgtk-2.46.6.gtk/Source/cmake/FindGI.cmake	2024-08-19 01:28:40.271245200 -0500
+++ webkitgtk-2.46.6.glib244/Source/cmake/FindGI.cmake	2025-02-11 10:23:28.702850865 -0600
@@ -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.46.6.gtk/Source/cmake/FindGLibCompileResources.cmake webkitgtk-2.46.6.glib244/Source/cmake/FindGLibCompileResources.cmake
--- webkitgtk-2.46.6.gtk/Source/cmake/FindGLibCompileResources.cmake	2024-08-19 01:28:40.271245200 -0500
+++ webkitgtk-2.46.6.glib244/Source/cmake/FindGLibCompileResources.cmake	2025-02-11 10:27:01.814661257 -0600
@@ -17,7 +17,7 @@ message(STATUS "Found glib-compile-resou
 
 set(glib_compile_resources_has_depfile_bug FALSE)
 if ("${glib_compile_resources_version}" VERSION_LESS 2.77)
-    set(glib_compile_resources_has_depfile_bug TRUE)
+    #set(glib_compile_resources_has_depfile_bug TRUE)
 endif ()
 
 function(GLIB_COMPILE_RESOURCES)
@@ -55,11 +55,10 @@ function(GLIB_COMPILE_RESOURCES)
         COMMAND ${GLIB_COMPILE_RESOURCES_EXECUTABLE}
                 --generate
                 --target=${ARG_OUTPUT}
-                --dependency-file=${ARG_OUTPUT}.deps
                 ${resource_dir_args}
                 ${ARG_SOURCE_XML}
                 ${additional_cmd_line}
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
         VERBATIM
     )
-endfunction()
\ No newline at end of file
+endfunction()
diff -urpN webkitgtk-2.46.6.gtk/Source/cmake/OptionsGTK.cmake webkitgtk-2.46.6.glib244/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.46.6.gtk/Source/cmake/OptionsGTK.cmake	2025-02-11 10:10:17.931306098 -0600
+++ webkitgtk-2.46.6.glib244/Source/cmake/OptionsGTK.cmake	2025-02-11 10:23:28.704010587 -0600
@@ -214,7 +214,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.46.6.gtk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp webkitgtk-2.46.6.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
--- webkitgtk-2.46.6.gtk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2025-02-11 10:10:05.632441822 -0600
+++ webkitgtk-2.46.6.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2025-02-11 10:23:28.705140359 -0600
@@ -86,6 +86,7 @@
 #include <gst/video/gstvideometa.h>
 #include <limits>
 #include <wtf/FileSystem.h>
+#include <wtf/glib/GLibUtilities.h>
 #include <wtf/MathExtras.h>
 #include <wtf/MediaTime.h>
 #include <wtf/NeverDestroyed.h>
@@ -2300,10 +2301,7 @@ void MediaPlayerPrivateGStreamer::update
     m_wasBuffering = m_isBuffering;
     m_previousBufferingPercentage = m_bufferingPercentage;
 
-#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);
 
     double highWatermark = 100.0;
     double lowWatermark = 100.0;
diff -urpN webkitgtk-2.46.6.gtk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp webkitgtk-2.46.6.glib244/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
--- webkitgtk-2.46.6.gtk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp	2024-10-21 04:00:02.719246400 -0500
+++ webkitgtk-2.46.6.glib244/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp	2025-02-11 10:23:28.707354267 -0600
@@ -4244,6 +4244,7 @@ WebKitFeatureList* webkit_settings_get_d
     return webkitFeatureListCreate(WebPreferences::internalDebugFeatures());
 }
 
+#if GLIB_CHECK_VERSION(2, 54, 0)
 /**
  * webkit_settings_apply_from_key_file:
  * @settings: a #WebKitSettings
@@ -4364,3 +4365,4 @@ gboolean webkit_settings_apply_from_key_
     g_object_setv(G_OBJECT(settings), propertyNames->len, const_cast<const char**>(reinterpret_cast<char**>(propertyNames->pdata)), reinterpret_cast<GValue*>(values->data));
     return TRUE;
 }
+#endif
diff -urpN webkitgtk-2.46.6.gtk/Source/WebKit/UIProcess/API/glib/WebKitSettings.h.in webkitgtk-2.46.6.glib244/Source/WebKit/UIProcess/API/glib/WebKitSettings.h.in
--- webkitgtk-2.46.6.gtk/Source/WebKit/UIProcess/API/glib/WebKitSettings.h.in	2024-08-19 01:28:39.967254400 -0500
+++ webkitgtk-2.46.6.glib244/Source/WebKit/UIProcess/API/glib/WebKitSettings.h.in	2025-02-11 10:23:28.708140428 -0600
@@ -569,11 +569,13 @@ webkit_settings_get_experimental_feature
 WEBKIT_API WebKitFeatureList *
 webkit_settings_get_development_features                       (void);
 
+#if GLIB_CHECK_VERSION(2, 54, 0)
 WEBKIT_API gboolean
 webkit_settings_apply_from_key_file                            (WebKitSettings  *settings,
                                                                 GKeyFile        *key_file,
                                                                 const gchar     *group_name,
                                                                 GError         **error);
+#endif
 
 G_END_DECLS
 
diff -urpN webkitgtk-2.46.6.gtk/Source/WTF/wtf/glib/GLibUtilities.cpp webkitgtk-2.46.6.glib244/Source/WTF/wtf/glib/GLibUtilities.cpp
--- webkitgtk-2.46.6.gtk/Source/WTF/wtf/glib/GLibUtilities.cpp	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.46.6.glib244/Source/WTF/wtf/glib/GLibUtilities.cpp	2025-02-11 10:23:28.709193162 -0600
@@ -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.46.6.gtk/Source/WTF/wtf/glib/GLibUtilities.h webkitgtk-2.46.6.glib244/Source/WTF/wtf/glib/GLibUtilities.h
--- webkitgtk-2.46.6.gtk/Source/WTF/wtf/glib/GLibUtilities.h	1969-12-31 18:00:00.000000000 -0600
+++ webkitgtk-2.46.6.glib244/Source/WTF/wtf/glib/GLibUtilities.h	2025-02-11 10:23:28.709364356 -0600
@@ -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.46.6.gtk/Source/WTF/wtf/PlatformGTK.cmake webkitgtk-2.46.6.glib244/Source/WTF/wtf/PlatformGTK.cmake
--- webkitgtk-2.46.6.gtk/Source/WTF/wtf/PlatformGTK.cmake	2024-08-19 01:28:38.539297800 -0500
+++ webkitgtk-2.46.6.glib244/Source/WTF/wtf/PlatformGTK.cmake	2025-02-11 10:23:28.709684300 -0600
@@ -7,6 +7,7 @@ list(APPEND WTF_SOURCES
     glib/Application.cpp
     glib/ChassisType.cpp
     glib/FileSystemGlib.cpp
+    glib/GLibUtilities.cpp
     glib/GRefPtr.cpp
     glib/GSocketMonitor.cpp
     glib/RunLoopGLib.cpp
@@ -29,6 +30,7 @@ list(APPEND WTF_SOURCES
 list(APPEND WTF_PUBLIC_HEADERS
     glib/Application.h
     glib/ChassisType.h
+    glib/GLibUtilities.h
     glib/GMutexLocker.h
     glib/GRefPtr.h
     glib/GSocketMonitor.h
diff -urpN webkitgtk-2.46.6.gtk/Tools/glib/generate-modern-media-controls-gresource-manifest.py webkitgtk-2.46.6.glib244/Tools/glib/generate-modern-media-controls-gresource-manifest.py
--- webkitgtk-2.46.6.gtk/Tools/glib/generate-modern-media-controls-gresource-manifest.py	2024-08-19 01:28:40.867227000 -0500
+++ webkitgtk-2.46.6.glib244/Tools/glib/generate-modern-media-controls-gresource-manifest.py	2025-02-11 10:23:28.710253717 -0600
@@ -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>
diff -urpN webkitgtk-2.46.6.gtk/Tools/MiniBrowser/gtk/main.c webkitgtk-2.46.6.glib244/Tools/MiniBrowser/gtk/main.c
--- webkitgtk-2.46.6.gtk/Tools/MiniBrowser/gtk/main.c	2025-02-11 10:10:17.960070371 -0600
+++ webkitgtk-2.46.6.glib244/Tools/MiniBrowser/gtk/main.c	2025-02-11 10:23:28.710800841 -0600
@@ -77,7 +77,9 @@ static gboolean enableITP;
 static gboolean exitAfterLoad;
 static gboolean webProcessCrashed;
 static gboolean printVersion;
+#if GLIB_CHECK_VERSION(2, 54, 0)
 static char *configFile;
+#endif
 static GSettings *interfaceSettings;
 
 #if !GTK_CHECK_VERSION(3, 98, 0)
@@ -182,7 +184,9 @@ static const GOptionEntry commandLineOpt
     { "exit-after-load", 0, 0, G_OPTION_ARG_NONE, &exitAfterLoad, "Quit the browser after the load finishes", NULL },
     { "time-zone", 't', 0, G_OPTION_ARG_STRING, &timeZone, "Set time zone", "TIMEZONE" },
     { "version", 'v', 0, G_OPTION_ARG_NONE, &printVersion, "Print the WebKitGTK version", NULL },
+#if GLIB_CHECK_VERSION(2, 54, 0)
     { "config", 'C', 0, G_OPTION_ARG_FILENAME, &configFile, "Path to a configuration file", "PATH" },
+#endif
     { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &uriArguments, 0, "[URL…]" },
     { 0, 0, 0, 0, 0, 0, 0 }
 };
@@ -1038,6 +1042,7 @@ int main(int argc, char *argv[])
     }
     g_option_context_free(context);
 
+#if GLIB_CHECK_VERSION(2, 54, 0)
     if (configFile) {
         g_autoptr(GFile) file = g_file_new_for_commandline_arg(configFile);
         g_autofree char* configFilePath = g_file_get_path(file);
@@ -1056,6 +1061,7 @@ int main(int argc, char *argv[])
 
         g_clear_pointer(&configFile, g_free);
     }
+#endif
 
     if (printVersion) {
         g_print("WebKitGTK %u.%u.%u",
