commit: a7d67e3888bbb2e7e899e47cd3ca15ce53554c58 Author: Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com> AuthorDate: Wed Sep 10 05:03:04 2025 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Sat Sep 13 15:03:03 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7d67e38
net-libs/paho-mqtt-c: add 1.3.15 Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43728 Closes: https://github.com/gentoo/gentoo/pull/43728 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> net-libs/paho-mqtt-c/Manifest | 1 + net-libs/paho-mqtt-c/paho-mqtt-c-1.3.15.ebuild | 102 +++++++++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/net-libs/paho-mqtt-c/Manifest b/net-libs/paho-mqtt-c/Manifest index 2690f1dc17c3..d415eaece3c3 100644 --- a/net-libs/paho-mqtt-c/Manifest +++ b/net-libs/paho-mqtt-c/Manifest @@ -1,4 +1,5 @@ DIST paho-mqtt-c-1.3.13.tar.gz 3489004 BLAKE2B c835f4e2a741539df900184825b4ce29138f76828ec329d9321c54a845607b8137292330b019e950640f36bb14b0252dfba4906be746742950e3f8f13985608e SHA512 0f436470bcff224461ed3227c8db10914f84bc2dcf76e51b55d4a78b80abaa4e636ac8f7a20e517524625888335c738e975283e5d573ae8d59147aa4de7963fc DIST paho-mqtt-c-1.3.14.tar.gz 1198035 BLAKE2B dfc77990b24f6c12b082fdf48cea81e52cf2ac078fd3c47edd6999248bc02a67aa06646add0207a6c05cc3904e2bc9a6245a9478d71d44521a5dcfcb2606325d SHA512 5576ac3531a5c707f92a02cbfb9d60710b42acd99f57bcde311aa224780267a5152e8b92a6b077afab4780ee236d5e0c2a0b8986453439bce4323758b3d4385b +DIST paho-mqtt-c-1.3.15.tar.gz 1163925 BLAKE2B 22a9917a66e57025d715d3969a9e3b7cb110929ec6a82bf50b001739899ecca10385ccdff4b602f26c00dfe56d1aad3f0be12aacaebd4072dfdebb3da981d23d SHA512 e2c47485624f47a895aeeb4f978dd8d98fefca1c8caf9512a2adc03d0bf3c0c2225ab3f96a6ad3513f6df1976e52645248666308c42f05ce25fc8d0980947d28 DIST paho.mqtt.testing-9d7bb80bb8b9d9cfc0b52f8cb4c1916401281103.tar.gz 180793 BLAKE2B b59f320466f28c828d0a019253c197313a203196943932d37401c0877a6adfeb0a3fe25f65690ee203f461baf32f291bec807c518f54f17dd102b57ce25de8a7 SHA512 599539300f21f4dcf88513bc0da81cb93b866d9e7f8927d0ce3d6ded6357526912dcfe4889c43cbdedeac9d57d5ff49b3bad24dcd172627d12e79755ed2c0ca2 DIST paho.mqtt.testing-a4dc694010217b291ee78ee13a6d1db812f9babd.tar.gz 175858 BLAKE2B 7ba1be3e09740f45907c4ba2a5314830a56c4f6626af3fab15928647b235908429a96ece312e7f5b8fa044583c81e6d8deacc0fbd290e6e08fbc328524dba3f1 SHA512 a20ea68cfac7f2a4e140c9b9ebacf4debd544098151545dedb72fe1e3629b3a495df7e15b0e131d52c4e86fb8d165cb7b2ceee019c15599b0cb5d914da0e7723 diff --git a/net-libs/paho-mqtt-c/paho-mqtt-c-1.3.15.ebuild b/net-libs/paho-mqtt-c/paho-mqtt-c-1.3.15.ebuild new file mode 100644 index 000000000000..b36fd5bdad82 --- /dev/null +++ b/net-libs/paho-mqtt-c/paho-mqtt-c-1.3.15.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..14} pypy3_11 ) + +inherit cmake python-any-r1 toolchain-funcs + +TEST_UTILS="paho.mqtt.testing" +TEST_COMMIT="9d7bb80bb8b9d9cfc0b52f8cb4c1916401281103" + +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/${TEST_UTILS}/archive/${TEST_COMMIT}.tar.gz -> ${TEST_UTILS}-${TEST_COMMIT}.tar.gz +" +S="${WORKDIR}/paho.mqtt.c-${PV}" + +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 )" + +# Tests require net-redirections to be enabled in bash. See bug #915718 +BDEPEND=" + doc? ( app-text/doxygen + media-gfx/graphviz ) + ssl? ( dev-libs/openssl ) + test? ( + ${PYTHON_DEPS} + app-shells/bash[net] + ) +" + +# Tests can be run only if a MQTT broker is available +RESTRICT="!test? ( test )" + +BUILD_DIR="${S}_build" + +src_prepare(){ + cmake_src_prepare + if use test; then + mv "${WORKDIR}/${TEST_UTILS}-${TEST_COMMIT}" "${WORKDIR}/${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}/${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 +}
