![Fabrice Fontaine](/assets/img/avatar_default.png)
The build fails if libintl.h is found but xgettext is not available: Has header "libintl.h" : YES Library intl found: NO po/meson.build:28:5: ERROR: Can not do gettext because xgettext is not installed. This is because enable_nls defaults to true if libintl.h is found. Use the nls option to enable/disable NLS explicitly, depending on BR2_SYSTEM_ENABLE_NLS, Also, fix the second patch to always look for libintl, even if NLS is not enabled. The enable_nls option disables processing the po files, but the gettext calls in the source are still there, so we need to link with libintl anyway. Fixes: - http://autobuild.buildroot.org/results/0ab0a42fd4c5c9fd5891f3b84287bd788f763ba4 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
From 21ad6bf2bcb0745c25a28637449a72eee883a8e2 Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Sun, 21 Apr 2019 19:19:10 +0200
|
|
Subject: [PATCH] meson.build: link with lintl if needed
|
|
|
|
Fixes:
|
|
- http://autobuild.buildroot.org/results/d53978fb30d77cb4d10921bf721eff3d066567ce
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
[Upstream status: not sent as upstream already rejected the first patch
|
|
on atomic: https://github.com/MusicPlayerDaemon/ncmpc/pull/45]
|
|
---
|
|
meson.build | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index 2e6defc..28e9d29 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -42,6 +42,7 @@ else
|
|
error('libintl.h not found')
|
|
endif
|
|
conf.set('ENABLE_NLS', enable_nls)
|
|
+intl_dep = cc.find_library('intl', required: false)
|
|
if enable_nls
|
|
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
|
subdir('po')
|
|
@@ -356,6 +357,7 @@ ncmpc = executable('ncmpc',
|
|
boost_dep,
|
|
pcre_dep,
|
|
curses_dep,
|
|
+ intl_dep,
|
|
lirc_dep,
|
|
libmpdclient_dep,
|
|
],
|
|
--
|
|
2.20.1
|
|
|