Last active
September 10, 2022 15:33
-
-
Save rkitover/05fb70a11cc8ddcea11230b4dc5fd48b to your computer and use it in GitHub Desktop.
glib patch for linking static gettext/libintl on macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- glib-original/meson.build 2022-09-05 07:38:33.000000000 +0000 | |
+++ glib/meson.build 2022-09-10 15:22:47.000000000 +0000 | |
@@ -2091,7 +2091,9 @@ | |
# 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) | |
+libiconv = dependency('iconv', required: false) | |
+mac_cf = dependency('appleframeworks', modules : ['CoreFoundation'], required: false) | |
if libintl.found() | |
# libintl supports different threading APIs, which may not | |
# require additional flags, but it defaults to using pthreads if | |
@@ -2102,12 +2104,12 @@ | |
# | |
# Meson's builtin dependency lookup as of 0.60.0 doesn't check for | |
# pthread, so we do this manually here. | |
- if cc.has_function('ngettext', dependencies : libintl) | |
- libintl_deps += [libintl] | |
+ if cc.has_function('ngettext', dependencies : [libintl, libiconv, mac_cf]) | |
+ libintl_deps += [libintl, libiconv, mac_cf] | |
else | |
libintl_pthread = cc.find_library('pthread', required : false) | |
- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread]) | |
- libintl_deps += [libintl, libintl_pthread] | |
+ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread, libiconv, mac_cf]) | |
+ libintl_deps += [libintl, libintl_pthread, libiconv, mac_cf] | |
else | |
libintl = disabler() | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment