Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/mosquitto/
Date: Sun, 07 Nov 2021 04:28:30
Message-Id: 1636259282.f4442d59b68a818e2ab4a7d13812999f4044ab0a.mattst88@gentoo
1 commit: f4442d59b68a818e2ab4a7d13812999f4044ab0a
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 7 04:26:06 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 7 04:28:02 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4442d59
7
8 app-misc/mosquitto: Version bump to 2.0.13
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 app-misc/mosquitto/Manifest | 1 +
13 app-misc/mosquitto/mosquitto-2.0.13.ebuild | 122 +++++++++++++++++++++++++++++
14 2 files changed, 123 insertions(+)
15
16 diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest
17 index 5daa9507d7f..6cb1210345d 100644
18 --- a/app-misc/mosquitto/Manifest
19 +++ b/app-misc/mosquitto/Manifest
20 @@ -1,3 +1,4 @@
21 DIST mosquitto-1.6.15.tar.gz 620117 BLAKE2B 0107ed0af902b84c73b857ccd97dfe96b1c7ed8604b843ad40f62d3f1246ded4ef1691158311ac9a672ca331f569d13547165f3a0386c77e94ddc13c8a9e3e00 SHA512 30fa2e8a15b87a33d6c8fc3a1f5d45d8e15d284fade116ac5b7bc8722609d565bed22ac592c303fc74352e3272067b2b0c8da463abffc6490cf959ce177329f3
22 DIST mosquitto-2.0.11.tar.gz 760325 BLAKE2B adde701bb87ec8071eaaf74fca37f81c4eae97bf98de0fe471f1dfbfb64ccda15b34611b0ffc3d2099a37994151363ad5c717bfa7695fabc1a4927ebd14ae66e SHA512 d0c7c52cb76c4711e54f841217529326d682c4decfc7a1bc96d872904e68df444ca3918fab7ba041b62f7b5420c89c631227b69a8eec51fd2e2dd480d8244710
23 DIST mosquitto-2.0.12.tar.gz 783859 BLAKE2B 3bac953fc7f49e19f1914186044c75d7f8b5b23e656acfb7d4c306740d0add20c08760fc206fc871c5cecf8500eb1c88acc4905bddce159d1e8f0c4e2c28b818 SHA512 acf80980f124073fd2fdd99981bde840654fb40a6b6f1d6ef483e35880b45d029cfa9390a98753de6476f4ade068266cb4c6e3c753a0362c0309a5745ac4ebab
24 +DIST mosquitto-2.0.13.tar.gz 786806 BLAKE2B 83c5c93a209225a24812c494e6065fb4ed4c65ccb34ac60918e5c32683702a9d44f162ccc366d8c2612c6fa867b56e01aaea04b2387f44b77294259198439ad0 SHA512 f22331c0a5a501b3df50b5c4788b735599024837eec4f455d422253a20e6f4ac528044ff4a7611094af87a8059e9a836157e5dc092efedf958ed7c96e5b9f9d0
25
26 diff --git a/app-misc/mosquitto/mosquitto-2.0.13.ebuild b/app-misc/mosquitto/mosquitto-2.0.13.ebuild
27 new file mode 100644
28 index 00000000000..056871a3f29
29 --- /dev/null
30 +++ b/app-misc/mosquitto/mosquitto-2.0.13.ebuild
31 @@ -0,0 +1,122 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +
38 +inherit python-any-r1 systemd toolchain-funcs
39 +
40 +DESCRIPTION="An Open Source MQTT v3 Broker"
41 +HOMEPAGE="https://mosquitto.org/ https://github.com/eclipse/mosquitto"
42 +SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz"
43 +
44 +LICENSE="EPL-1.0"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
47 +IUSE="bridge examples +persistence +srv ssl tcpd test websockets"
48 +RESTRICT="!test? ( test )"
49 +
50 +REQUIRED_USE="test? ( bridge )"
51 +
52 +RDEPEND="
53 + acct-user/mosquitto
54 + acct-group/mosquitto
55 + dev-libs/cJSON:=
56 + srv? ( net-dns/c-ares:= )
57 + ssl? (
58 + dev-libs/openssl:0=
59 + )
60 + tcpd? ( sys-apps/tcp-wrappers )"
61 +
62 +DEPEND="${PYTHON_DEPS}
63 + ${RDEPEND}
64 + test? ( dev-util/cunit )
65 + websockets? ( net-libs/libwebsockets[lejp] )"
66 +
67 +_emake() {
68 + local LIBDIR=$(get_libdir)
69 + emake \
70 + CC="$(tc-getCC)" \
71 + CXX="$(tc-getCXX)" \
72 + CLIENT_LDFLAGS="${LDFLAGS}" \
73 + LIB_SUFFIX="${LIBDIR:3}" \
74 + WITH_BRIDGE="$(usex bridge)" \
75 + WITH_PERSISTENCE="$(usex persistence)" \
76 + WITH_SRV="$(usex srv)" \
77 + WITH_TLS="$(usex ssl)" \
78 + WITH_WEBSOCKETS="$(usex websockets)" \
79 + WITH_WRAP="$(usex tcpd)" \
80 + "$@"
81 +}
82 +
83 +src_prepare() {
84 + default
85 + if use persistence; then
86 + sed -i -e "/^#autosave_interval/s|^#||" \
87 + -e "s|^#persistence false$|persistence true|" \
88 + -e "/^#persistence_file/s|^#||" \
89 + -e "s|#persistence_location|persistence_location /var/lib/mosquitto/|" \
90 + mosquitto.conf || die
91 + fi
92 +
93 + # Remove prestripping
94 + sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
95 + client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
96 +
97 + # Remove failing tests
98 + sed -i \
99 + -e '/01-connect-575314.py/d' \
100 + test/broker/Makefile || die
101 + sed -i \
102 + -e '/02-subscribe-qos1-async2.test/d' \
103 + test/lib/Makefile || die
104 +
105 + # Extend test timeout to prevent spurious failures
106 + sed -i -e 's/SUB_TIMEOUT=1/SUB_TIMEOUT=3/' \
107 + test/client/test.sh || die
108 +
109 + python_setup
110 + python_fix_shebang test
111 +}
112 +
113 +src_compile() {
114 + _emake
115 +}
116 +
117 +src_test() {
118 + _emake test
119 +}
120 +
121 +src_install() {
122 + _emake DESTDIR="${D}" prefix=/usr install
123 + keepdir /var/lib/mosquitto
124 + fowners mosquitto:mosquitto /var/lib/mosquitto
125 + dodoc README.md CONTRIBUTING.md ChangeLog.txt
126 + doinitd "${FILESDIR}"/mosquitto
127 + insinto /etc/mosquitto
128 + doins mosquitto.conf
129 + insinto /usr/share/mosquitto
130 + doins misc/letsencrypt/mosquitto-copy.sh
131 + systemd_dounit "${FILESDIR}/mosquitto.service"
132 +
133 + if use examples; then
134 + docompress -x "/usr/share/doc/${PF}/examples"
135 + dodoc -r examples
136 + fi
137 +}
138 +
139 +pkg_postinst() {
140 + for v in ${REPLACING_VERSIONS}; do
141 + if [[ $(ver_cut 1 "$v") -lt 2 ]]; then
142 + elog
143 + elog "Please read the migration guide at:"
144 + elog "https://mosquitto.org/documentation/migrating-to-2-0/"
145 + elog
146 + elog "If you use Lets Encrypt TLS certificates, take note of"
147 + elog "the changes required to run the daemon as the unprivileged"
148 + elog "mosquitto user. The mosquitto-copy.sh script has been"
149 + elog "installed to /usr/share/mosquitto/ for your convenience."
150 + elog
151 + fi
152 + done
153 +}