[Buildroot] [PATCH v2] gnupg2: fix linking with intl

Vicente Olivert Riera Vincent.Riera at imgtec.com
Thu Dec 11 12:06:51 UTC 2014


gnupg2 needs to link with intl if the gettext package is selected.
Otherwise we will see an error like this one:

libgpg-error.a(libgpg_error_la-strsource.o): In function
`gpg_strsource':
strsource.c:(.text+0x4c): undefined reference to `libintl_dgettext'

Fixes:
  http://autobuild.buildroot.net/results/9aa/9aaca74dd3a1f82e12358530db4d5d17eb833f7f/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com>
---
Changes v1 -> v2:
- Remove "select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE" 
  from Config.in
- Replace $(BR2_NEEDS_GETTEXT_IF_LOCALE) with $(BR2_PACKAGE_GETTEXT)
- Amend the commit message according to the new changes

 package/gnupg2/gnupg2.mk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
index 2d133aa..69c510e 100644
--- a/package/gnupg2/gnupg2.mk
+++ b/package/gnupg2/gnupg2.mk
@@ -20,6 +20,11 @@ GNUPG2_CONF_OPTS = \
 	--with-pth-prefix=$(STAGING_DIR)/usr
 GNUPG2_CONF_ENV = gl_cv_header_working_stdint_h=yes
 
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+GNUPG2_DEPENDENCIES += gettext
+GNUPG2_CONF_ENV += LIBS=-lintl
+endif
+
 ifneq ($(BR2_PACKAGE_GNUPG2_GPGV2),y)
 define GNUPG2_REMOVE_GPGV2
 	rm -f $(TARGET_DIR)/usr/bin/gpgv2
-- 
1.7.1




More information about the buildroot mailing list