Index: head/net/mosquitto/Makefile =================================================================== --- head/net/mosquitto/Makefile (revision 481152) +++ head/net/mosquitto/Makefile (revision 481153) @@ -1,46 +1,47 @@ # Created by: Joseph Benden # $FreeBSD$ PORTNAME= mosquitto -PORTVERSION= 1.4.14 -PORTREVISION= 2 +PORTVERSION= 1.5.3 CATEGORIES= net MASTER_SITES= http://mosquitto.org/files/source/ MAINTAINER= joe@thrallingpenguin.com COMMENT= Open-Source MQTT Broker LICENSE= EPL LIB_DEPENDS= libcares.so:dns/c-ares \ libuuid.so:misc/e2fsprogs-libuuid BUILD_DEPENDS= xsltproc:textproc/libxslt USES= cmake ssl NOCONFIGURE= yes USE_RC_SUBR= mosquitto USE_LDCONFIG= yes PLIST_SUB= PORTVERSION=${PORTVERSION} USERS= nobody OPTIONS_DEFINE= WS + +CMAKE_ARGS+= -DCMAKE_LIBDATADIR="${PREFIX}/libdata" WS_DESC= MQTT over Websockets support WS_LIB_DEPENDS= libwebsockets.so:net/libwebsockets WS_CMAKE_ON= -DWITH_WEBSOCKETS=ON post-patch: # do not run ldconfig in stage dir @${REINPLACE_CMD} -e '/ldconfig/d' ${WRKSRC}/src/CMakeLists.txt \ ${WRKSRC}/lib/CMakeLists.txt ${WRKSRC}/lib/cpp/CMakeLists.txt @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/CMakeLists.txt post-install: # Adjust configuration files ${MV} ${STAGEDIR}${ETCDIR}/mosquitto.conf ${STAGEDIR}${ETCDIR}/mosquitto.conf.sample ${MV} ${STAGEDIR}${ETCDIR}/pwfile.example ${STAGEDIR}${ETCDIR}/pwfile.sample ${MV} ${STAGEDIR}${ETCDIR}/pskfile.example ${STAGEDIR}${ETCDIR}/pskfile.sample ${MV} ${STAGEDIR}${ETCDIR}/aclfile.example ${STAGEDIR}${ETCDIR}/aclfile.sample .include Index: head/net/mosquitto/distinfo =================================================================== --- head/net/mosquitto/distinfo (revision 481152) +++ head/net/mosquitto/distinfo (revision 481153) @@ -1,3 +1,3 @@ -TIMESTAMP = 1512592902 -SHA256 (mosquitto-1.4.14.tar.gz) = 156b1fa731d12baad4b8b22f7b6a8af50ba881fc711b81e9919ec103cf2942d1 -SIZE (mosquitto-1.4.14.tar.gz) = 365596 +TIMESTAMP = 1538306679 +SHA256 (mosquitto-1.5.3.tar.gz) = 3081a998d303a883b1cd064009beabc88aa9159e26f5258a4ae6007160491d10 +SIZE (mosquitto-1.5.3.tar.gz) = 425844 Index: head/net/mosquitto/files/patch-lib_tls__mosq.h =================================================================== --- head/net/mosquitto/files/patch-lib_tls__mosq.h (revision 481152) +++ head/net/mosquitto/files/patch-lib_tls__mosq.h (nonexistent) @@ -1,13 +0,0 @@ ---- lib/tls_mosq.h.orig 2017-07-10 22:46:01 UTC -+++ lib/tls_mosq.h -@@ -26,8 +26,9 @@ Contributors: - #ifdef WITH_TLS - - #include -+#include - #ifdef WITH_TLS_PSK --# if OPENSSL_VERSION_NUMBER >= 0x10000000 -+# if OPENSSL_VERSION_NUMBER >= 0x10000000 && !defined(OPENSSL_NO_PSK) - # define REAL_WITH_TLS_PSK - # else - # warning "TLS-PSK not supported, openssl too old." Property changes on: head/net/mosquitto/files/patch-lib_tls__mosq.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/mosquitto/files/mosquitto.in =================================================================== --- head/net/mosquitto/files/mosquitto.in (revision 481152) +++ head/net/mosquitto/files/mosquitto.in (revision 481153) @@ -1,41 +1,41 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: mosquitto # REQUIRE: DAEMON # BEFORE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable mosquitto: # # mosquitto_enable="YES" # mosquitto_flags="" # # See mosquitto(8) for flags # . /etc/rc.subr name=mosquitto rcvar=mosquitto_enable mosquitto_enable=${mosquitto_enable:="NO"} mosquitto_config=${mosquitto_config:="%%PREFIX%%/etc/mosquitto/mosquitto.conf"} command=%%PREFIX%%/sbin/mosquitto command_args="-c ${mosquitto_config} -d" -pidfile=$(grep pid_file ${mosquitto_config} | awk '{print($2)}') +pidfile=$(grep pidfile ${mosquitto_config} | awk '{print($2)}') required_files=${mosquitto_config} extra_commands="reload" stop_postcmd=stop_postcmd stop_postcmd() { rm -f $pidfile } load_rc_config $name run_rc_command "$1" Index: head/net/mosquitto/files/patch-CMakeLists.txt =================================================================== --- head/net/mosquitto/files/patch-CMakeLists.txt (revision 481152) +++ head/net/mosquitto/files/patch-CMakeLists.txt (revision 481153) @@ -1,21 +1,24 @@ ---- CMakeLists.txt.orig 2017-07-10 22:46:01 UTC +--- CMakeLists.txt.orig 2018-09-25 15:27:43 UTC +++ CMakeLists.txt -@@ -13,6 +13,9 @@ cmake_minimum_required(VERSION 2.8) +@@ -15,6 +15,9 @@ set (VERSION 1.5.3) - set (VERSION 1.4.14) + add_definitions (-DCMAKE -DVERSION=\"${VERSION}\") -+include_directories(%%PREFIX%%/include) -+link_directories(%%PREFIX%%/lib) ++include_directories(/usr/local/include) ++link_directories(/usr/local/lib) + if (WIN32) - execute_process(COMMAND cmd /c echo %DATE% %TIME% OUTPUT_VARIABLE TIMESTAMP - OUTPUT_STRIP_TRAILING_WHITESPACE) -@@ -47,7 +50,7 @@ else (WIN32) + set (BINDIR .) + set (SBINDIR .) +@@ -40,9 +43,9 @@ else (WIN32) set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}") set (INCLUDEDIR include) set (DATAROOTDIR share) - set (MANDIR "${DATAROOTDIR}/man") + set (MANDIR "man") set (SHAREDIR "${DATAROOTDIR}/mosquitto") +- set (PKGCONFIGDIR "${LIBDIR}/pkgconfig") ++ set (PKGCONFIGDIR "${CMAKE_LIBDATADIR}/pkgconfig") endif (WIN32) + option(WITH_TLS Index: head/net/mosquitto/files/patch-config.mk =================================================================== --- head/net/mosquitto/files/patch-config.mk (revision 481152) +++ head/net/mosquitto/files/patch-config.mk (revision 481153) @@ -1,13 +1,11 @@ ---- config.mk.orig 2017-07-10 22:46:01 UTC +--- config.mk.orig 2018-09-25 15:27:43 UTC +++ config.mk -@@ -249,7 +249,7 @@ ifeq ($(WITH_DOCS),yes) +@@ -275,7 +275,7 @@ ifeq ($(WITH_WEBSOCKETS),static) endif INSTALL?=install --prefix=/usr/local --mandir=${prefix}/share/man --localedir=${prefix}/share/locale -+prefix=${PREFIX} -+mandir=${PREFIX}/share/man -+localedir=${PREFIX}/share/locale - STRIP?=strip +-prefix?=/usr/local ++prefix?=${PREFIX} + incdir?=${prefix}/include + libdir?=${prefix}/lib${LIB_SUFFIX} + localedir?=${prefix}/share/locale Index: head/net/mosquitto/files/patch-lib_mosquitto__internal.h =================================================================== --- head/net/mosquitto/files/patch-lib_mosquitto__internal.h (revision 481152) +++ head/net/mosquitto/files/patch-lib_mosquitto__internal.h (revision 481153) @@ -1,25 +1,33 @@ -From 9f74e09373f3be7b77f510ef8b0ae2c887f7b325 Mon Sep 17 00:00:00 2001 -From: Natanael Copa -Date: Tue, 4 Oct 2016 14:35:33 +0200 -Subject: [PATCH] [280] Fix build with libressl - -Closes #280 - -Fix building with libressl which broke in commit fff741613 (Support for -openssl 1.1.0). - -Bug: #280 - -Signed-off-by: Natanael Copa ---- lib/mosquitto_internal.h.orig 2017-07-10 22:46:01 UTC +--- lib/mosquitto_internal.h.orig 2018-09-25 15:27:43 UTC +++ lib/mosquitto_internal.h -@@ -25,6 +25,9 @@ Contributors: +@@ -31,11 +31,7 @@ Contributors: + #endif + #include - #ifdef WITH_TLS - # include -+# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) -+# define HAVE_OPENSSL_OPAQUE_STRUCTS -+# endif - #else - # include +-#if defined(WITH_THREADING) && !defined(WITH_BROKER) +-# include +-#else +-# include +-#endif ++#include + + #ifdef WITH_SRV + # include +@@ -194,7 +190,7 @@ struct mosquitto { #endif + bool want_write; + bool want_connect; +-#if defined(WITH_THREADING) && !defined(WITH_BROKER) ++ + pthread_mutex_t callback_mutex; + pthread_mutex_t log_callback_mutex; + pthread_mutex_t msgtime_mutex; +@@ -205,7 +201,7 @@ struct mosquitto { + pthread_mutex_t out_message_mutex; + pthread_mutex_t mid_mutex; + pthread_t thread_id; +-#endif ++ + bool clean_session; + #ifdef WITH_BROKER + char *old_id; /* for when a duplicate client connects, but we still want to Index: head/net/mosquitto/files/patch-lib_socks__mosq.c =================================================================== --- head/net/mosquitto/files/patch-lib_socks__mosq.c (nonexistent) +++ head/net/mosquitto/files/patch-lib_socks__mosq.c (revision 481153) @@ -0,0 +1,13 @@ +--- lib/socks_mosq.c.orig 2018-09-30 11:40:37 UTC ++++ lib/socks_mosq.c +@@ -24,6 +24,10 @@ Contributors: + #else + # include + #endif ++#ifdef __FreeBSD__ ++# include ++# include ++#endif + + #include "mosquitto_internal.h" + #include "memory_mosq.h" Property changes on: head/net/mosquitto/files/patch-lib_socks__mosq.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/mosquitto/files/patch-mosquitto.conf =================================================================== --- head/net/mosquitto/files/patch-mosquitto.conf (revision 481152) +++ head/net/mosquitto/files/patch-mosquitto.conf (revision 481153) @@ -1,29 +1,29 @@ ---- mosquitto.conf.orig 2015-05-07 13:21:22 UTC +--- mosquitto.conf.orig 2018-08-16 16:05:26 UTC +++ mosquitto.conf -@@ -32,7 +32,7 @@ +@@ -28,7 +28,7 @@ # This should be set to /var/run/mosquitto.pid if mosquitto is # being run automatically on boot with an init script and # start-stop-daemon or similar. -#pid_file +pid_file /var/run/mosquitto.pid # When run as root, drop privileges to this user and its primary # group. -@@ -40,7 +40,7 @@ +@@ -36,7 +36,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. -#user mosquitto +user nobody # The maximum number of QoS 1 and 2 messages currently inflight per # client. -@@ -133,7 +133,7 @@ +@@ -160,7 +160,7 @@ #bind_address # Port to use for the default listener. -#port 1883 +port 1883 # The maximum number of client connections to allow. This is # a per listener setting. Index: head/net/mosquitto/files/patch-src_CMakeLists.txt =================================================================== --- head/net/mosquitto/files/patch-src_CMakeLists.txt (revision 481152) +++ head/net/mosquitto/files/patch-src_CMakeLists.txt (revision 481153) @@ -1,26 +1,27 @@ ---- src/CMakeLists.txt.orig 2017-07-10 22:46:01 UTC +--- src/CMakeLists.txt.orig 2018-09-25 15:27:43 UTC +++ src/CMakeLists.txt -@@ -77,6 +77,7 @@ if (WIN32 OR CYGWIN) +@@ -114,6 +114,7 @@ if (WIN32 OR CYGWIN) endif (WIN32 OR CYGWIN) add_definitions (-DWITH_BROKER) +add_definitions (-DWITH_THREADING) - add_executable(mosquitto ${MOSQ_SRCS}) + set (MOSQ_LIBS ${MOSQ_LIBS} ${OPENSSL_LIBRARIES}) -@@ -96,7 +97,7 @@ if (UNIX) +@@ -131,7 +132,7 @@ if (UNIX) if (APPLE) set (MOSQ_LIBS ${MOSQ_LIBS} dl m) 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) -@@ -141,6 +142,5 @@ if (${WITH_TLS} STREQUAL ON) +@@ -185,7 +186,6 @@ if (${WITH_TLS} STREQUAL ON) endif (${WITH_TLS} STREQUAL ON) - if (UNIX) + if (UNIX AND NOT APPLE) - install(CODE "EXEC_PROGRAM(/sbin/ldconfig)") - endif (UNIX) + endif (UNIX AND NOT APPLE) + Index: head/net/mosquitto/files/patch-support-libressl =================================================================== --- head/net/mosquitto/files/patch-support-libressl (revision 481152) +++ head/net/mosquitto/files/patch-support-libressl (revision 481153) @@ -1,36 +1,36 @@ lib/mosquitto_internal.h | 3 +++ src/mosquitto_passwd.c | 4 ++-- src/security_default.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) ---- src/mosquitto_passwd.c.orig 2017-07-10 22:46:01 UTC +--- src/mosquitto_passwd.c.orig 2018-09-25 15:27:43 UTC +++ src/mosquitto_passwd.c -@@ -90,7 +90,7 @@ int output_new_password(FILE *fptr, const char *userna +@@ -99,7 +99,7 @@ int output_new_password(FILE *fptr, const char *userna unsigned char hash[EVP_MAX_MD_SIZE]; unsigned int hash_len; const EVP_MD *digest; -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_OPAQUE_STRUCTS EVP_MD_CTX context; #else EVP_MD_CTX *context; -@@ -117,7 +117,7 @@ int output_new_password(FILE *fptr, const char *userna +@@ -126,7 +126,7 @@ int output_new_password(FILE *fptr, const char *userna return 1; } -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_OPAQUE_STRUCTS EVP_MD_CTX_init(&context); EVP_DigestInit_ex(&context, digest, NULL); EVP_DigestUpdate(&context, password, strlen(password)); ---- src/security_default.c.orig 2017-07-10 22:46:01 UTC +--- src/security_default.c.orig 2018-09-25 15:27:43 UTC +++ src/security_default.c -@@ -790,7 +790,7 @@ int mosquitto_psk_key_get_default(struct mosquitto_db - int _pw_digest(const char *password, const unsigned char *salt, unsigned int salt_len, unsigned char *hash, unsigned int *hash_len) +@@ -958,7 +958,7 @@ int mosquitto_psk_key_get_default(struct mosquitto_db + int pw__digest(const char *password, const unsigned char *salt, unsigned int salt_len, unsigned char *hash, unsigned int *hash_len) { const EVP_MD *digest; -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifndef HAVE_OPENSSL_OPAQUE_STRUCTS EVP_MD_CTX context; digest = EVP_get_digestbyname("sha512"); Index: head/net/mosquitto/pkg-plist =================================================================== --- head/net/mosquitto/pkg-plist (revision 481152) +++ head/net/mosquitto/pkg-plist (revision 481153) @@ -1,25 +1,28 @@ bin/mosquitto_passwd bin/mosquitto_pub bin/mosquitto_sub @sample %%ETCDIR%%/aclfile.sample @sample %%ETCDIR%%/mosquitto.conf.sample @sample %%ETCDIR%%/pskfile.sample @sample %%ETCDIR%%/pwfile.sample include/mosquitto.h +include/mosquitto_broker.h include/mosquitto_plugin.h include/mosquittopp.h lib/libmosquitto.so lib/libmosquitto.so.1 lib/libmosquitto.so.%%PORTVERSION%% lib/libmosquittopp.so lib/libmosquittopp.so.1 lib/libmosquittopp.so.%%PORTVERSION%% +libdata/pkgconfig/libmosquitto.pc +libdata/pkgconfig/libmosquittopp.pc man/man1/mosquitto_passwd.1.gz man/man1/mosquitto_pub.1.gz man/man1/mosquitto_sub.1.gz man/man3/libmosquitto.3.gz man/man5/mosquitto.conf.5.gz man/man7/mosquitto-tls.7.gz man/man7/mqtt.7.gz man/man8/mosquitto.8.gz sbin/mosquitto