popt: add to the "popt.pc" file the libintl library
authorFabio Porcedda <fabio.porcedda@gmail.com>
Sun, 1 Mar 2015 21:06:52 +0000 (22:06 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 4 Mar 2015 22:24:48 +0000 (23:24 +0100)
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@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch [new file with mode: 0644]
package/popt/popt.mk

diff --git a/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch b/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch
new file mode 100644 (file)
index 0000000..9b0b07e
--- /dev/null
@@ -0,0 +1,47 @@
+From 470755ccc353b59107c957972d908cbde4942c8d Mon Sep 17 00:00:00 2001
+From: Fabio Porcedda <fabio.porcedda@gmail.com>
+Date: Sun, 1 Mar 2015 21:13:48 +0100
+Subject: [PATCH] popt.pc: add the libintl library to the Libs.private field
+
+If static linking and libintl is used, the program that uses the popt
+library needs to link to the libintl library too so add the libintl
+library to the libs.private field because is useful for programs that call
+  pkg-config --static --libs popt
+they get the libintl library too:
+  -L<...> -lpopt -lintl
+
+This patch was already sent upstream:
+http://rpm5.org/community/popt-devel/0294.html
+
+Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
+---
+ configure.ac | 1 +
+ popt.pc.in   | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index e8eb238..816d272 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,6 +90,7 @@ popt_sysconfdir="${sysconfdir}"
+ eval "popt_sysconfdir=\"${popt_sysconfdir}\"" # expand contained ${prefix}
+ AC_DEFINE_UNQUOTED([POPT_SYSCONFDIR], ["$popt_sysconfdir"], [Full path to default POPT configuration directory])
++AC_SUBST([POPT_PKGCONFIG_LIBS_PRIVATE],"$LIBINTL")
+ # Define a (hope) portable Libs pkgconfig directive that 
+ # - Don't harm if the default library search path include ${libdir}
+diff --git a/popt.pc.in b/popt.pc.in
+index a86437c..0acfdb9 100644
+--- a/popt.pc.in
++++ b/popt.pc.in
+@@ -6,5 +6,6 @@ includedir=@includedir@
+ Name: popt
+ Version: @VERSION@
+ Description: popt library.
++Libs.private: @POPT_PKGCONFIG_LIBS_PRIVATE@
+ Libs: @POPT_PKGCONFIG_LIBS@
+ Cflags: -I${includedir}
+-- 
+2.3.1
+
index 8ce64d4c5a3dd046b6157243b9aca071bcadda3d..605649b8783165ac073dd8ee2f3d049540594d40 100644 (file)
@@ -13,6 +13,10 @@ POPT_LICENSE_FILES = COPYING
 POPT_AUTORECONF = YES
 POPT_GETTEXTIZE = YES
 
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+POPT_DEPENDENCIES += gettext
+endif
+
 POPT_CONF_ENV = ac_cv_va_copy=yes
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)