package/mosquitto: fix static build with cjson
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 25 Dec 2020 21:50:32 +0000 (22:50 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 27 Dec 2020 08:46:16 +0000 (09:46 +0100)
Fixes:
 - http://autobuild.buildroot.org/results/98e0bccf3e1a964bb6a52265bd6f11a681ec220d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/mosquitto/mosquitto.mk

index 0db78a384abe62a763a297aa91837e2f3e2a92c8..74fd7401daf4564e84d60f3aad3c2ebd4ddd9d6f 100644 (file)
@@ -11,6 +11,7 @@ MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v20 edl-v10
 MOSQUITTO_INSTALL_STAGING = YES
 
 MOSQUITTO_MAKE_OPTS = \
+       CLIENT_STATIC_LDADD="$(MOSQUITTO_STATIC_LIBS)" \
        UNAME=Linux \
        STRIP=true \
        prefix=/usr \
@@ -50,9 +51,8 @@ endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MOSQUITTO_DEPENDENCIES += host-pkgconf openssl
-MOSQUITTO_MAKE_OPTS += \
-       WITH_TLS=yes \
-       CLIENT_STATIC_LDADD="`$(PKG_CONFIG_HOST_BINARY) --libs openssl`"
+MOSQUITTO_MAKE_OPTS += WITH_TLS=yes
+MOSQUITTO_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 else
 MOSQUITTO_MAKE_OPTS += WITH_TLS=no
 endif
@@ -60,6 +60,7 @@ endif
 ifeq ($(BR2_PACKAGE_CJSON),y)
 MOSQUITTO_DEPENDENCIES += cjson
 MOSQUITTO_MAKE_OPTS += WITH_CJSON=yes
+MOSQUITTO_STATIC_LIBS += -lcjson
 else
 MOSQUITTO_MAKE_OPTS += WITH_CJSON=no
 endif