summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-12-30 16:55:47 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2022-12-31 05:13:10 +0530
commit71438c44b7e92789374159b0c8db0378986c8417 (patch)
treec3fb0d2d37e4d415d371fd9931d4287e0e6e5a37
parent6abafd64d821af86738aaa751a2447cf2ac1a20d (diff)
downloadglib-71438c44b7e92789374159b0c8db0378986c8417.tar.gz
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
-rw-r--r--meson.build5
-rw-r--r--subprojects/proxy-libintl.wrap9
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