diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index 923f62693c79..95a1a68e6727 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -2,24 +2,24 @@ # $FreeBSD$ PORTNAME= mosquitto -PORTVERSION= 1.6.7 +PORTVERSION= 2.0.4 CATEGORIES= net MASTER_SITES= http://mosquitto.org/files/source/ -PATCH_SITES= https://github.com/eclipse/mosquitto/commit/ -PATCHFILES= 8a4ae28fa926589e9891674ca4424dc703ad2d88.patch:-p1 - MAINTAINER= joe@thrallingpenguin.com COMMENT= Open source MQTT broker LICENSE= EPL -LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid +BUILD_DEPENDS= xsltproc:textproc/libxslt \ + docbook-xsl>0:textproc/docbook-xsl +LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid \ + libcjson.so:devel/libcjson RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss USES= cmake ssl -USE_RC_SUBR= mosquitto USE_LDCONFIG= yes +USE_RC_SUBR= mosquitto CMAKE_ARGS= -DCMAKE_LIBDATADIR:PATH="${PREFIX}/libdata" USERS= nobody @@ -29,6 +29,7 @@ PLIST_SUB= PORTVERSION=${PORTVERSION} OPTIONS_DEFINE= CARES WS OPTIONS_DEFAULT= CARES +CARES_DESC= Asynchronous DNS resolution via c-ares CARES_LIB_DEPENDS= libcares.so:dns/c-ares CARES_CMAKE_ON= -DWITH_SRV:BOOL=ON diff --git a/net/mosquitto/distinfo b/net/mosquitto/distinfo index 93136f0a4f1b..364c1a33f074 100644 --- a/net/mosquitto/distinfo +++ b/net/mosquitto/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1598533546 -SHA256 (mosquitto-1.6.7.tar.gz) = bcd31a8fbbd053fee328986fadd8666d3058357ded56b9782f7d4f19931d178e -SIZE (mosquitto-1.6.7.tar.gz) = 591062 +TIMESTAMP = 1609154754 +SHA256 (mosquitto-2.0.4.tar.gz) = ba3126d82533fe40a18cf1a989e61eaea887e81829cd93518149e73553d20f10 +SIZE (mosquitto-2.0.4.tar.gz) = 751539 SHA256 (8a4ae28fa926589e9891674ca4424dc703ad2d88.patch) = a142cb321992b975be27514fc074938098e83e322a87d40279492e75dd3dd74e SIZE (8a4ae28fa926589e9891674ca4424dc703ad2d88.patch) = 1088 diff --git a/net/mosquitto/files/patch-CMakeLists.txt b/net/mosquitto/files/patch-CMakeLists.txt index 41c78c64a988..960fae8651ba 100644 --- a/net/mosquitto/files/patch-CMakeLists.txt +++ b/net/mosquitto/files/patch-CMakeLists.txt @@ -1,26 +1,12 @@ -Index: CMakeLists.txt -=================================================================== ---- CMakeLists.txt.orig +--- CMakeLists.txt.orig 2020-12-28 11:28:48 UTC +++ CMakeLists.txt -@@ -15,6 +15,9 @@ set (VERSION 1.6.4) +@@ -14,6 +14,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cma add_definitions (-DCMAKE -DVERSION=\"${VERSION}\") -+include_directories(/usr/local/include) -+link_directories(/usr/local/lib) ++include_directories("/usr/local/include") ++link_directories("/usr/local/lib") + if (WIN32) add_definitions("-D_CRT_SECURE_NO_WARNINGS") add_definitions("-D_CRT_NONSTDC_NO_DEPRECATE") -@@ -108,9 +111,9 @@ install(FILES mosquitto.conf aclfile.exa - # ======================================== - - configure_file(libmosquitto.pc.in libmosquitto.pc @ONLY) --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquitto.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pkgconfig") -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquitto.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig") - configure_file(libmosquittopp.pc.in libmosquittopp.pc @ONLY) --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquittopp.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pkgconfig") -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmosquittopp.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig") - - # ======================================== - # Testing diff --git a/net/mosquitto/files/patch-config.mk b/net/mosquitto/files/patch-config.mk index d4043a0b346d..2dd082af0371 100644 --- a/net/mosquitto/files/patch-config.mk +++ b/net/mosquitto/files/patch-config.mk @@ -1,8 +1,6 @@ -Index: config.mk -=================================================================== ---- config.mk.orig +--- config.mk.orig 2020-12-28 13:24:40 UTC +++ config.mk -@@ -283,7 +283,7 @@ ifeq ($(WITH_WEBSOCKETS),static) +@@ -329,7 +329,7 @@ ifeq ($(WITH_WEBSOCKETS),static) endif INSTALL?=install diff --git a/net/mosquitto/files/patch-mosquitto.conf b/net/mosquitto/files/patch-mosquitto.conf index 022827c27b20..630eac214ab3 100644 --- a/net/mosquitto/files/patch-mosquitto.conf +++ b/net/mosquitto/files/patch-mosquitto.conf @@ -1,9 +1,7 @@ -Index: mosquitto.conf -=================================================================== ---- mosquitto.conf.orig +--- mosquitto.conf.orig 2020-12-28 13:22:44 UTC +++ mosquitto.conf -@@ -158,7 +158,7 @@ - # This should be set to /var/run/mosquitto.pid if mosquitto is +@@ -148,7 +148,7 @@ + # This should be set to /var/run/mosquitto/mosquitto.pid if mosquitto is # being run automatically on boot with an init script and # start-stop-daemon or similar. -#pid_file @@ -11,25 +9,16 @@ Index: mosquitto.conf # Set to true to queue messages with QoS 0 when a persistent client is # disconnected. These messages are included in the limit imposed by -@@ -195,7 +195,7 @@ +@@ -187,7 +187,7 @@ # If run as a non-root user, this setting has no effect. - # Note that on Windows this has no effect and so mosquitto should - # be started by the user you wish it to run as. + # Note that on Windows this has no effect and so mosquitto should be started by + # the user you wish it to run as. -#user mosquitto +user nobody # ================================================================= - # Default listener -@@ -208,7 +208,7 @@ - #bind_address - - # Port to use for the default listener. --#port 1883 -+port 1883 - - # Bind the listener to a specific interface. This is similar to - # bind_address above but is useful when an interface has multiple addresses or -@@ -267,7 +267,7 @@ + # Listeners +@@ -340,7 +340,7 @@ # containing the CA certificates. For capath to work correctly, the # certificate files must have ".crt" as the file ending and you must run # "openssl rehash " each time you add/remove a certificate. @@ -37,4 +26,4 @@ Index: mosquitto.conf +cafile /usr/local/share/certs/ca-root-nss.crt #capath - # Path to the PEM encoded server certificate. + diff --git a/net/mosquitto/files/patch-src_CMakeLists.txt b/net/mosquitto/files/patch-src_CMakeLists.txt deleted file mode 100644 index 5ee92aeb7bc9..000000000000 --- a/net/mosquitto/files/patch-src_CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -Index: src/CMakeLists.txt -=================================================================== ---- src/CMakeLists.txt.orig -+++ src/CMakeLists.txt -@@ -126,6 +126,7 @@ if (WIN32 OR CYGWIN) - endif (WIN32 OR CYGWIN) - - add_definitions (-DWITH_BROKER) -+add_definitions (-DWITH_THREADING) - - if (WITH_DLT) - message(STATUS "DLT_LIBDIR = ${DLT_LIBDIR}") -@@ -149,7 +150,7 @@ if (UNIX) - elseif(QNX) - set(MOSQ_LIBS ${MOSQ_LIBS} m socket) - else(APPLE) -- set (MOSQ_LIBS ${MOSQ_LIBS} dl m) -+ set (MOSQ_LIBS ${MOSQ_LIBS} m) - find_library(LIBRT rt) - if (LIBRT) - set (MOSQ_LIBS ${MOSQ_LIBS} rt) diff --git a/net/mosquitto/files/patch-src_mosquitto__passwd.c b/net/mosquitto/files/patch-src_mosquitto__passwd.c deleted file mode 100644 index d8ec244efcb4..000000000000 --- a/net/mosquitto/files/patch-src_mosquitto__passwd.c +++ /dev/null @@ -1,22 +0,0 @@ -Index: src/mosquitto_passwd.c -=================================================================== ---- src/mosquitto_passwd.c.orig -+++ src/mosquitto_passwd.c -@@ -141,7 +141,7 @@ int output_new_password(FILE *fptr, cons - unsigned char hash[EVP_MAX_MD_SIZE]; - unsigned int hash_len; - const EVP_MD *digest; --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_OPENSSL_OPAQUE_STRUCTS) - EVP_MD_CTX context; - #else - EVP_MD_CTX *context; -@@ -168,7 +168,7 @@ int output_new_password(FILE *fptr, cons - return 1; - } - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(HAVE_OPENSSL_OPAQUE_STRUCTS) - EVP_MD_CTX_init(&context); - EVP_DigestInit_ex(&context, digest, NULL); - EVP_DigestUpdate(&context, password, strlen(password)); diff --git a/net/mosquitto/files/patch-src_security__default.c b/net/mosquitto/files/patch-src_security__default.c deleted file mode 100644 index f8e8a03e1cbd..000000000000 --- a/net/mosquitto/files/patch-src_security__default.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/security_default.c.orig 2018-10-11 00:28:56 UTC -+++ src/security_default.c -@@ -18,7 +18,7 @@ Contributors: - - #include - #include -- -+#include - #include "mosquitto_broker_internal.h" - #include "memory_mosq.h" - #include "util_mosq.h" diff --git a/net/mosquitto/pkg-plist b/net/mosquitto/pkg-plist index eab3cbeae2cc..cf5969a2f29c 100644 --- a/net/mosquitto/pkg-plist +++ b/net/mosquitto/pkg-plist @@ -1,3 +1,4 @@ +bin/mosquitto_ctrl bin/mosquitto_passwd bin/mosquitto_pub bin/mosquitto_sub @@ -10,14 +11,18 @@ include/mosquitto.h include/mosquitto_broker.h include/mosquitto_plugin.h include/mosquittopp.h +include/mqtt_protocol.h lib/libmosquitto.so lib/libmosquitto.so.1 lib/libmosquitto.so.%%PORTVERSION%% lib/libmosquittopp.so lib/libmosquittopp.so.1 lib/libmosquittopp.so.%%PORTVERSION%% +lib/mosquitto_dynamic_security.so libdata/pkgconfig/libmosquitto.pc libdata/pkgconfig/libmosquittopp.pc +man/man1/mosquitto_ctrl.1.gz +man/man1/mosquitto_ctrl_dynsec.1.gz man/man1/mosquitto_passwd.1.gz man/man1/mosquitto_pub.1.gz man/man1/mosquitto_rr.1.gz