Skip to content

Commit

Permalink
[mosquitto] Update to 2.0.18 (microsoft#34456)
Browse files Browse the repository at this point in the history
* [mosquitto] Update to 2.0.18

* Disable android.

```
ci/installed/arm-neon-android/debug/lib/libssl.a  /mnt/vcpkg-ci/installed/arm-neon-android/debug/lib/libcrypto.a  -pthread  -ldl  -latomic -lm && :
ld: error: undefined symbol: getgrgid_r
>>> referenced by misc_mosq.c:192 (/mnt/vcpkg-ci/buildtrees/mosquitto/src/v2.0.18-5deb484567.clean/lib/misc_mosq.c:192)
>>>               lib/CMakeFiles/libmosquitto.dir/misc_mosq.c.o:(mosquitto__fopen)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
  • Loading branch information
BillyONeal authored Oct 18, 2023
1 parent 4e0e7ef commit a979460
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 43 deletions.
18 changes: 0 additions & 18 deletions ports/mosquitto/0002-win64-support.patch

This file was deleted.

40 changes: 20 additions & 20 deletions ports/mosquitto/0005-websocket-shared-lib-name.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9380a046..f2929e19 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -194,13 +194,13 @@ endif (WIN32)

if (WITH_WEBSOCKETS)
if (STATIC_WEBSOCKETS)
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets_static)
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets)
if (WIN32)
set (MOSQ_LIBS ${MOSQ_LIBS} iphlpapi)
link_directories(${mosquitto_SOURCE_DIR})
endif (WIN32)
else (STATIC_WEBSOCKETS)
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets)
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets_shared)
endif (STATIC_WEBSOCKETS)
endif (WITH_WEBSOCKETS)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 62ce99e..61f941e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -194,13 +194,13 @@ endif (WIN32)

if (WITH_WEBSOCKETS)
if (STATIC_WEBSOCKETS)
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets_static)
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets)
if (WIN32)
set (MOSQ_LIBS ${MOSQ_LIBS} iphlpapi)
link_directories(${mosquitto_SOURCE_DIR})
endif (WIN32)
else (STATIC_WEBSOCKETS)
- set (MOSQ_LIBS ${MOSQ_LIBS} websockets)
+ set (MOSQ_LIBS ${MOSQ_LIBS} websockets_shared)
endif (STATIC_WEBSOCKETS)
endif (WITH_WEBSOCKETS)

15 changes: 15 additions & 0 deletions ports/mosquitto/0006-pthreads-for-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c55e05..adece3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,8 +68,8 @@ option(WITH_THREADING "Include client library threading support?" ON)
if (WITH_THREADING)
add_definitions("-DWITH_THREADING")
if (WIN32)
- find_package(Threads REQUIRED)
- set (PTHREAD_LIBRARIES Threads::Threads)
+ find_package(pthread CONFIG REQUIRED)
+ set (PTHREAD_LIBRARIES PThreads4W::PThreads4W)
set (PTHREAD_INCLUDE_DIR "")
elseif (ANDROID)
set (PTHREAD_LIBRARIES "")
6 changes: 3 additions & 3 deletions ports/mosquitto/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO eclipse/mosquitto
HEAD_REF master
REF v2.0.14
SHA512 4b7066acd7d8ecb05fef6089997632381c34ce6631b7106afedf95b7f72d7280e45c9b2f8cce49349bf599520770ebbebb68ff71930bc44b615d177b4056a945
REF "v${VERSION}"
SHA512 667216f3e60f9916d5de200d3a205fb5a5c798564c96e44939af6c8e3af85fffa36a63eba47db009b432d14f43883dbca5b92547a458215dd269e91f6bcfb7fa
PATCHES
0002-win64-support.patch
0003-add-find_package-libwebsockets.patch
0004-support-static-build.patch
0005-websocket-shared-lib-name.patch
0006-pthreads-for-windows.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_LINKAGE)
Expand Down
3 changes: 2 additions & 1 deletion ports/mosquitto/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "mosquitto",
"version": "2.0.14",
"version": "2.0.18",
"description": "Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1, MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model, This makes it suitable for machine to machine messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino",
"homepage": "https://mosquitto.org/",
"license": "EPL-2.0",
"supports": "!android",
"dependencies": [
"c-ares",
"libwebsockets",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5569,7 +5569,7 @@
"port-version": 3
},
"mosquitto": {
"baseline": "2.0.14",
"baseline": "2.0.18",
"port-version": 0
},
"mozjpeg": {
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/mosquitto.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6fbbe753533949d40d9ff4307bab2bb61432a117",
"version": "2.0.18",
"port-version": 0
},
{
"git-tree": "c8f2f0732c56a4cc622139bba1b7cb110dea985d",
"version": "2.0.14",
Expand Down

0 comments on commit a979460

Please sign in to comment.