1 |
commit: 3535975cfd500525a358cd54e9f91036b93856a8 |
2 |
Author: Marc Cramer <m1027 <AT> posteo <DOT> net> |
3 |
AuthorDate: Thu Aug 18 20:26:37 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 19 03:28:04 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3535975c |
7 |
|
8 |
app-misc/mosquitto: Version bump to 2.0.15 |
9 |
|
10 |
... with some updates by mattst88: |
11 |
|
12 |
* Bump to EAPI=8 |
13 |
* Add Python 3.11 compatibility |
14 |
* Move ${PYTHON_DEPS} from DEPEND to BDEPEND, and only under USE=test |
15 |
* Move python_setup to pkg_setup(), and only under USE=test |
16 |
* Call python_fix_shebang only under USE=test |
17 |
* Remove no-op prestripping sed |
18 |
* Update failing test list |
19 |
|
20 |
Closes: https://github.com/gentoo/gentoo/pull/26915 |
21 |
Signed-off-by: Marc Cramer <m1027 <AT> posteo.net> |
22 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
23 |
|
24 |
app-misc/mosquitto/Manifest | 1 + |
25 |
app-misc/mosquitto/mosquitto-2.0.15.ebuild | 125 +++++++++++++++++++++++++++++ |
26 |
2 files changed, 126 insertions(+) |
27 |
|
28 |
diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest |
29 |
index c5a5d28f4bef..b02492d6ee37 100644 |
30 |
--- a/app-misc/mosquitto/Manifest |
31 |
+++ b/app-misc/mosquitto/Manifest |
32 |
@@ -1 +1,2 @@ |
33 |
DIST mosquitto-2.0.14.tar.gz 787414 BLAKE2B 926e39756a0293404c8591e489e64e47cd95640d7884f2cfb687a0d548b709d8aff6d671a4941aae8b3506315d28567520c183b762639822d2d78afe323d111e SHA512 a9e4f41b9af679b30318570e86a465546024651373df10e3b132f4593b89d22d0dbac01bb7371a57132ba030a2e73971c612acb5c9ac12f5ccd06aa38d9444c2 |
34 |
+DIST mosquitto-2.0.15.tar.gz 792632 BLAKE2B a6e986998473c16efd4c5fc5fd743782e085b3e7e30bcdcb867f0ae87f85e608f5d50d0dcc5bbbcc2f25eb6a618ab2f287fdcba47660fa593fe1636d08eb183e SHA512 8a0c58222ea0b9304e7f096f6d13965478072baf1d1c9bc931b32a33f5ea8196c2dd54bde8d83fec7ed9cd413cb5fb115ce0a6701ca20664df52fdd7ca63ddaf |
35 |
|
36 |
diff --git a/app-misc/mosquitto/mosquitto-2.0.15.ebuild b/app-misc/mosquitto/mosquitto-2.0.15.ebuild |
37 |
new file mode 100644 |
38 |
index 000000000000..a584158956db |
39 |
--- /dev/null |
40 |
+++ b/app-misc/mosquitto/mosquitto-2.0.15.ebuild |
41 |
@@ -0,0 +1,125 @@ |
42 |
+# Copyright 1999-2022 Gentoo Authors |
43 |
+# Distributed under the terms of the GNU General Public License v2 |
44 |
+ |
45 |
+EAPI=8 |
46 |
+PYTHON_COMPAT=( python3_{8..11} ) |
47 |
+ |
48 |
+inherit python-any-r1 systemd toolchain-funcs |
49 |
+ |
50 |
+DESCRIPTION="An Open Source MQTT v3 Broker" |
51 |
+HOMEPAGE="https://mosquitto.org/ https://github.com/eclipse/mosquitto" |
52 |
+SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz" |
53 |
+ |
54 |
+LICENSE="EPL-1.0" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
57 |
+IUSE="bridge examples +persistence +srv ssl tcpd test websockets" |
58 |
+RESTRICT="!test? ( test )" |
59 |
+ |
60 |
+REQUIRED_USE="test? ( bridge )" |
61 |
+ |
62 |
+RDEPEND=" |
63 |
+ acct-user/mosquitto |
64 |
+ acct-group/mosquitto |
65 |
+ dev-libs/cJSON:= |
66 |
+ srv? ( net-dns/c-ares:= ) |
67 |
+ ssl? ( |
68 |
+ dev-libs/openssl:0= |
69 |
+ ) |
70 |
+ tcpd? ( sys-apps/tcp-wrappers ) |
71 |
+" |
72 |
+DEPEND=" |
73 |
+ ${RDEPEND} |
74 |
+ test? ( dev-util/cunit ) |
75 |
+ websockets? ( net-libs/libwebsockets[lejp] ) |
76 |
+" |
77 |
+BDEPEND=" |
78 |
+ test? ( ${PYTHON_DEPS} ) |
79 |
+" |
80 |
+ |
81 |
+pkg_setup() { |
82 |
+ use test && python_setup |
83 |
+} |
84 |
+ |
85 |
+_emake() { |
86 |
+ local LIBDIR=$(get_libdir) |
87 |
+ emake \ |
88 |
+ CC="$(tc-getCC)" \ |
89 |
+ CXX="$(tc-getCXX)" \ |
90 |
+ CLIENT_LDFLAGS="${LDFLAGS}" \ |
91 |
+ LIB_SUFFIX="${LIBDIR:3}" \ |
92 |
+ WITH_BRIDGE="$(usex bridge)" \ |
93 |
+ WITH_PERSISTENCE="$(usex persistence)" \ |
94 |
+ WITH_SRV="$(usex srv)" \ |
95 |
+ WITH_TLS="$(usex ssl)" \ |
96 |
+ WITH_WEBSOCKETS="$(usex websockets)" \ |
97 |
+ WITH_WRAP="$(usex tcpd)" \ |
98 |
+ "$@" |
99 |
+} |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ default |
103 |
+ if use persistence; then |
104 |
+ sed -i -e "/^#autosave_interval/s|^#||" \ |
105 |
+ -e "s|^#persistence false$|persistence true|" \ |
106 |
+ -e "/^#persistence_file/s|^#||" \ |
107 |
+ -e "s|#persistence_location|persistence_location /var/lib/mosquitto/|" \ |
108 |
+ mosquitto.conf || die |
109 |
+ fi |
110 |
+ |
111 |
+ # Remove failing tests |
112 |
+ sed -i \ |
113 |
+ -e '/06-bridge-reconnect-local-out.py/d' \ |
114 |
+ test/broker/Makefile || die |
115 |
+ sed -i \ |
116 |
+ -e '/02-subscribe-qos1-async2.test/d' \ |
117 |
+ test/lib/Makefile || die |
118 |
+ |
119 |
+ # Extend test timeout to prevent spurious failures |
120 |
+ sed -i -e 's/SUB_TIMEOUT=1/SUB_TIMEOUT=3/' \ |
121 |
+ test/client/test.sh || die |
122 |
+ |
123 |
+ use test && python_fix_shebang test |
124 |
+} |
125 |
+ |
126 |
+src_compile() { |
127 |
+ _emake |
128 |
+} |
129 |
+ |
130 |
+src_test() { |
131 |
+ _emake test |
132 |
+} |
133 |
+ |
134 |
+src_install() { |
135 |
+ _emake DESTDIR="${D}" prefix=/usr install |
136 |
+ keepdir /var/lib/mosquitto |
137 |
+ fowners mosquitto:mosquitto /var/lib/mosquitto |
138 |
+ dodoc README.md CONTRIBUTING.md ChangeLog.txt |
139 |
+ doinitd "${FILESDIR}"/mosquitto |
140 |
+ insinto /etc/mosquitto |
141 |
+ doins mosquitto.conf |
142 |
+ insinto /usr/share/mosquitto |
143 |
+ doins misc/letsencrypt/mosquitto-copy.sh |
144 |
+ systemd_dounit "${FILESDIR}/mosquitto.service" |
145 |
+ |
146 |
+ if use examples; then |
147 |
+ docompress -x "/usr/share/doc/${PF}/examples" |
148 |
+ dodoc -r examples |
149 |
+ fi |
150 |
+} |
151 |
+ |
152 |
+pkg_postinst() { |
153 |
+ for v in ${REPLACING_VERSIONS}; do |
154 |
+ if [[ $(ver_cut 1 "$v") -lt 2 ]]; then |
155 |
+ elog |
156 |
+ elog "Please read the migration guide at:" |
157 |
+ elog "https://mosquitto.org/documentation/migrating-to-2-0/" |
158 |
+ elog |
159 |
+ elog "If you use Lets Encrypt TLS certificates, take note of" |
160 |
+ elog "the changes required to run the daemon as the unprivileged" |
161 |
+ elog "mosquitto user. The mosquitto-copy.sh script has been" |
162 |
+ elog "installed to /usr/share/mosquitto/ for your convenience." |
163 |
+ elog |
164 |
+ fi |
165 |
+ done |
166 |
+} |