From ede2251c36f78980bdc70a9f3fb411f6f526d8ef Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 27 Oct 2026 12:10:37 -0400 Subject: [PATCH] meson: port off of deprecated functions meson.source_root() is deprecated since 0.56, and should be replaced with either project_source_root or global_source_root depending on whether it is supposed to refer to a different subproject if the current project is a subproject. The default for source_root itself was the latter, which is broken in subproject builds, and is also incorrect for us since our usage is to construct the path to a file that is part of the zoitechat source tree. Make this work semantically correctly by specifically accessing the root of the current (sub)project, and fix a deprecation warning in the process. Signed-off-by: Eli Schwartz --- plugins/perl/meson.build | 2 +- src/fe-gtk/meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/perl/meson.build b/plugins/perl/meson.build index a2d215ef..aa7a16af 100644 --- a/plugins/perl/meson.build +++ b/plugins/perl/meson.build @@ -79,7 +79,7 @@ perl_cflags += ['-Wno-strict-prototypes'] perl_cflags += [ # Perl has its own 'config.h' that we must override # TODO: Just rename ours to something more unique. - '-include', meson.build_root() + '/config.h' + '-include', meson.project_build_root() + '/config.h' ] if not cc.links(''' diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build index 699d0ccc..fa8c2c6c 100644 --- a/src/fe-gtk/meson.build +++ b/src/fe-gtk/meson.build @@ -167,7 +167,7 @@ emoji_ui_tests = executable('emoji_ui_tests', dependencies: emoji_font_deps, ) test('Emoji UI Tests', emoji_ui_tests, - env: ['ZOITECHAT_EMOJI_FONT=' + join_paths(meson.source_root(), 'data/fonts/NotoColorEmoji.ttf')], + env: ['ZOITECHAT_EMOJI_FONT=' + join_paths(meson.project_source_root(), 'data/fonts/NotoColorEmoji.ttf')], protocol: 'tap', timeout: 120, ) @@ -291,7 +291,7 @@ emoji_font_tests = executable('emoji_font_tests', dependencies: emoji_font_deps, ) test('Emoji Font Tests', emoji_font_tests, - env: ['ZOITECHAT_EMOJI_FONT=' + join_paths(meson.source_root(), 'data/fonts/NotoColorEmoji.ttf')], + env: ['ZOITECHAT_EMOJI_FONT=' + join_paths(meson.project_source_root(), 'data/fonts/NotoColorEmoji.ttf')], protocol: 'tap', timeout: 120, )