From ab0e84257a65bc219b361bf23fb077238a61784a Mon Sep 17 00:00:00 2001 From: deepend Date: Mon, 23 Feb 2026 10:50:53 -0700 Subject: [PATCH] Replaced gnome.genmarshal() usage with explicit Meson custom_target() rules that generate both marshal.h and marshal.c from marshalers.list, preserving the same marshaller prefix and generated outputs consumed by the build. Added a direct find_program() lookup for glib-genmarshal (with glib-genmarshal-2.0 fallback), so configuration no longer depends on the broken glib-2.0 pkg-config tool variable (glib_genmarshal) reported in your error. --- src/common/meson.build | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/common/meson.build b/src/common/meson.build index f5556fe4..0d651787 100644 --- a/src/common/meson.build +++ b/src/common/meson.build @@ -55,12 +55,39 @@ if host_machine.system() == 'windows' common_includes += include_directories('sysinfo') endif -marshal = gnome.genmarshal('marshal', - sources: 'marshalers.list', - prefix: '_zoitechat_marshal', - internal: true +glib_genmarshal = find_program( + 'glib-genmarshal', + 'glib-genmarshal-2.0', + required: true, ) +marshal = [ + custom_target('marshal_h', + input: 'marshalers.list', + output: 'marshal.h', + command: [ + glib_genmarshal, + '--prefix=_zoitechat_marshal', + '--header', + '@INPUT@', + '--output', + '@OUTPUT@', + ] + ), + custom_target('marshal_c', + input: 'marshalers.list', + output: 'marshal.c', + command: [ + glib_genmarshal, + '--prefix=_zoitechat_marshal', + '--body', + '@INPUT@', + '--output', + '@OUTPUT@', + ] + ) +] + make_te = find_program('make-te.py') textevents = custom_target('textevents',