-From 0a008a6c7ecee19f35c8b7ab17b1470d0d1a8a15 Mon Sep 17 00:00:00 2001
+From b8ba462ae72e0818898357464263ec84722f6d4c Mon Sep 17 00:00:00 2001
 From: Jan Tojnar <jtojnar@gmail.com>
 Date: Sat, 26 Mar 2022 02:26:27 +0100
 Subject: [PATCH] gnome: Fix gtkdoc when using multiple Apple frameworks

+                external_ldflags.extend(ldflag)
 
+        return cflags, internal_ldflags, external_ldflags, gi_includes, depends
     def _unwrap_gir_target(self, girtarget, state):
         if not isinstance(girtarget, (build.Executable, build.SharedLibrary,
                                       build.StaticLibrary)):
@@ -875,7 +903,7 @@ class GnomeModule(ExtensionModule):
         # ldflags will be misinterpreted by gir scanner (showing
         # spurious dependencies) but building GStreamer fails if they
         # are not used here.
-        dep_cflags, dep_internal_ldflags, dep_external_ldflags, gi_includes = \
+        dep_cflags, dep_internal_ldflags, dep_external_ldflags, gi_includes, depends = \
             self._get_dependencies_flags(deps, state, depends, use_gir_args=True)
         scan_cflags = []
         scan_cflags += list(self._get_scanner_cflags(cflags))
@@ -1170,7 +1198,7 @@ class GnomeModule(ExtensionModule):
         deps = extract_as_list(kwargs, 'dependencies')
         cflags = []
         cflags.extend(mesonlib.stringlistify(kwargs.pop('c_args', [])))
-        deps_cflags, internal_ldflags, external_ldflags, gi_includes = \
+        deps_cflags, internal_ldflags, external_ldflags, gi_includes, depends = \
             self._get_dependencies_flags(deps, state, depends, include_rpath=True)
         inc_dirs = mesonlib.extract_as_list(kwargs, 'include_directories')
         for incd in inc_dirs:

Also pick https://github.com/mesonbuild/meson/commit/68e684d51f1e469e0d9f4b499ffda15146cad98a when resolving conflict.

diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 214f97ac3..0521b2605 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -593,15 +593,16 @@ class GnomeModule(ExtensionModule):
                        lib: T.Union[build.SharedLibrary, build.StaticLibrary],
                        depends: T.List[build.BuildTarget],
                        include_rpath: bool = False,
-                       use_gir_args: bool = False) -> T.List[str]:
+                       use_gir_args: bool = False) -> T.Tuple[T.List[str], T.List[T.Union[build.BuildTarget, 'build.GeneratedTypes', 'FileOrString']]]:
         link_command: T.List[str] = []
+        new_depends = list(depends)
         # Construct link args
         if isinstance(lib, build.SharedLibrary):
