From 71438c44b7e92789374159b0c8db0378986c8417 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 30 Dec 2022 16:55:47 +0530 Subject: [PATCH] meson: Don't accidentally pick up intl fallback in the first test If proxy-libintl has already been configured before we get to glib, we will pick that up in dependency('intl'), which then does compiler checks on it. This was written to assume that the first check will not find a subproject for libintl, so force it with allow_fallback: false. Also update the proxy-libintl wrap file and get rid of the explicit subproject() call. Reported by Benjamin Gilbert at https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3172 --- meson.build | 5 +++-- subprojects/proxy-libintl.wrap | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 1a15b4365..83bea942c 100644 --- a/meson.build +++ b/meson.build @@ -2090,7 +2090,7 @@ libz_dep = dependency('zlib') # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible # implementations. This could be extended if issues are found in some platforms. libintl_deps = [] -libintl = dependency('intl', required: false) +libintl = dependency('intl', required: false, allow_fallback: false) if libintl.found() # libintl supports different threading APIs, which may not # require additional flags, but it defaults to using pthreads if @@ -2116,7 +2116,8 @@ endif if libintl.found() have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps) else - libintl = subproject('proxy-libintl').get_variable('intl_dep') + libintl = dependency('intl', allow_fallback: true) + assert(libintl.type_name() == 'internal') libintl_deps = [libintl] have_bind_textdomain_codeset = true # proxy-libintl supports it endif diff --git a/subprojects/proxy-libintl.wrap b/subprojects/proxy-libintl.wrap index 0e6c8529c..dae4adfeb 100644 --- a/subprojects/proxy-libintl.wrap +++ b/subprojects/proxy-libintl.wrap @@ -1,5 +1,8 @@ [wrap-git] -directory=proxy-libintl -url=https://github.com/frida/proxy-libintl.git -revision=c03e1a74b17fa7ec467e110130775409e4828a4c +directory = proxy-libintl +url = https://github.com/frida/proxy-libintl.git +revision = 0.4 depth=1 + +[provide] +intl = intl_dep