diff --git a/app-misc/mosquitto/licenses/EDL b/app-misc/mosquitto/licenses/EDL new file mode 100644 index 000000000..663920a35 --- /dev/null +++ b/app-misc/mosquitto/licenses/EDL @@ -0,0 +1,32 @@ +Eclipse Distribution License - v 1.0 + +Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/app-misc/mosquitto/mosquitto-1.6.11.recipe b/app-misc/mosquitto/mosquitto-1.6.11.recipe new file mode 100644 index 000000000..3f35fe52a --- /dev/null +++ b/app-misc/mosquitto/mosquitto-1.6.11.recipe @@ -0,0 +1,90 @@ +SUMMARY="An open source MQTT broker" +DESCRIPTION="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." +HOMEPAGE="http://mosquitto.org" +COPYRIGHT="2020 Eclipse Foundation." +LICENSE="EDL" +REVISION="1" +SOURCE_URI="https://mosquitto.org/files/source/mosquitto-$portVersion.tar.gz" +CHECKSUM_SHA256="b02d8f1368c40d5779ee125c37daf9003608eb47d7fbb04c5b938c76c1230a1f" +PATCHES="mosquitto-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +GLOBAL_WRITABLE_FILES=" + settings/mosquitto directory keep-old + " + +PROVIDES=" + mosquitto$secondaryArchSuffix = $portVersion + cmd:mosquitto$secondaryArchSuffix = $portVersion + cmd:mosquitto_passwd$secondaryArchSuffix = $portVersion + cmd:mosquitto_pub$secondaryArchSuffix = $portVersion + cmd:mosquitto_rr$secondaryArchSuffix = $portVersion + cmd:mosquitto_sub$secondaryArchSuffix = $portVersion + lib:libmosquitto$secondaryArchSuffix = $libVersionCompat + lib:libmosquittopp$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + " + +PROVIDES_devel=" + mosquitto${secondaryArchSuffix}_devel = $portVersion + devel:libmosquitto$secondaryArchSuffix = $libVersionCompat + devel:libmosquittopp$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + mosquitto$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libssl$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build && cd build + cmake -DCMAKE_BUILD_TYPE=Release \ + $cmakeDirArgs .. + make +} + +INSTALL() +{ + cd build + make install + + prepareInstalledDevelLibs libmosquitto libmosquittopp + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir +} + +TEST() +{ + cd build + make test +} diff --git a/app-misc/mosquitto/patches/mosquitto-1.6.11.patchset b/app-misc/mosquitto/patches/mosquitto-1.6.11.patchset new file mode 100644 index 000000000..b6ab1b0a6 --- /dev/null +++ b/app-misc/mosquitto/patches/mosquitto-1.6.11.patchset @@ -0,0 +1,47 @@ +From 00bfb5a5c5ac0c63185dc15b29ed5c73ae1b3583 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 15 Aug 2020 10:34:44 +0000 +Subject: Haiku doesn't use -ldl, add -lnetwork to CMakeList.txt + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 053ca1d..fe1a198 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -152,6 +152,8 @@ if (UNIX) + set (MOSQ_LIBS ${MOSQ_LIBS} dl m) + elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") + set (MOSQ_LIBS ${MOSQ_LIBS} m) ++ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Haiku") ++ set (MOSQ_LIBS ${MOSQ_LIBS} m network) + elseif(QNX) + set(MOSQ_LIBS ${MOSQ_LIBS} m socket) + else(APPLE) +-- +2.28.0 + + +From 4073677b55e7f4406d7858605d7e08dfa1bf1b21 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 15 Aug 2020 11:02:49 +0000 +Subject: Use instead of on Haiku + + +diff --git a/src/conf_includedir.c b/src/conf_includedir.c +index b602f96..5e9888a 100644 +--- a/src/conf_includedir.c ++++ b/src/conf_includedir.c +@@ -37,7 +37,9 @@ Contributors: + # include + #endif + +-#if !defined(WIN32) && !defined(__CYGWIN__) && !defined(__QNX__) ++#if defined(__HAIKU__) ++# include ++#elif !defined(WIN32) && !defined(__CYGWIN__) && !defined(__QNX__) + # include + #endif + +-- +2.28.0 +