diff options
author | Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> | 2020-01-25 19:52:17 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-01-25 12:44:25 -0800 |
commit | 318627819b61ec8f433d47be6ca45db07a6fb930 (patch) | |
tree | 645dbb548c70e46c6dd18962e5ebe2ea38fd7186 /meta-networking/recipes-connectivity/mosquitto/files | |
parent | c063eb6472b3fde419032ea5a00e02df40acfed6 (diff) | |
download | meta-openembedded-318627819b61ec8f433d47be6ca45db07a6fb930.tar.gz |
mosquitto: apply upstream proposed patches to use cmake build system,
simplifying a lot the build and install process.
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/mosquitto/files')
4 files changed, 155 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/mosquitto/files/1568.patch b/meta-networking/recipes-connectivity/mosquitto/files/1568.patch new file mode 100644 index 0000000000..15f7a91057 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/1568.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1568] | ||
2 | From 50bfc79cae5764a6e513b684a5eb5bef2b35c856 Mon Sep 17 00:00:00 2001 | ||
3 | From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
4 | Date: Wed, 22 Jan 2020 12:30:25 +0100 | ||
5 | Subject: [PATCH] Bugfix: include "deps" directory only if BUNDLED_DEPS has | ||
6 | been provided and set to true | ||
7 | |||
8 | Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
9 | --- | ||
10 | config.mk | 5 ++++- | ||
11 | lib/CMakeLists.txt | 5 ++++- | ||
12 | test/unit/Makefile | 6 +++++- | ||
13 | 3 files changed, 13 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/config.mk b/config.mk | ||
16 | index 51e36e0d0..0ac24b3d4 100644 | ||
17 | --- a/config.mk | ||
18 | +++ b/config.mk | ||
19 | @@ -135,7 +135,10 @@ endif | ||
20 | |||
21 | STATIC_LIB_DEPS:= | ||
22 | |||
23 | -LIB_CPPFLAGS=$(CPPFLAGS) -I. -I.. -I../lib -I../src/deps | ||
24 | +LIB_CPPFLAGS=$(CPPFLAGS) -I. -I.. -I../lib | ||
25 | +ifeq ($(WITH_BUNDLED_DEPS),yes) | ||
26 | + LIB_CPPFLAGS:=$(LIB_CPPFLAGS) -I../src/deps | ||
27 | +endif | ||
28 | LIB_CFLAGS:=$(CFLAGS) | ||
29 | LIB_CXXFLAGS:=$(CXXFLAGS) | ||
30 | LIB_LDFLAGS:=$(LDFLAGS) | ||
31 | diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
32 | index e1521f12a..891046a81 100644 | ||
33 | --- a/lib/CMakeLists.txt | ||
34 | +++ b/lib/CMakeLists.txt | ||
35 | @@ -1,11 +1,14 @@ | ||
36 | add_subdirectory(cpp) | ||
37 | |||
38 | include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib | ||
39 | - ${mosquitto_SOURCE_DIR}/src/deps | ||
40 | ${STDBOOL_H_PATH} ${STDINT_H_PATH} | ||
41 | ${OPENSSL_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIR}) | ||
42 | link_directories(${mosquitto_SOURCE_DIR}/lib) | ||
43 | |||
44 | +if (WITH_BUNDLED_DEPS) | ||
45 | + include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src/deps) | ||
46 | +endif (WITH_BUNDLED_DEPS) | ||
47 | + | ||
48 | set(C_SRC | ||
49 | actions.c | ||
50 | callbacks.c | ||
51 | diff --git a/test/unit/Makefile b/test/unit/Makefile | ||
52 | index 9d422428d..928579492 100644 | ||
53 | --- a/test/unit/Makefile | ||
54 | +++ b/test/unit/Makefile | ||
55 | @@ -2,7 +2,11 @@ include ../../config.mk | ||
56 | |||
57 | .PHONY: all check test test-broker test-lib clean coverage | ||
58 | |||
59 | -CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../lib -I../../src -I../../src/deps | ||
60 | +CPPFLAGS:=$(CPPFLAGS) -I../.. -I../../lib -I../../src | ||
61 | +ifeq ($(WITH_BUNDLED_DEPS),yes) | ||
62 | + CPPFLAGS:=$(CPPFLAGS) -I../../src/deps | ||
63 | +endif | ||
64 | + | ||
65 | CFLAGS:=$(CFLAGS) -coverage -Wall -ggdb | ||
66 | LDFLAGS:=$(LDFLAGS) -coverage | ||
67 | LDADD:=$(LDADD) -lcunit | ||
diff --git a/meta-networking/recipes-connectivity/mosquitto/files/1569.patch b/meta-networking/recipes-connectivity/mosquitto/files/1569.patch new file mode 100644 index 0000000000..9718b98c82 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/1569.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1569] | ||
2 | From fda932612afce2cead2fd2ca1c8ea543b2892177 Mon Sep 17 00:00:00 2001 | ||
3 | From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
4 | Date: Wed, 22 Jan 2020 12:31:01 +0100 | ||
5 | Subject: [PATCH] Bugfix: enabling DLT was overriding everything else on linker | ||
6 | flags because of error in cmake set keyword | ||
7 | |||
8 | Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
9 | --- | ||
10 | src/CMakeLists.txt | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
14 | index 7898ff5b1..6dfbba5e6 100644 | ||
15 | --- a/src/CMakeLists.txt | ||
16 | +++ b/src/CMakeLists.txt | ||
17 | @@ -130,7 +130,7 @@ add_definitions (-DWITH_BROKER) | ||
18 | if (WITH_DLT) | ||
19 | message(STATUS "DLT_LIBDIR = ${DLT_LIBDIR}") | ||
20 | link_directories(${DLT_LIBDIR}) | ||
21 | - set (MOSQ_LIBS ${DLT_LIBRARIES}) | ||
22 | + set (MOSQ_LIBS ${MOSQ_LIBS} ${DLT_LIBRARIES}) | ||
23 | endif (WITH_DLT) | ||
24 | |||
25 | set (MOSQ_LIBS ${MOSQ_LIBS} ${OPENSSL_LIBRARIES}) | ||
diff --git a/meta-networking/recipes-connectivity/mosquitto/files/1570.patch b/meta-networking/recipes-connectivity/mosquitto/files/1570.patch new file mode 100644 index 0000000000..f11fc48150 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/1570.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1570] | ||
2 | From 775677b05190380c3736bf0dbef002ee7b9bff33 Mon Sep 17 00:00:00 2001 | ||
3 | From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
4 | Date: Wed, 22 Jan 2020 12:29:41 +0100 | ||
5 | Subject: [PATCH] cmake: add ADNS enable/disable dynamic support | ||
6 | |||
7 | Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
8 | --- | ||
9 | src/CMakeLists.txt | 8 ++++++-- | ||
10 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
13 | index 7898ff5b1..edae76f32 100644 | ||
14 | --- a/src/CMakeLists.txt | ||
15 | +++ b/src/CMakeLists.txt | ||
16 | @@ -105,6 +105,9 @@ if (WITH_SYS_TREE) | ||
17 | add_definitions("-DWITH_SYS_TREE") | ||
18 | endif (WITH_SYS_TREE) | ||
19 | |||
20 | +option(WITH_ADNS | ||
21 | + "Include ADNS support?" OFF) | ||
22 | + | ||
23 | if (CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
24 | option(WITH_SYSTEMD | ||
25 | "Include systemd support?" OFF) | ||
26 | @@ -137,10 +140,11 @@ set (MOSQ_LIBS ${MOSQ_LIBS} ${OPENSSL_LIBRARIES}) | ||
27 | # Check for getaddrinfo_a | ||
28 | include(CheckLibraryExists) | ||
29 | check_library_exists(anl getaddrinfo_a "" HAVE_GETADDRINFO_A) | ||
30 | -if (HAVE_GETADDRINFO_A) | ||
31 | +if (HAVE_GETADDRINFO_A AND WITH_ADNS) | ||
32 | + add_definitions("-DWITH_ADNS") | ||
33 | add_definitions(-DHAVE_GETADDRINFO_A) | ||
34 | set (MOSQ_LIBS ${MOSQ_LIBS} anl) | ||
35 | -endif (HAVE_GETADDRINFO_A) | ||
36 | +endif (HAVE_GETADDRINFO_A AND WITH_ADNS) | ||
37 | |||
38 | |||
39 | if (UNIX) | ||
diff --git a/meta-networking/recipes-connectivity/mosquitto/files/1571.patch b/meta-networking/recipes-connectivity/mosquitto/files/1571.patch new file mode 100644 index 0000000000..2cfa48457a --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/1571.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571] | ||
2 | From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001 | ||
3 | From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
4 | Date: Wed, 22 Jan 2020 12:39:49 +0100 | ||
5 | Subject: [PATCH] Add dynamic symbols linking with cmake too | ||
6 | |||
7 | Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | ||
8 | --- | ||
9 | lib/CMakeLists.txt | 2 ++ | ||
10 | 1 file changed, 2 insertions(+) | ||
11 | |||
12 | diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
13 | index e1521f12a..14ba12739 100644 | ||
14 | --- a/lib/CMakeLists.txt | ||
15 | +++ b/lib/CMakeLists.txt | ||
16 | @@ -88,6 +88,8 @@ set_target_properties(libmosquitto PROPERTIES | ||
17 | OUTPUT_NAME mosquitto | ||
18 | VERSION ${VERSION} | ||
19 | SOVERSION 1 | ||
20 | + LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version | ||
21 | + LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version" | ||
22 | ) | ||
23 | |||
24 | install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||