package/ncmpc: fix build without NLS
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 10 Jun 2019 09:51:46 +0000 (11:51 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Mon, 10 Jun 2019 14:39:46 +0000 (16:39 +0200)
commit56fb7401b9a69cb9ffac09a7a02d65706765e7ba
tree5a8a44b01df28ae9173462128bcdd11dc7e88c98
parent5e2c3c390b3cfa04b3d9f9c1dad686ec013d77f8
package/ncmpc: fix build without NLS

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>
package/ncmpc/0002-meson.build-link-with-lintl-if-needed.patch
package/ncmpc/ncmpc.mk