diff options
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/Manifest.gz | bin | 32161 -> 32334 bytes | |||
-rw-r--r-- | net-libs/paho-mqtt-c/Manifest | 5 | ||||
-rw-r--r-- | net-libs/paho-mqtt-c/metadata.xml | 23 | ||||
-rw-r--r-- | net-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild | 105 |
4 files changed, 133 insertions, 0 deletions
diff --git a/net-libs/Manifest.gz b/net-libs/Manifest.gz Binary files differindex 21aaa680aeed..53db495ea6b6 100644 --- a/net-libs/Manifest.gz +++ b/net-libs/Manifest.gz diff --git a/net-libs/paho-mqtt-c/Manifest b/net-libs/paho-mqtt-c/Manifest new file mode 100644 index 000000000000..9f8eb670a97a --- /dev/null +++ b/net-libs/paho-mqtt-c/Manifest @@ -0,0 +1,5 @@ +DIST paho-mqtt-c-1.3.12-live.tar.gz 3642676 BLAKE2B c20e3bb1b4eae30b268639d30c1e4d72f6759850bef2dc13de424debb7a0785a5ba083af094e28cb80814df519831ac0e1da27d8aa4958361724aabea92c03e5 SHA512 af0f52944c46fe7874203b3b359d8fb8935d5bd6b394045138624b96130c6b756045fb3b486e224b7e55b3cb478197b8a049bbeb01ff7e3d16d0d3f12c521110 +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 +EBUILD paho-mqtt-c-1.3.12.ebuild 2745 BLAKE2B dcb6b286fee3f2362c9cefd4de8bd2da375dd6130e484703db17ce6d6a1447c9ade8aa6a9151db518b3d37679a34eda4a15772b0973ad56a3641a3c90018fe35 SHA512 71a2c8984d8e37df84148ad047a870665e5615a23a3feeb5edfb4b3a06e48c16990d4aa18f162bbb926e5379478aecc08118ec9f34ff5ef6cba36ec5aa2c541d +MISC metadata.xml 812 BLAKE2B acf5c65842b641cbc813df4786c3cb65b6e7155b5082b5bee50bf7abb6531fab53bb4a4fad9452a062d7612cc663eb4e3327a4e9c9c9a9349f1b139289c7943c SHA512 f1aa7056cde248fb0976bf8b635017311aa6a53961fdf5c02eb601c1ffdc0079693d430ef143410a8873a07cf4809443fde98436c0ff640a0625361ffe488789 diff --git a/net-libs/paho-mqtt-c/metadata.xml b/net-libs/paho-mqtt-c/metadata.xml new file mode 100644 index 000000000000..b2e9b98f3ec3 --- /dev/null +++ b/net-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.giuseppe@gmail.com</email> + <name>Giuseppe Foti</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@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/net-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild b/net-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild new file mode 100644 index 000000000000..e9e50c53427b --- /dev/null +++ b/net-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild @@ -0,0 +1,105 @@ +# 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" +MY_LIVE_COMMIT="7db21329301b1f527c925dff789442db3ca3c1e7" + +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/paho.mqtt.c/archive/${MY_LIVE_COMMIT}.tar.gz -> ${P}-live.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="doc examples +high-performance +ssl test" + +# Building samples needs ssl: #912262 +REQUIRED_USE="examples? ( ssl )" + +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_prepare(){ + cmake_src_prepare + if use test; then + # removing old certs + rm -r "${S}"/test/ssl || die + mv "${WORKDIR}"/paho.mqtt.c-"${MY_LIVE_COMMIT}"/test/ssl "${S}"/test/ssl || die + + mv "${WORKDIR}/${MY_TEST_UTILS}-${MY_TEST_COMMIT}" "${WORKDIR}/${MY_TEST_UTILS}" || die + fi +} + +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_BUILD_SAMPLES="$(usex examples "TRUE" "FALSE")" + -DPAHO_ENABLE_TESTING="$(usex test "TRUE" "FALSE")" + ) + cmake_src_configure +} + +src_test() { + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + cd "${WORKDIR}/${MY_TEST_UTILS}/interoperability" || die + + ${EPYTHON} startbroker.py -c localhost_testing.conf \ + > "${T}/testbroker.log" & + local -r startbroker_pid=$! + + ${EPYTHON} "${S}"/test/mqttsas.py \ + > "${T}/testmqttsas.log" & + local -r mqttsas_pid=$! + + local port ports + ports=(1883 1888{3..8}) + + for port in ${ports[@]}; do + einfo "Waiting for TCP port ${port} to become available" + if timeout 30 bash -c \ + 'until printf "" >/dev/tcp/${0}/${1} 2>> "${T}/portlog"; do sleep 1; done' \ + localhost "${port}"; then + continue + fi + + kill ${startbroker_pid} ${mqttsas_pid} + die "Timeout waiting for port ${port} to become available" + done + + local myctestargs=( + -j 1 + --timeout 600 + ) + cmake_src_test + + kill ${startbroker_pid} ${mqttsas_pid} || die +} |