diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index 17536a433a1f..382fc043f7cf 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= mosquitto -PORTVERSION= 1.4.14 -PORTREVISION= 2 +PORTVERSION= 1.5.3 CATEGORIES= net MASTER_SITES= http://mosquitto.org/files/source/ @@ -26,6 +25,8 @@ 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 diff --git a/net/mosquitto/distinfo b/net/mosquitto/distinfo index ad31a24c3367..084f51fb3087 100644 --- a/net/mosquitto/distinfo +++ b/net/mosquitto/distinfo @@ -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 diff --git a/net/mosquitto/files/mosquitto.in b/net/mosquitto/files/mosquitto.in index 5cd74b9aaca0..21b58cc7f251 100644 --- a/net/mosquitto/files/mosquitto.in +++ b/net/mosquitto/files/mosquitto.in @@ -27,7 +27,7 @@ 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" diff --git a/net/mosquitto/files/patch-CMakeLists.txt b/net/mosquitto/files/patch-CMakeLists.txt index 1429d6e323c1..97410d3bd6d7 100644 --- a/net/mosquitto/files/patch-CMakeLists.txt +++ b/net/mosquitto/files/patch-CMakeLists.txt @@ -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 diff --git a/net/mosquitto/files/patch-config.mk b/net/mosquitto/files/patch-config.mk index 92cc14d87063..3b227dbe2f18 100644 --- a/net/mosquitto/files/patch-config.mk +++ b/net/mosquitto/files/patch-config.mk @@ -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 diff --git a/net/mosquitto/files/patch-lib_mosquitto__internal.h b/net/mosquitto/files/patch-lib_mosquitto__internal.h index 83eca4bd0489..8f16e3f0f968 100644 --- a/net/mosquitto/files/patch-lib_mosquitto__internal.h +++ b/net/mosquitto/files/patch-lib_mosquitto__internal.h @@ -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 + +-#if defined(WITH_THREADING) && !defined(WITH_BROKER) +-# include +-#else +-# include +-#endif ++#include - #ifdef WITH_TLS - # include -+# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) -+# define HAVE_OPENSSL_OPAQUE_STRUCTS -+# endif - #else - # 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 diff --git a/net/mosquitto/files/patch-lib_socks__mosq.c b/net/mosquitto/files/patch-lib_socks__mosq.c new file mode 100644 index 000000000000..f0ea2bf1d2ef --- /dev/null +++ b/net/mosquitto/files/patch-lib_socks__mosq.c @@ -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" diff --git a/net/mosquitto/files/patch-lib_tls__mosq.h b/net/mosquitto/files/patch-lib_tls__mosq.h deleted file mode 100644 index dbc1366e2d63..000000000000 --- a/net/mosquitto/files/patch-lib_tls__mosq.h +++ /dev/null @@ -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." diff --git a/net/mosquitto/files/patch-mosquitto.conf b/net/mosquitto/files/patch-mosquitto.conf index c2738b9c2857..39a0fef7cd63 100644 --- a/net/mosquitto/files/patch-mosquitto.conf +++ b/net/mosquitto/files/patch-mosquitto.conf @@ -1,6 +1,6 @@ ---- 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. @@ -9,7 +9,7 @@ # 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. @@ -18,7 +18,7 @@ # 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. diff --git a/net/mosquitto/files/patch-src_CMakeLists.txt b/net/mosquitto/files/patch-src_CMakeLists.txt index 293ce798fc83..8113be78b1fa 100644 --- a/net/mosquitto/files/patch-src_CMakeLists.txt +++ b/net/mosquitto/files/patch-src_CMakeLists.txt @@ -1,14 +1,14 @@ ---- 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) @@ -17,10 +17,11 @@ 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) + diff --git a/net/mosquitto/files/patch-support-libressl b/net/mosquitto/files/patch-support-libressl index 57d57b0aecfe..2d3a54e5cf3b 100644 --- a/net/mosquitto/files/patch-support-libressl +++ b/net/mosquitto/files/patch-support-libressl @@ -3,9 +3,9 @@ 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; @@ -14,7 +14,7 @@ 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; } @@ -23,10 +23,10 @@ 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 diff --git a/net/mosquitto/pkg-plist b/net/mosquitto/pkg-plist index 6672eeb986fe..efc52e94f09b 100644 --- a/net/mosquitto/pkg-plist +++ b/net/mosquitto/pkg-plist @@ -6,6 +6,7 @@ bin/mosquitto_sub @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 @@ -14,6 +15,8 @@ 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