package/mosquitto: fix static build with openssl
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 4 Aug 2019 20:44:58 +0000 (22:44 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 5 Aug 2019 20:22:36 +0000 (22:22 +0200)
mosquitto library can be built statically since commit
a95bdd964761ec69a23174f5213dd54b77d0971b however build fails with
openssl because mosquitto does not use pkg-config to retrieve static
dependencies so provide them through the STATIC_LIB_DEPS variable

Fixes:
 - http://autobuild.buildroot.org/results/2ee69a5d7834c9a4845ebde801be6aa8f97cc5fa

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mosquitto/mosquitto.mk

index 6de6fc804f09fd58b6ff3a5539bd72ea2791742a..2643ffe0186e270c4c1c51bdb5a3da912cd5d75a 100644 (file)
@@ -48,8 +48,10 @@ MOSQUITTO_MAKE_OPTS += WITH_THREADING=no
 endif
 
 ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
-MOSQUITTO_DEPENDENCIES += libopenssl
-MOSQUITTO_MAKE_OPTS += WITH_TLS=yes
+MOSQUITTO_DEPENDENCIES += host-pkgconf libopenssl
+MOSQUITTO_MAKE_OPTS += \
+       WITH_TLS=yes \
+       STATIC_LIB_DEPS="`$(PKG_CONFIG_HOST_BINARY) --libs openssl`"
 else
 MOSQUITTO_MAKE_OPTS += WITH_TLS=no
 endif