summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/0001-Fix-bug-of-free-with-musl.patch39
-rw-r--r--external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.bb35
-rw-r--r--external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb31
3 files changed, 70 insertions, 35 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/0001-Fix-bug-of-free-with-musl.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/0001-Fix-bug-of-free-with-musl.patch
new file mode 100644
index 00000000..12f9e7ab
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/files/0001-Fix-bug-of-free-with-musl.patch
@@ -0,0 +1,39 @@
+From 96233a8382b9520293a48b08dc3b204a21205800 Mon Sep 17 00:00:00 2001
+From: Wang Mingyu <wangmy@cn.fujitsu.com>
+Date: Fri, 24 Apr 2020 00:53:19 +0900
+Subject: [PATCH] Fix bug of free() with musl
+
+This fixes build error with musl C library:
+/ubinux-dev/ubinux001/contribution/build/tmp/work/armv7vet2hf-neon-poky-linux-musleabi/paho-mqtt-c/1.3.2-r0/git/src/Heap.h:55:24:
+error: expected declaration specifiers or '...' before string constant
+ 55 | #define free(x) myfree(__FILE__, __LINE__, x)
+ | ^~~~~~~~
+/ubinux-dev/ubinux001/contribution/build/tmp/work/armv7vet2hf-neon-poky-linux-musleabi/paho-mqtt-c/1.3.2-r0/git/src/Heap.h:55:34:
+error: expected declaration specifiers or '...' before numeric constant
+ 55 | #define free(x) myfree(__FILE__, __LINE__, x)
+ | ^~~~~~~~
+
+Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
+---
+ src/MQTTReasonCodes.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/MQTTReasonCodes.c b/src/MQTTReasonCodes.c
+index 416eab5..479dbac 100644
+--- a/src/MQTTReasonCodes.c
++++ b/src/MQTTReasonCodes.c
+@@ -16,10 +16,10 @@
+
+ #include "MQTTReasonCodes.h"
+
+-#include "Heap.h"
+ #include "StackTrace.h"
+
+ #include <memory.h>
++#include "Heap.h"
+
+ #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+
+--
+2.17.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.bb
deleted file mode 100644
index a7a9b5a6..00000000
--- a/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.2.1.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Paho MQTT - C libraries for the MQTT and MQTT-SN protocols"
-DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)."
-HOMEPAGE = "http://www.eclipse.org/paho/"
-SECTION = "console/network"
-LICENSE = "EPL-1.0 | EDL-1.0"
-
-LIC_FILES_CHKSUM = " \
- file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \
- file://epl-v10;md5=659c8e92a40b6df1d9e3dccf5ae45a08 \
- file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \
- file://about.html;md5=dcde438d73cf42393da9d40fabc0c9bc \
-"
-
-SRC_URI = "git://github.com/eclipse/paho.mqtt.c;protocol=http"
-
-SRCREV = "09fe0744e02f317b907e96dd5afcc02224ddbb85"
-
-DEPENDS = "openssl"
-
-S = "${WORKDIR}/git"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_install() {
- install -d ${D}${libdir}
- oe_libinstall -C build/output -so libpaho-mqtt3a ${D}${libdir}
- oe_libinstall -C build/output -so libpaho-mqtt3as ${D}${libdir}
- oe_libinstall -C build/output -so libpaho-mqtt3c ${D}${libdir}
- oe_libinstall -C build/output -so libpaho-mqtt3cs ${D}${libdir}
- install -d ${D}${includedir}
- install -m 644 src/MQTTAsync.h ${D}${includedir}
- install -m 644 src/MQTTClient.h ${D}${includedir}
- install -m 644 src/MQTTClientPersistence.h ${D}${includedir}
-}
-
diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb
new file mode 100644
index 00000000..071d51fc
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-connectivity/paho-mqtt-c/paho-mqtt-c_1.3.2.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Paho MQTT - C libraries for the MQTT and MQTT-SN protocols"
+DESCRIPTION = "Client implementation of open and standard messaging protocols for Machine-to-Machine (M2M) and Internet of Things (IoT)."
+HOMEPAGE = "http://www.eclipse.org/paho/"
+SECTION = "console/network"
+LICENSE = "EPL-2.0 | EDL-1.0"
+
+LIC_FILES_CHKSUM = " \
+ file://edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3 \
+ file://epl-v20;md5=d9fc0efef5228704e7f5b37f27192723 \
+ file://notice.html;md5=943f861069889acecebf51dfa24478e2 \
+ file://about.html;md5=e5662cbb5f8fd5c9faac526e4077898e \
+"
+
+SRC_URI = "git://github.com/eclipse/paho.mqtt.c;protocol=http \
+ file://0001-Fix-bug-of-free-with-musl.patch"
+
+SRCREV = "3148fe2d5f4b87e16266dfe559c0764e16ca0546"
+
+DEPENDS = "openssl"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+do_install_append() {
+ # paho-mqtt installes some thing that we don't want.
+ rm -rf ${D}${prefix}/samples
+ find ${D}${prefix} -maxdepth 1 -type f -delete
+}
+
+EXTRA_OECMAKE = "-DPAHO_WITH_SSL=ON"