mutt: fix static build with libidn2 and libunistring
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 20 Aug 2018 17:08:07 +0000 (19:08 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 20 Aug 2018 21:03:58 +0000 (23:03 +0200)
When libidn2 is statically build with libunistring support, mutt needs
to add -lunistring to LIBS.
To do that, add a call to PKG_CHECK_MODULES to retrieve this information
from libidn2.pc

Fixes:
 - http://autobuild.buildroot.net/results/177da8f4798f69298db5385957184f1c53cca923

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mutt/0001-Fix-static-build-with-libidn2-and-libunistring.patch [new file with mode: 0644]
package/mutt/mutt.mk

diff --git a/package/mutt/0001-Fix-static-build-with-libidn2-and-libunistring.patch b/package/mutt/0001-Fix-static-build-with-libidn2-and-libunistring.patch
new file mode 100644 (file)
index 0000000..56b90f5
--- /dev/null
@@ -0,0 +1,36 @@
+From 1baceb95bd8e6f35c25bc7afdc6a88c8f6264f3f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 20 Aug 2018 19:06:08 +0200
+Subject: [PATCH] Fix static build with libidn2 and libunistring
+
+When libidn2 is statically build with libunistring support, mutt needs
+to add -lunistring to LIBS.
+To do that, add a call to PKG_CHECK_MODULES to retrieve this information
+from libidn2.pc
+
+Fixes:
+ - http://autobuild.buildroot.net/results/177da8f4798f69298db5385957184f1c53cca923
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 29252173..2e69ac19 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1341,6 +1341,10 @@ AC_ARG_WITH(idn2, AS_HELP_STRING([--with-idn2=@<:@PFX@:>@],[Use GNU libidn2 for
+             if test "$with_idn2" != "yes" ; then
+               CPPFLAGS="$CPPFLAGS -I$with_idn2/include"
+               LDFLAGS="$LDFLAGS -L$with_idn2/lib"
++            else
++              PKG_CHECK_MODULES([LIBIDN2], libidn2,
++                                 [CPPFLAGS="$CPPFLAGS $LIBIDN2_CFLAGS"
++                                 LIBS="$LIBIDN2_LIBS"])
+             fi
+           fi
+         ],
+-- 
+2.14.1
+
index 1c3021ece1ba8c715fa10d9eccf0176d16d86d35..9918b45e64525a1d8813b7415190315265f8899a 100644 (file)
@@ -8,8 +8,10 @@ MUTT_VERSION = 1.10.1
 MUTT_SITE = https://bitbucket.org/mutt/mutt/downloads
 MUTT_LICENSE = GPL-2.0+
 MUTT_LICENSE_FILES = GPL
-MUTT_DEPENDENCIES = ncurses
+MUTT_DEPENDENCIES = host-pkgconf ncurses
 MUTT_CONF_OPTS = --disable-doc --disable-smtp
+# We're patching configure.ac
+MUTT_AUTORECONF = YES
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 MUTT_DEPENDENCIES += libiconv