# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= mosquitto VERSION= 2.0.18 KEYWORDS= net VARIANTS= standard SDESC[standard]= Message broker implementing the MQTT protocol HOMEPAGE= https://mosquitto.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://mosquitto.org/files/source/ DISTFILE[1]= mosquitto-2.0.18.tar.gz:main DF_INDEX= 1 SPKGS[standard]= complete primary tools cxx dev man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= cjson:dev:standard libuuid:dev:standard c-ares:dev:standard libwebsockets:dev:standard docbook-xsl:primary:standard libxslt:dev:standard libxslt:primary:standard BUILDRUN_DEPENDS= cjson:primary:standard libuuid:primary:standard c-ares:primary:standard libwebsockets:primary:standard RUN_DEPENDS= nss:caroot:standard EXRUN[cxx]= mosquitto:primary:standard EXRUN[tools]= mosquitto:primary:standard USERS= nobody USERGROUP_SPKG= primary USES= cpe cmake ssl zlib c++:cxx LICENSE= CUSTOM1:tools CUSTOM2:tools LICENSE_TERMS= tools:{{WRKSRC}}/LICENSE.txt LICENSE_NAME= CUSTOM1:"Eclipse Distribution License v1.0" CUSTOM2:"Eclipse Public License v2.0" LICENSE_FILE= CUSTOM1:{{WRKSRC}}/edl-v10 CUSTOM2:{{WRKSRC}}/epl-v20 LICENSE_SCHEME= dual CPE_VENDOR= eclipse FPC_EQUIVALENT= net/mosquitto SOVERSION= 2.0.18 RC_SUBR= mosquitto:tools CMAKE_ARGS= -DWITH_SRV:BOOL=ON -DWITH_WEBSOCKETS:BOOL=ON -DOPENSSL_ROOT_DIR={{OPENSSLBASE}} post-install: ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/pwfile.example \ ${STAGEDIR}${PREFIX}/etc/mosquitto/pwfile.sample ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/pskfile.example \ ${STAGEDIR}${PREFIX}/etc/mosquitto/pskfile.sample ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/aclfile.example \ ${STAGEDIR}${PREFIX}/etc/mosquitto/aclfile.sample ${MV} ${STAGEDIR}${PREFIX}/etc/mosquitto/mosquitto.conf \ ${STAGEDIR}${PREFIX}/etc/mosquitto/mosquitto.conf.sample ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/m* ${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/mosquitto pre-configure: ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/mosquitto.conf [FILE:681:descriptions/desc.primary] Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers. The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for Internet of Things messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers. The Mosquitto project also provides a C library for implementing MQTT clients, and the very popular mosquitto_pub and mosquitto_sub command line MQTT clients. [FILE:46:descriptions/desc.tools] This package contains the Mosquitto programs. [FILE:64:descriptions/desc.cxx] This package contains the c++ version of the mosquitto library. [FILE:102:distinfo] d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a 796351 mosquitto-2.0.18.tar.gz [FILE:86:manifests/plist.primary] lib/ libmosquitto.so.%%SOVERSION%% libmosquitto.so.1 mosquitto_dynamic_security.so [FILE:252:manifests/plist.tools] @sample etc/mosquitto/aclfile.sample @sample etc/mosquitto/mosquitto.conf.sample @sample etc/mosquitto/pskfile.sample @sample etc/mosquitto/pwfile.sample bin/ mosquitto_ctrl mosquitto_passwd mosquitto_pub mosquitto_rr mosquitto_sub sbin/mosquitto [FILE:59:manifests/plist.cxx] lib/ libmosquittopp.so.%%SOVERSION%% libmosquittopp.so.1 [FILE:186:manifests/plist.dev] include/ mosquitto.h mosquitto_broker.h mosquitto_plugin.h mosquittopp.h mqtt_protocol.h lib/ libmosquitto.so libmosquittopp.so lib/pkgconfig/ libmosquitto.pc libmosquittopp.pc [FILE:292:manifests/plist.man] share/man/man1/ mosquitto_ctrl.1.gz mosquitto_ctrl_dynsec.1.gz mosquitto_passwd.1.gz mosquitto_pub.1.gz mosquitto_rr.1.gz mosquitto_sub.1.gz share/man/man3/libmosquitto.3.gz share/man/man5/mosquitto.conf.5.gz share/man/man7/ mosquitto-tls.7.gz mqtt.7.gz share/man/man8/mosquitto.8.gz [FILE:420:patches/patch-apps_mosquitto__ctrl_CMakeLists.txt] --- apps/mosquitto_ctrl/CMakeLists.txt.orig 2023-09-18 21:29:34 UTC +++ apps/mosquitto_ctrl/CMakeLists.txt @@ -32,7 +32,7 @@ if (WITH_TLS AND CJSON_FOUND) if (UNIX) if (APPLE) target_link_libraries(mosquitto_ctrl dl) - elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") + elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD|FreeBSD|DragonFly|MidnightBSD") # elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") # [FILE:557:patches/patch-config.h] --- config.h.orig 2023-09-18 21:29:34 UTC +++ config.h @@ -6,10 +6,14 @@ #ifdef __APPLE__ # define __DARWIN_C_SOURCE -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__SYMBIAN32__) +#elif defined(__FreeBSD__) || defined(__SYMBIAN32__) || defined(__DragonFly__) # define _XOPEN_SOURCE 700 # define __BSD_VISIBLE 1 # define HAVE_NETINET_IN_H +#elif defined(__NetBSD__) +# define _XOPEN_SOURCE 700 +# define _NETBSD_SOURCE 1 +# define HAVE_NETINET_IN_H #elif defined(__QNX__) # define _XOPEN_SOURCE 600 # define __BSD_VISIBLE 1 [FILE:332:patches/patch-lib_socks__mosq.c] --- lib/socks_mosq.c.orig 2023-09-18 21:29:34 UTC +++ lib/socks_mosq.c @@ -30,7 +30,7 @@ Contributors: #else # include #endif -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) # include # include #endif [FILE:374:patches/patch-lib_strings__mosq.c] $NetBSD: patch-lib_strings__mosq.c,v 1.2 2022/08/16 23:08:39 gdt Exp $ Suppress warning by including missing header. --- lib/strings_mosq.c.orig 2023-09-18 21:29:34 UTC +++ lib/strings_mosq.c @@ -21,6 +21,10 @@ Contributors: #include #include +#if defined(__NetBSD__) +#include +#endif + #ifndef WIN32 # include #endif [FILE:1057:patches/patch-mosquitto.conf] --- mosquitto.conf.orig 2023-09-18 21:29:34 UTC +++ mosquitto.conf @@ -167,7 +167,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 +pid_file /var/run/mosquitto.pid # Set to true to queue messages with QoS 0 when a persistent client is # disconnected. These messages are included in the limit imposed by @@ -206,7 +206,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 # ================================================================= # Listeners @@ -359,7 +359,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. -#cafile +cafile %%PREFIX%%/share/certs/ca-root-nss.crt #capath [FILE:934:patches/patch-src_CMakeLists.txt] --- src/CMakeLists.txt.orig 2023-09-18 21:29:34 UTC +++ src/CMakeLists.txt @@ -171,7 +171,7 @@ endif (HAVE_GETADDRINFO_A AND WITH_ADNS) if (UNIX) if (APPLE) set (MOSQ_LIBS ${MOSQ_LIBS} dl m) - elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") + elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD|FreeBSD|DragonFly|MidnightBSD") set (MOSQ_LIBS ${MOSQ_LIBS} m) elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") set (MOSQ_LIBS ${MOSQ_LIBS} m) @@ -194,13 +194,13 @@ endif (WIN32) if (WITH_WEBSOCKETS) if (STATIC_WEBSOCKETS) - set (MOSQ_LIBS ${MOSQ_LIBS} websockets_static) + set (MOSQ_LIBS ${MOSQ_LIBS} websockets pthread) if (WIN32) set (MOSQ_LIBS ${MOSQ_LIBS} iphlpapi) link_directories(${mosquitto_SOURCE_DIR}) endif (WIN32) else (STATIC_WEBSOCKETS) - set (MOSQ_LIBS ${MOSQ_LIBS} websockets) + set (MOSQ_LIBS ${MOSQ_LIBS} websockets pthread) endif (STATIC_WEBSOCKETS) endif (WITH_WEBSOCKETS) [FILE:804:files/mosquitto.in] #!/bin/sh # 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 load_rc_config $name mosquitto_enable=${mosquitto_enable:="NO"} mosquitto_config=${mosquitto_config:="%%PREFIX%%/etc/mosquitto/mosquitto.conf"} mosquitto_user=${mosquitto_user:="nobody"} command=%%PREFIX%%/sbin/mosquitto command_args="-c ${mosquitto_config} -d" pidfile=${mosquitto_pidfile:-"/var/run/mosquitto.pid"} required_files=${mosquitto_config} extra_commands=reload stop_postcmd="rm -f $pidfile" start_precmd="install -o ${mosquitto_user} -m 644 /dev/null ${pidfile}" run_rc_command "$1"