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
This commit is contained in:
Nirbheek Chauhan 2022-12-30 16:55:47 +05:30
parent 6abafd64d8
commit 71438c44b7
2 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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