# HG changeset patch
# Node ID e8757c97efa7
# Parent  a9447c1653a5
diff --git a/finch/meson.build b/finch/meson.build
--- a/finch/meson.build
+++ b/finch/meson.build
@@ -151,6 +151,7 @@
 # the built lists are append to below
 libfinch_built_sources = []
 libfinch_built_headers = []
+libfinch_generated_sources = []
 
 finch_SOURCES = [
 	'finch.c'
@@ -203,10 +204,38 @@
 	    version : PURPLE_LIB_VERSION,
 	    dependencies : [libpurple_dep, libgnt_dep, ncurses, glib, winmm],
 	    install : true)
+
+	if enable_introspection
+		introspection_sources = libfinch_headers
+
+		Finch_gir_includes = [
+			libgnt_gir[0],
+			'GPlugin-1.0',
+			# subproject needs to be before libpurple in the repo so that
+			# meson will use our variables and not try to discover them from
+			# libpurple.
+			libpurple_gir[0],
+		]
+
+		libfinch_gir = gnome.generate_gir(libfinch,
+		    sources : introspection_sources,
+		    includes : Finch_gir_includes,
+		    namespace : 'Finch',
+		    symbol_prefix : 'finch',
+		    identifier_prefix : 'Finch',
+		    export_packages : 'finch',
+		    nsversion : '@0@.@1@'.format(purple_major_version,
+		                                 purple_minor_version),
+		    install : true,
+		    dependencies: [libgnt_dep, gplugin_dep],
+		    extra_args : ['-DFINCH_COMPILATION', '--quiet'])
+		libfinch_generated_sources += libfinch_gir
+	endif
+
 	libfinch_dep = declare_dependency(
 	    include_directories : [toplevel_inc, libfinch_inc],
 	    link_with : libfinch,
-	    sources: libfinch_built_headers,
+	    sources: libfinch_built_headers + libfinch_generated_sources,
 	    dependencies : [libpurple_dep, libgnt_dep, glib])
 
 	finch = executable('finch3',
@@ -229,30 +258,5 @@
 	    requires : ['gnt', 'purple-3'],
 	    variables : ['plugindir=${libdir}/finch-@0@'.format(purple_major_version)])
 
-	if enable_introspection
-		introspection_sources = libfinch_headers
-
-		Finch_gir_includes = [
-			libgnt_gir[0],
-			'GPlugin-1.0',
-			# subproject needs to be before libpurple in the repo so that
-			# meson will use our variables and not try to discover them from
-			# libpurple.
-			libpurple_gir[0],
-		]
-
-		gnome.generate_gir(libfinch,
-		    sources : introspection_sources,
-		    includes : Finch_gir_includes,
-		    namespace : 'Finch',
-		    symbol_prefix : 'finch',
-		    identifier_prefix : 'Finch',
-		    export_packages : 'finch',
-		    nsversion : '@0@.@1@'.format(purple_major_version,
-		                                 purple_minor_version),
-		    install : true,
-		    extra_args : ['-DFINCH_COMPILATION', '--quiet'])
-	endif
-
 	subdir('plugins')
 endif  # enable_consoleui
diff --git a/libpurple/meson.build b/libpurple/meson.build
--- a/libpurple/meson.build
+++ b/libpurple/meson.build
@@ -188,6 +188,8 @@
 	'xmlnode.h',
 ]
 
+purple_generated_sources = []
+
 purple_filebase = 'purple-@0@'.format(purple_major_version)
 purple_include_base = purple_filebase / 'libpurple'
 
@@ -289,23 +291,12 @@
                          libxml, farstream, gstreamer, gstreamer_video,
                          gstreamer_app, json, math])
 
-libpurple_dep = declare_dependency(
-    # Ensure purple headers built before any dependencies:
-    sources : [purple_builtheaders],
-    include_directories : [toplevel_inc, libpurple_inc],
-    link_with : libpurple,
-    dependencies : [gstreamer, gplugin_dep, glib, gio])
-
 install_headers(purple_coreheaders,
                 subdir : purple_include_base)
 
 install_headers(purple_mediaheaders,
                 subdir : purple_include_base / 'media')
 
-if meson.version().version_compare('>=0.54.0')
-	meson.override_dependency(purple_filebase, libpurple_dep)
-endif
-
 pkgconfig.generate(
     name : 'libpurple',
     description : 'libpurple is a GLib-based instant messenger library.',
@@ -332,9 +323,22 @@
 	    export_packages : purple_filebase,
 	    nsversion : '@0@.@1@'.format(purple_major_version,
 	                                 purple_minor_version),
-	    dependencies: [ gplugin_dep ],
+	    dependencies: [gplugin_dep],
 	    install : true,
 	    extra_args : ['-DPURPLE_COMPILATION', '--quiet'])
+
+	purple_generated_sources += libpurple_gir
+endif
+
+libpurple_dep = declare_dependency(
+    # Ensure purple headers built before any dependencies:
+    sources : [purple_builtheaders] + purple_generated_sources,
+    include_directories : [toplevel_inc, libpurple_inc],
+    link_with : libpurple,
+    dependencies : [gstreamer, gplugin_dep, glib, gio])
+
+if meson.version().version_compare('>=0.54.0')
+	meson.override_dependency(purple_filebase, libpurple_dep)
 endif
 
 PURPLE3_URL_HANDLER_DESKTOP = 'purple3-url-handler.desktop'
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -571,12 +571,12 @@
 # Check for GPlugin
 #######################################################################
 gplugin_dep = dependency('gplugin',
-	version : ['>=0.33.0', '<0.34.0'],
+	version : ['>=0.34.1', '<0.35.0'],
 	fallback : ['gplugin', 'gplugin_dep'])
 
 if get_option('gtkui')
 	gplugin_gtk_dep = dependency('gplugin-gtk',
-		version : ['>=0.33.0', '<0.34.0'],
+		version : ['>=0.34.1', '<0.35.0'],
 		fallback : ['gplugin-gtk', 'gplugin_gtk_dep'])
 endif
 
diff --git a/pidgin/meson.build b/pidgin/meson.build
--- a/pidgin/meson.build
+++ b/pidgin/meson.build
@@ -332,9 +332,7 @@
 			export_packages : 'pidgin-@0@'.format(purple_major_version),
 			nsversion : '@0@.@1@'.format(purple_major_version,
 			                             purple_minor_version),
-			include_directories : [
-				talkatu_include_directories,
-			],
+			dependencies : [gplugin_dep, gplugin_gtk_dep, talkatu_dep],			
 			install : true,
 			extra_args : ['-DPIDGIN_COMPILATION', '--quiet'])
 	endif
diff --git a/subprojects/gplugin.wrap b/subprojects/gplugin.wrap
--- a/subprojects/gplugin.wrap
+++ b/subprojects/gplugin.wrap
@@ -1,4 +1,4 @@
 [wrap-hg]
 directory = gplugin
 url = https://keep.imfreedom.org/gplugin/gplugin
-revision = v0.33.0
+revision = v0.34.1
