diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-18 00:58:25 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-18 00:58:25 +0100 |
commit | 5e0a5ca921524f8859808527a57655eec16efa52 (patch) | |
tree | 7c58411b1e81478df4e20082a6adec2553c24c5c /dev-libs/paho-mqtt-c | |
parent | 4c16e0a214824f15f09396e359db4f1f5c086fec (diff) |
gentoo auto-resync : 18:07:2023 - 00:58:24
Diffstat (limited to 'dev-libs/paho-mqtt-c')
-rw-r--r-- | dev-libs/paho-mqtt-c/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/paho-mqtt-c/paho-mqtt-c-1.3.12.ebuild | 55 |
2 files changed, 47 insertions, 11 deletions
diff --git a/dev-libs/paho-mqtt-c/Manifest b/dev-libs/paho-mqtt-c/Manifest index 882699c49aae..d906fff8b6af 100644 --- a/dev-libs/paho-mqtt-c/Manifest +++ b/dev-libs/paho-mqtt-c/Manifest @@ -1,4 +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 1882 BLAKE2B ff25a193d77bcc77a8bf817e1dc9d5a2a90cf40e48190d9f9fbc3d24bddbd10bd17d9de951c07f0d57b8f55668553c569a815f83756cc1811fd1402fcaac06c9 SHA512 5b21516edd52ae621079b409990f12dacf9ff8ee70a162ff4c5f0a485527be62fb1fc0e141c65437252a0ca51a0fddcde852d8240ed686b8f8ecf26fd714b9b1 +EBUILD paho-mqtt-c-1.3.12.ebuild 2673 BLAKE2B d75127d22d0757b9afc50527c166ae3262fb6dd4eaf7b1e21538ca9a0c177c6f6185b326111fca186321f6d59a57cda56b66e7258b265291ea650b9d678bdd28 SHA512 7e2ce0fe8e3734bc5ab0512776c81b60a1d70213b99389be90ffe7c230f3d186bf8e342e670b0f92dc25ddd4be7bebb673482fb6299d56419f638da7eacb4d4c MISC metadata.xml 812 BLAKE2B acf5c65842b641cbc813df4786c3cb65b6e7155b5082b5bee50bf7abb6531fab53bb4a4fad9452a062d7612cc663eb4e3327a4e9c9c9a9349f1b139289c7943c SHA512 f1aa7056cde248fb0976bf8b635017311aa6a53961fdf5c02eb601c1ffdc0079693d430ef143410a8873a07cf4809443fde98436c0ff640a0625361ffe488789 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 index f1713fe8f0c1..e417fe9118a4 100644 --- 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 @@ -9,18 +9,20 @@ 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="+high-performance +ssl doc test" +IUSE="doc examples +high-performance +ssl test" BDEPEND=" doc? ( app-doc/doxygen @@ -36,21 +38,27 @@ 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 - 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() { @@ -59,9 +67,36 @@ src_test() { return fi - ${EPYTHON} "${BUILD_DIR}"/test/"${MY_TEST_UTILS}"/interoperability/startbroker.py -c \ - "${BUILD_DIR}"/test/"${MY_TEST_UTILS}"/interoperability/localhost_testing.conf & + cd "${WORKDIR}/${MY_TEST_UTILS}/interoperability" || die - ${EPYTHON} "${BUILD_DIR}"/test/mqttsas.py & + ${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 } |