package/libglib2: fix libintl support
PATCH 1/1 package/libglib2: fix libintl support
Commit 12ba3563655e3ebab252e52daa6c710864fa869f disabled support for wrap downloads, which is used to fetch a
fallback libintl implementation if needed. So add one ourselves, the files are fetched from https://github.com/frida/proxy-libintl/tree/0.4.
---
No upstream patch has been provided yet because it's not clear if this is applicable, perhaps, meson-based packages should have download infrastructure for those wrap downloads.
--- .checkpackageignore | 2 + ...0004-build-move-intl-to-a-subproject.patch | 1016 +++++++++++++++++ ...fallback-to-proxy-libintl-subproject.patch | 29 + 3 files changed, 1047 insertions(+) create mode 100644 package/libglib2/0004-build-move-intl-to-a-subproject.patch create mode 100644 package/libglib2/0005-meson-fallback-to-proxy-libintl-subproject.patch
.checkpackageignore +2 -0
@@ -634,6 +634,8 @@ package/libfuse/0002-util-ulockmgr_server-c-conditionally-define-closefrom-fix-g package/libgcrypt/0001-configure.ac-add-an-option-to-disable-tests.patch Upstream package/libglfw/0001-Wayland-Remove-extra-cmake-modules-dependency.patch Upstream package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch Upstream +package/libglib2/0004-build-move-intl-to-a-subproject.patch Upstream +package/libglib2/0005-meson-fallback-to-proxy-libintl-subproject.patch Upstream package/libgpiod/0001-build-add-a-configure-switch-for-building-examples.patch Upstream package/libgsm/0001-misc-fixes-from-archlinux.patch Upstream package/libgtk2/0001-reduce-dependencies.patch Upstream
package/libglib2/0004-build-move-intl-to-a-subproject.patch new file +1016 -0
1,016 lines not on this page · raw message
package/libglib2/0005-meson-fallback-to-proxy-libintl-subproject.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 537484faba100c22f4f6ff941701375907657071 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt <[email protected]> +Date: Sat, 13 Jan 2024 19:21:06 +0100 +Subject: [PATCH] meson: fallback to proxy-libintl subproject + +This partially reverts 71438c44b7e92789374159b0c8db0378986c8417. + +Signed-off-by: Thomas Devoogdt <[email protected]> +--- + meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 0cbc9689f..82b74a9e1 100644 +--- a/meson.build ++++ b/meson.build +@@ -2115,8 +2115,7 @@ endif + if libintl.found() + have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps) + else +- libintl = dependency('intl', allow_fallback: true) +- assert(libintl.type_name() == 'internal') ++ libintl = subproject('proxy-libintl').get_variable('intl_dep') + libintl_deps = [libintl] + have_bind_textdomain_codeset = true # proxy-libintl supports it + endif +-- +2.34.1 +
Signature · 7 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas, All,
On 2024-01-13 19:37 +0100, Thomas Devoogdt spake thusly:
Quoted 4 lines
Commit
12ba3563655e3ebab252e52daa6c710864fa869fdisabled support for wrap downloads, which is used to fetch a
fallback libintl implementation if needed. So add one ourselves, the files are fetched from https://github.com/frida/proxy-libintl/tree/0.4.
Isn't the fix jsut a matter of passing;
-Dnls=$(if $(BR2_SYSTEM_ENABLE_NLS),enabled,disabled)
in the _CONF_OPTS ?
See the review of the 2.76.4 bump:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Quoted 4 lines
Signed-off-by Thomas Devoogdt <[email protected]>---
Regards,
Yann E. MORIN.
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Yann,
I also thought that at first sight. I even patched the meson file to skip it altogether when NLS is not enabled. By this, the configure step was ok, but then, I got include errors later on. But this is perhaps just a bug on their side. Will need some time to dig further.
Kind regards,
Thomas
Op zo 14 jan 2024 om 13:02 schreef Yann E. MORIN <[email protected]>:
Quoted 25 lines
Thomas, All,
On 2024-01-13 19:37 +0100, Thomas Devoogdt spake thusly:
Quoted 4 lines
Commit
12ba3563655e3ebab252e52daa6c710864fa869fdisabled support for wrap downloads, which is used to fetch a
fallback libintl implementation if needed. So add one ourselves, the files are fetched from https://github.com/frida/proxy-libintl/tree/0.4.Isn't the fix jsut a matter of passing;
-Dnls=$(if $(BR2_SYSTEM_ENABLE_NLS),enabled,disabled)in the
_CONF_OPTS?See the review of the 2.76.4 bump:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Quoted 4 lines
Signed-off-by Thomas Devoogdt <[email protected]>---
Regards,
Yann E. MORIN.
Quoted 8 lines
--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/libglib2: fix libiconv (intl) support
Libglib2 can compile without localization support, but still depends on libiconv, which is selected in Config.in.
This fallback support was broken, and is fixed in this upstream commit:
https://gitlab.gnome.org/GNOME/glib/-/commit/a497d5be122f193dcf8679334308333bbbc14a71
The other patch is purely added to avoid merge conflicts while cherry-picking.
---
v2: dropped meson libintl wrap, problem was the libiconv detection
--- ...ion-of-a-system-provided-proxy-libin.patch | 53 +++++++++++++++++++ ...05-meson-try-iconv-in-libintl-lookup.patch | 53 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 package/libglib2/0004-meson-Fix-detection-of-a-system-provided-proxy-libin.patch create mode 100644 package/libglib2/0005-meson-try-iconv-in-libintl-lookup.patch
package/libglib2/0004-meson-Fix-detection-of-a-system-provided-proxy-libin.patch new file +53 -0
@@ -0,0 +1,53 @@ +From 2ca9f53327308e85e376bcbef7f8259a6331a453 Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan <[email protected]> +Date: Thu, 8 Sep 2022 02:36:33 +0530 +Subject: [PATCH] meson: Fix detection of a system-provided proxy-libintl + +proxy-libintl defines ngettext() as a define in the header that points +to the actual symbol in the library which is g_libintl_ngettext(). +Same with bind_textdomain_codeset(). + +Upstream: https://gitlab.gnome.org/GNOME/glib/-/commit/32249a22fc39319651e7c23442d37ec837f05764 +Signed-off-by: Thomas Devoogdt <[email protected]> +--- + meson.build | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index 0cbc9689f..de0bee5a3 100644 +--- a/meson.build ++++ b/meson.build +@@ -2089,6 +2089,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_prefix = '#include <libintl.h>' + libintl = dependency('intl', required: false, allow_fallback: false) + if libintl.found() + # libintl supports different threading APIs, which may not +@@ -2100,11 +2101,11 @@ if libintl.found() + # + # 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) ++ if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix) + libintl_deps += [libintl] + else + libintl_pthread = cc.find_library('pthread', required : false) +- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread]) ++ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix) + libintl_deps += [libintl, libintl_pthread] + else + libintl = disabler() +@@ -2113,7 +2114,7 @@ if libintl.found() + endif + + if libintl.found() +- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps) ++ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps, prefix: libintl_prefix) + else + libintl = dependency('intl', allow_fallback: true) + assert(libintl.type_name() == 'internal') +-- +2.34.1 +
package/libglib2/0005-meson-try-iconv-in-libintl-lookup.patch new file +53 -0
53 lines not on this page · raw message
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedRe: [Buildroot] [PATCH v2] package/libglib2: fix libiconv (intl) support
Quoted 11 lines · On Sun, 14 Jan 2024 19:41:11 +0100 Thomas Devoogdt <[email protected]> wrote:
Libglib2 can compile without localization support, but still depends on libiconv, which is selected in Config.in.
This fallback support was broken, and is fixed in this upstream commit:
https://gitlab.gnome.org/GNOME/glib/-/commit/a497d5be122f193dcf8679334308333bbbc14a71The other patch is purely added to avoid merge conflicts while cherry-picking.
Signed-off-by Thomas Devoogdt <[email protected]>
Quoted 8 lines
---
v2: dropped meson libintl wrap, problem was the libiconv detection--- ...ion-of-a-system-provided-proxy-libin.patch | 53 +++++++++++++++++++ ...05-meson-try-iconv-in-libintl-lookup.patch | 53 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 package/libglib2/0004-meson-Fix-detection-of-a-system-provided-proxy-libin.patch create mode 100644 package/libglib2/0005-meson-try-iconv-in-libintl-lookup.patch
Applied to master after doing some research to explain when the problem was introduced, so that Peter can more easily decide if this should be backported, and to which branches.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2] package/libglib2: fix libiconv (intl) support
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:
Quoted 11 lines · On Sun, 14 Jan 2024 19:41:11 +0100 Thomas Devoogdt <[email protected]> wrote:
Libglib2 can compile without localization support, but still depends on libiconv, which is selected in Config.in.
This fallback support was broken, and is fixed in this upstream commit:
https://gitlab.gnome.org/GNOME/glib/-/commit/a497d5be122f193dcf8679334308333bbbc14a71The other patch is purely added to avoid merge conflicts while cherry-picking.
Signed-off-by Thomas Devoogdt <[email protected]>Quoted 8 lines
---
v2: dropped meson libintl wrap, problem was the libiconv detection
---
...ion-of-a-system-provided-proxy-libin.patch | 53 +++++++++++++++++++ ...05-meson-try-iconv-in-libintl-lookup.patch | 53 +++++++++++++++++++2 files changed, 106 insertions(+)create mode 100644
package/libglib2/0004-meson-Fix-detection-of-a-system-provided-proxy-libin.patchcreate mode 100644package/libglib2/0005-meson-try-iconv-in-libintl-lookup.patch
Quoted 3 lines
Applied to master after doing some research to explain when the problem was introduced, so that Peter can more easily decide if this should be backported, and to which branches.
Thanks for that, so from that description I take it that only 2023.11.x is affected?
Committed to 2023.11.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot