commit: 231ea4658d1823cb4b42a624685d3e035c8a3641 Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com> AuthorDate: Sat May 20 16:40:13 2023 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Mon Jul 3 08:15:19 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=231ea465
dev-libs/paho-mqtt-c: new package, add 1.3.12 Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com> Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> dev-libs/paho-mqtt-c/Manifest | 2 + dev-libs/paho-mqtt-c/metadata.xml | 23 +++++++++ dev-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild | 70 ++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) diff --git a/dev-libs/paho-mqtt-c/Manifest b/dev-libs/paho-mqtt-c/Manifest new file mode 100644 index 000000000000..1804bd73b21b --- /dev/null +++ b/dev-libs/paho-mqtt-c/Manifest @@ -0,0 +1,2 @@ +DIST paho-mqtt-c-1.3.12.tar.gz 3622938 BLAKE2B 9eb7bca0367a3001f00122f2056b60ddf3633e0304661a424821c3e2b3370d65e09c51c62f90bb89f0e4ce291640e71ae0d3b093fe600efb87aa3744e431cafe SHA512 3152b557a8ab7c9b9c80277283e0f5e9965ce4c2ebbdaef0f238908d49e6fa1281aa72932ea112a836144b79656e4abe6e0cbd93840429a52e501a2c6b12d313 +DIST paho.mqtt.testing.tar.gz 175845 BLAKE2B 02c284c4e1cfe91bb87735e8fc61f206c3e93adf18c567ff330ae8d1c2bd04b7aa079ba3961610b7c9cc7e22340be000bf56772d5c39d1bc4d1b406bf564da66 SHA512 8328c6a010d76cf62ee2007a849acb61b84cf2dc058525bc967661984fdf26407dd52da83a3f2acda56e3c5d309301ea2a8ed264466d0fb933994dd248dbbe8d diff --git a/dev-libs/paho-mqtt-c/metadata.xml b/dev-libs/paho-mqtt-c/metadata.xml new file mode 100644 index 000000000000..b2e9b98f3ec3 --- /dev/null +++ b/dev-libs/paho-mqtt-c/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>foti.giuse...@gmail.com</email> + <name>Giuseppe Foti</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-ma...@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="high-performance"> + The debugging aids internal tracing and heap tracking are not included + </flag> + </use> + <longdescription lang="en"> + These libraries enable applications to connect to an MQTT broker to publish messages, and to subscribe to topics and receive published messages. + </longdescription> + <upstream> + <remote-id type="github">eclipse/paho.mqtt.c</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild b/dev-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild new file mode 100644 index 000000000000..1b948ab91968 --- /dev/null +++ b/dev-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit cmake python-any-r1 toolchain-funcs + +MY_TEST_UTILS="paho.mqtt.testing" +MY_TEST_COMMIT="577f955352e41205c554d44966c2908e90026345" + +DESCRIPTION="An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS." +HOMEPAGE="https://eclipse.org/paho" +SRC_URI=" + https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/eclipse/${MY_TEST_UTILS}/archive/${MY_TEST_COMMIT}.tar.gz -> ${MY_TEST_UTILS}.tar.gz +" + +LICENSE="EPL-2.0" +SLOT="1.3" +KEYWORDS="~amd64 ~x86" +IUSE="+high-performance +ssl doc test" + +BDEPEND=" + doc? ( app-doc/doxygen + media-gfx/graphviz ) + ssl? ( dev-libs/openssl ) + test? ( dev-lang/python ) +" + +# Tests can be run only if a MQTT broker is available +RESTRICT="!test? ( test )" + +S="${WORKDIR}/paho.mqtt.c-${PV}" + +BUILD_DIR="${S}_build" + +src_configure(){ + local mycmakeargs=( + -DPAHO_BUILD_SHARED=TRUE + -DPAHO_HIGH_PERFORMANCE="$(usex high-performance "TRUE" "FALSE")" + -DPAHO_WITH_SSL="$(usex ssl "TRUE" "FALSE")" + -DPAHO_BUILD_DOCUMENTATION="$(usex doc "TRUE" "FALSE")" + -DPAHO_ENABLE_TESTING="$(usex test "TRUE" "FALSE")" + ) + cmake_src_configure + if use test; then + mv "${WORKDIR}"/"${MY_TEST_UTILS}"-"${MY_TEST_COMMIT}" "${WORKDIR}"/"${MY_TEST_UTILS}" || die + # a subdir in test + mv "${WORKDIR}"/"${MY_TEST_UTILS}" "${BUILD_DIR}"/test/ || die + cp "${S}"/test/*.py "${BUILD_DIR}"/test/ || die + fi +} + +src_test() { + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + if use test; then + echo "RUNNING TESTS" + + ${EPYTHON} "${BUILD_DIR}"/test/"${MY_TEST_UTILS}"/interoperability/startbroker.py -c \ + "${BUILD_DIR}"/test/"${MY_TEST_UTILS}"/interoperability/localhost_testing.conf & + + ${EPYTHON} "${BUILD_DIR}"/test/mqttsas.py & + cmake_src_test + fi +}