- update to mosquitto-1.6.10

- switch to python3
- rework some patches for inclusion upstream
This commit is contained in:
jasper 2020-06-10 07:39:56 +00:00
parent ee859d3132
commit 13d16ae60d
7 changed files with 18 additions and 65 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.29 2020/03/13 12:41:03 jasper Exp $
# $OpenBSD: Makefile,v 1.30 2020/06/10 07:39:56 jasper Exp $
COMMENT = opensource MQTT broker
DISTNAME = mosquitto-1.6.9
DISTNAME = mosquitto-1.6.10
SHARED_LIBS += mosquitto 1.0 # 1.5
SHARED_LIBS += mosquittopp 1.0 # 1.5
@ -26,6 +26,7 @@ MODULES = devel/cmake \
MODPY_BUILDDEP= No
MODPY_RUNDEP= No
MODPY_VERSION= ${MODPY_DEFAULT_VERSION_3}
BUILD_DEPENDS = devel/uthash

View File

@ -1,2 +1,2 @@
SHA256 (mosquitto-1.6.9.tar.gz) = QSl5stsKACC9Avpk8KDennAAuERiWG4ytn8pux9sFoU=
SIZE (mosquitto-1.6.9.tar.gz) = 610934
SHA256 (mosquitto-1.6.10.tar.gz) = ktGAdxfw9tV9GsEgf/25Uug3fpFsewu0cY90Ujl3QjI=
SIZE (mosquitto-1.6.10.tar.gz) = 613060

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-CMakeLists_txt,v 1.5 2019/11/15 19:16:19 jasper Exp $
$OpenBSD: patch-CMakeLists_txt,v 1.6 2020/06/10 07:39:56 jasper Exp $
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -103,7 +103,7 @@ endif (DOCUMENTATION)
@@ -104,7 +104,7 @@ endif (DOCUMENTATION)
# Install config file
# ========================================

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-lib_CMakeLists_txt,v 1.9 2020/03/13 12:41:03 jasper Exp $
Index: lib/CMakeLists.txt
--- lib/CMakeLists.txt.orig
+++ lib/CMakeLists.txt
@@ -91,6 +91,12 @@ set_target_properties(libmosquitto PROPERTIES
SOVERSION 1
)
+include(CheckSymbolExists)
+CHECK_SYMBOL_EXISTS(arc4random_uniform stdlib.h ARC4RANDOM_UNIFORM)
+if (${ARC4RANDOM_UNIFORM})
+ add_definitions("-DWITH_ARC4RANDOM")
+endif (${ARC4RANDOM_UNIFORM})
+
install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
if (WITH_STATIC_LIBRARIES)

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-lib_mosquitto_c,v 1.4 2019/11/13 20:53:32 jasper Exp $
Index: lib/mosquitto.c
--- lib/mosquitto.c.orig
+++ lib/mosquitto.c
@@ -23,6 +23,9 @@ Contributors:
#include <sys/time.h>
#include <strings.h>
#endif
+#ifdef WITH_ARC4RANDOM
+#include <stdlib.h>
+#endif
#include "mosquitto.h"
#include "mosquitto_internal.h"
@@ -46,6 +49,7 @@ int mosquitto_lib_version(int *major, int *minor, int
int mosquitto_lib_init(void)
{
+#ifndef WITH_ARC4RANDOM
#ifdef WIN32
srand(GetTickCount64());
#elif _POSIX_TIMERS>0 && defined(_POSIX_MONOTONIC_CLOCK)
@@ -63,6 +67,7 @@ int mosquitto_lib_init(void)
gettimeofday(&tv, NULL);
srand(tv.tv_sec*1000 + tv.tv_usec/1000);
+#endif
#endif
return net__init();

View File

@ -1,15 +1,14 @@
$OpenBSD: patch-lib_socks_mosq_c,v 1.3 2019/02/12 19:18:41 jasper Exp $
$OpenBSD: patch-lib_socks_mosq_c,v 1.4 2020/06/10 07:39:56 jasper Exp $
Index: lib/socks_mosq.c
--- lib/socks_mosq.c.orig
+++ lib/socks_mosq.c
@@ -25,6 +25,9 @@ Contributors:
# include <sys/socket.h>
# include <netinet/in.h>
@@ -27,7 +27,7 @@ Contributors:
#else
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
# include <arpa/inet.h>
#endif
#ifdef __FreeBSD__
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
# include <sys/socket.h>
# include <netinet/in.h>
#endif

View File

@ -1,9 +1,11 @@
$OpenBSD: patch-src_CMakeLists_txt,v 1.10 2020/03/13 12:41:03 jasper Exp $
$OpenBSD: patch-src_CMakeLists_txt,v 1.11 2020/06/10 07:39:56 jasper Exp $
ld: error: unable to find library -ldl
Index: src/CMakeLists.txt
--- src/CMakeLists.txt.orig
+++ src/CMakeLists.txt
@@ -151,6 +151,8 @@ endif (HAVE_GETADDRINFO_A AND WITH_ADNS)
@@ -150,6 +150,8 @@ endif (HAVE_GETADDRINFO_A AND WITH_ADNS)
if (UNIX)
if (APPLE)
set (MOSQ_LIBS ${MOSQ_LIBS} dl m)