Changes between Initial Version and Version 3 of Ticket #67874


Ignore:
Timestamp:
Aug 4, 2023, 4:03:19 AM (10 months ago)
Author:
danh1979
Comment:

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

  • CMakeLists.txt

    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index b8913c2d..145f6255 100644
    a b if (WIN32) 
    2020endif (WIN32)
    2121
    2222if(APPLE)
    23        set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup")
     23       set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined dynamic_lookup")
    2424endif(APPLE)
    2525
    2626include(GNUInstallDirs)

... then mosquitto builds without -DCMAKE_MODULE_LINKER_FLAGS="-undefined dynamic_lookup" fed on the cmake command line.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #67874

    • Property Owner set to slewsys
    • Property Status changed from new to assigned
    • Property Summary changed from update mosquitto to 2.0.15 to mosquitto: update to 2.0.15
  • Ticket #67874 – Description

    initial v3  
    99  {{{#!diff
    1010diff --git a/net/mosquitto/Portfile b/net/mosquitto/Portfile
    11 index 61e7927e..3bfb6f78 100644
     11index 61e7927e..61d0702f 100644
    1212--- a/net/mosquitto/Portfile
    1313+++ b/net/mosquitto/Portfile
    14 @@ -4,7 +4,7 @@ PortSystem          1.0
     14@@ -4,8 +4,8 @@ PortSystem          1.0
    1515 PortGroup           cmake 1.1
    1616 
    1717 name                mosquitto
    1818-version             2.0.9
     19-revision            1
    1920+version             2.0.15
    20  revision            1
     21+revision            0
    2122 
    2223 categories          net devel
    23 @@ -23,14 +23,16 @@ long_description    \
     24 platforms           darwin
     25@@ -21,16 +21,18 @@ long_description    \
     26     both  C and C++ client libraries.
     27 
    2428 homepage            https://mosquitto.org
    25  master_sites        http://mosquitto.org/files/source/
     29-master_sites        http://mosquitto.org/files/source/
     30+master_sites        ${homepage}/files/source/
    2631 
    2732-checksums           rmd160  6925455f51b6c79ebd160aba2f3709864aa5c05d \
     
    4853-                    -DWITH_WEBSOCKETS:BOOL=ON
    4954+                    -DWITH_WEBSOCKETS:BOOL=ON \
    50 +                    -DCMAKE_MODULE_LINKER_FLAGS="-undefined dynamic_lookup" \
    51  
    52  test.run            yes
    53  test.target         -C ${build.dir}/test test
     55+                    -DCMAKE_MODULE_LINKER_FLAGS="-undefined dynamic_lookup"
    5456
    5557  }}}