From 4a93bea2031e4967dce482b9413b8aba15924118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Tue, 27 May 2025 19:04:40 +0200 Subject: [PATCH] Revert "meson: Remove GIR init section" This reverts commit b05f0f2b30057b49baeb24c809bcedc8f2965042. --- src/lib/clapper-gtk/meson.build | 1 + src/lib/clapper/meson.build | 1 + src/lib/meson.build | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/src/lib/clapper-gtk/meson.build b/src/lib/clapper-gtk/meson.build index 026422dc..f2dacb82 100644 --- a/src/lib/clapper-gtk/meson.build +++ b/src/lib/clapper-gtk/meson.build @@ -176,6 +176,7 @@ if build_gir clappergtk_enums, ], extra_args: [ + gir_init_section, '--quiet', '--warn-all', '-DCLAPPER_GTK_COMPILATION', diff --git a/src/lib/clapper/meson.build b/src/lib/clapper/meson.build index 8e2d1afd..77de1517 100644 --- a/src/lib/clapper/meson.build +++ b/src/lib/clapper/meson.build @@ -235,6 +235,7 @@ if build_gir clapper_enums, ], extra_args: [ + gir_init_section, '--quiet', '--warn-all', '-DCLAPPER_COMPILATION', diff --git a/src/lib/meson.build b/src/lib/meson.build index fc93cc90..70569fb3 100644 --- a/src/lib/meson.build +++ b/src/lib/meson.build @@ -4,6 +4,12 @@ build_gir = (gir.found() and not get_option('introspection').disabled()) vapigen = find_program('vapigen', required: get_option('vapi')) build_vapi = (vapigen.found() and not get_option('vapi').disabled()) +gir_init_section = '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ + 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ + 'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \ + 'gst_init(NULL,NULL);' + subdir('gst') subdir('clapper') subdir('clapper-gtk')