[MacPorts] #67874: mosquitto: update to 2.0.15
MacPorts
noreply at macports.org
Fri Aug 4 04:03:19 UTC 2023
#67874: mosquitto: update to 2.0.15
------------------------+----------------------
Reporter: danh1979 | Owner: slewsys
Type: update | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: haspatch
Port: mosquitto |
------------------------+----------------------
Old description:
> This was tested on Ventura 13.5 on M2 Pro by creating my own local
> Portfile and installing it from source. After some Internet-search-aided
> debugging, I found that I needed to:
> - add libcjson dependency
> - deal with missing symbols via the extra linker flag
> - deal with an xslt error by installing docbook XSL
>
> {{{
> #!div style="font-size: 80%"
> Code highlighting:
> {{{#!diff
> diff --git a/net/mosquitto/Portfile b/net/mosquitto/Portfile
> index 61e7927e..3bfb6f78 100644
> --- a/net/mosquitto/Portfile
> +++ b/net/mosquitto/Portfile
> @@ -4,7 +4,7 @@ PortSystem 1.0
> PortGroup cmake 1.1
>
> name mosquitto
> -version 2.0.9
> +version 2.0.15
> revision 1
>
> categories net devel
> @@ -23,14 +23,16 @@ long_description \
> homepage https://mosquitto.org
> master_sites http://mosquitto.org/files/source/
>
> -checksums rmd160 6925455f51b6c79ebd160aba2f3709864aa5c05d \
> - sha256
> 1b8553ef64a1cf5e4f4cfbe098330ae612adccd3d37f35b2db6f6fab501b01d4 \
> - size 757878
> +checksums rmd160 c669450aff623dd5c9c5e2b6306975139ea95117 \
> + sha256
> 4735b1d32e3f91c7a8896741d88a3022e89730a1ee897946decfa0df27039ac6 \
> + size 792632
>
> depends_build-append \
> - path:bin/xsltproc:libxslt
> + path:bin/xsltproc:libxslt \
> + port:docbook-xsl-nons
>
> depends_lib port:c-ares \
> + port:libcjson \
> port:libwebsockets \
> port:tcp_wrappers \
> path:lib/libssl.dylib:openssl
> @@ -41,7 +43,8 @@ depends_test-append \
> configure.args-append \
> -DUSE_LIBWRAP:BOOL=ON \
> -DWITH_SRV:BOOL=ON \
> - -DWITH_WEBSOCKETS:BOOL=ON
> + -DWITH_WEBSOCKETS:BOOL=ON \
> + -DCMAKE_MODULE_LINKER_FLAGS="-undefined
> dynamic_lookup" \
>
> test.run yes
> test.target -C ${build.dir}/test test
>
> }}}
> }}}
New description:
This was tested on Ventura 13.5 on M2 Pro by creating my own local
Portfile and installing it from source. After some Internet-search-aided
debugging, I found that I needed to:
- add libcjson dependency
- deal with missing symbols via the extra linker flag
- deal with an xslt error by installing docbook XSL
{{{
#!div style="font-size: 80%"
Code highlighting:
{{{#!diff
diff --git a/net/mosquitto/Portfile b/net/mosquitto/Portfile
index 61e7927e..61d0702f 100644
--- a/net/mosquitto/Portfile
+++ b/net/mosquitto/Portfile
@@ -4,8 +4,8 @@ PortSystem 1.0
PortGroup cmake 1.1
name mosquitto
-version 2.0.9
-revision 1
+version 2.0.15
+revision 0
categories net devel
platforms darwin
@@ -21,16 +21,18 @@ long_description \
both C and C++ client libraries.
homepage https://mosquitto.org
-master_sites http://mosquitto.org/files/source/
+master_sites ${homepage}/files/source/
-checksums rmd160 6925455f51b6c79ebd160aba2f3709864aa5c05d \
- sha256
1b8553ef64a1cf5e4f4cfbe098330ae612adccd3d37f35b2db6f6fab501b01d4 \
- size 757878
+checksums rmd160 c669450aff623dd5c9c5e2b6306975139ea95117 \
+ sha256
4735b1d32e3f91c7a8896741d88a3022e89730a1ee897946decfa0df27039ac6 \
+ size 792632
depends_build-append \
- path:bin/xsltproc:libxslt
+ path:bin/xsltproc:libxslt \
+ port:docbook-xsl-nons
depends_lib port:c-ares \
+ port:libcjson \
port:libwebsockets \
port:tcp_wrappers \
path:lib/libssl.dylib:openssl
@@ -41,7 +43,8 @@ depends_test-append \
configure.args-append \
-DUSE_LIBWRAP:BOOL=ON \
-DWITH_SRV:BOOL=ON \
- -DWITH_WEBSOCKETS:BOOL=ON
+ -DWITH_WEBSOCKETS:BOOL=ON \
+ -DCMAKE_MODULE_LINKER_FLAGS="-undefined
dynamic_lookup"
}}}
}}}
--
Comment (by danh1979):
I updated the patch with the `revision` and `master_sites` suggestions.
Regarding `-undefined dynamic_lookup`, it seems there are some plugins in
mosquitto, written `add_library(targetname MODULE ...)` in cmake, where
`targetname` is one of these three:
- `mosquitto_dynamic_security`
- `mosquitto_message_timestamp`
- `mosquitto_payload_modification`
These don't compile without adding
`-DCMAKE_MODULE_LINKER_FLAGS="-undefined dynamic_lookup"`.
Prompted by your suggestion, and then learning about `cmake-1.1.tcl` and
recreating a macports-equivalent build environment, I searched the
mosquitto source and found
https://github.com/eclipse/mosquitto/blob/v2.0.15/CMakeLists.txt#L22
If I change this to
{{{#!diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8913c2d..145f6255 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ if (WIN32)
endif (WIN32)
if(APPLE)
- set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
"${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}
-undefined dynamic_lookup")
endif(APPLE)
include(GNUInstallDirs)
}}}
... then mosquitto builds without `-DCMAKE_MODULE_LINKER_FLAGS="-undefined
dynamic_lookup"` fed on the cmake command line.
--
Ticket URL: <https://trac.macports.org/ticket/67874#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list