Message ID | 20160824231003.29262-1-arnout@mind.be |
---|---|
State | Changes Requested |
Headers | show |
Hello, On Thu, 25 Aug 2016 01:10:02 +0200, Arnout Vandecappelle (Essensium/Mind) wrote: > +ifeq ($(BR2_NEEDS_GETTEXT),y) > +LIBGPG_ERROR_DEPENDENCIES += gettext > +endif If you add gettext as a dependency, then the Config.in should be adjust accordingly, otherwise the mechanism that checks when a package gets built that it is really selected in the configuration will abort the build. The manual at https://buildroot.org/downloads/manual/manual.html#_gettext_integration_and_interaction_with_packages has some details on the gettext interaction: """ Packages that need gettext only when locale support is enabled should: - use select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE in the Config.in file; - use $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) in the package DEPENDENCIES variable in the .mk file. Packages that unconditionally need gettext (which should be very rare) should: - use select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT in the Config.in file; - use $(if $(BR2_NEEDS_GETTEXT),gettext) in the package DEPENDENCIES variable in the .mk file. """ Then I believe there's possibly a *third* case, which the manual doesn't describe, but that we should document: packages that *may* use gettext if available, but which can work without it. In this case: ifeq ($(BR2_PACKAGE_GETTEXT),y) <pkg>_DEPENDENCIES += gettext endif would be the correct solution. Thomas
diff --git a/package/libgpg-error/libgpg-error.mk b/package/libgpg-error/libgpg-error.mk index e081b36..dfe58e7 100644 --- a/package/libgpg-error/libgpg-error.mk +++ b/package/libgpg-error/libgpg-error.mk @@ -11,6 +11,10 @@ LIBGPG_ERROR_LICENSE_FILES = COPYING COPYING.LIB LIBGPG_ERROR_INSTALL_STAGING = YES LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config +ifeq ($(BR2_NEEDS_GETTEXT),y) +LIBGPG_ERROR_DEPENDENCIES += gettext +endif + define LIBGPG_ERROR_FIX_CROSS_COMPILATION cd $(@D)/src/syscfg && \ ln -s lock-obj-pub.$(call qstrip, $(BR2_PACKAGE_LIBGPG_ERROR_SYSCFG)).h \
configure.ac has AM_GNU_GETTEXT() Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> --- Discovered while investigating http://autobuild.buildroot.net/results/f81/f81eabb37788aa6dcdadf4034889c84bef78b876/ I suspect there are many more packages like this... Perhaps it would make sense to consider gettext (and therefore libiconv) to be part of the toolchain... --- package/libgpg-error/libgpg-error.mk | 4 ++++ 1 file changed, 4 insertions(+)