[Buildroot] [PATCH v2 master 1/2] popt: add to the "popt.pc" the dependency libintl

Fabio Porcedda fabio.porcedda at gmail.com
Tue Feb 24 15:02:19 UTC 2015


This change permits through pkg-config to retrive even the depenencies
that is useful for a static linking.

Signed-off-by: Fabio Porcedda <fabio.porcedda at gmail.com>
---
 package/popt/popt.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/popt/popt.mk b/package/popt/popt.mk
index 8ce64d4..e6d51c0 100644
--- a/package/popt/popt.mk
+++ b/package/popt/popt.mk
@@ -15,10 +15,19 @@ POPT_GETTEXTIZE = YES
 
 POPT_CONF_ENV = ac_cv_va_copy=yes
 
+define POPT_POST_PATCH_FIX_PC
+	$(SED) "s/Libs:/Libs.private: -lintl\nLibs:/" $(@D)/popt.pc.in
+endef
+
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 POPT_CONF_ENV += am_cv_lib_iconv=yes
 POPT_CONF_OPTS += --with-libiconv-prefix=$(STAGING_DIR)/usr
 endif
 
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+ POPT_DEPENDENCIES += gettext
+ POPT_POST_PATCH_HOOKS += POPT_POST_PATCH_FIX_PC
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.3.0



More information about the buildroot mailing list