1 |
commit: a10e73daa7b72d562e006beb77817712dbb606e5 |
2 |
Author: Lucas Ramage <ramage.lucas <AT> openmailbox <DOT> org> |
3 |
AuthorDate: Thu Apr 26 17:19:14 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 30 01:26:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a10e73da |
7 |
|
8 |
app-misc/mosquitto: fix conditional tests for v1.4.15 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/650632 |
11 |
Closes: https://bugs.gentoo.org/653238 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/8027 |
13 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
14 |
|
15 |
.../files/mosquitto-1.4.15-conditional-tests.patch | 12 +++ |
16 |
app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild | 102 +++++++++++++++++++++ |
17 |
2 files changed, 114 insertions(+) |
18 |
|
19 |
diff --git a/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..1642597c562 |
22 |
--- /dev/null |
23 |
+++ b/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch |
24 |
@@ -0,0 +1,12 @@ |
25 |
+--- a/test/broker/c/Makefile 2016-02-14 14:36:55.000000000 +0000 |
26 |
++++ b/test/broker/c/Makefile 2016-05-05 09:40:31.440608209 +0100 |
27 |
+@@ -13,7 +13,9 @@ |
28 |
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1 |
29 |
+ |
30 |
+ 08-tls-psk-bridge.test : 08-tls-psk-bridge.c |
31 |
++ifeq ($(WITH_BRIDGE),yes) |
32 |
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1 |
33 |
++endif |
34 |
+ |
35 |
+ |
36 |
+ reallyclean : clean |
37 |
|
38 |
diff --git a/app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild b/app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild |
39 |
new file mode 100644 |
40 |
index 00000000000..48165a4db6f |
41 |
--- /dev/null |
42 |
+++ b/app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild |
43 |
@@ -0,0 +1,102 @@ |
44 |
+# Copyright 1999-2018 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI=6 |
48 |
+PYTHON_COMPAT=( python2_7 ) |
49 |
+ |
50 |
+inherit systemd user toolchain-funcs python-any-r1 |
51 |
+ |
52 |
+DESCRIPTION="An Open Source MQTT v3 Broker" |
53 |
+HOMEPAGE="https://mosquitto.org/" |
54 |
+SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz" |
55 |
+ |
56 |
+LICENSE="EPL-1.0" |
57 |
+SLOT="0" |
58 |
+KEYWORDS="~amd64 ~arm ~x86" |
59 |
+IUSE="bridge examples +persistence +srv ssl tcpd test websockets" |
60 |
+ |
61 |
+REQUIRED_USE="test? ( bridge )" |
62 |
+ |
63 |
+RDEPEND="tcpd? ( sys-apps/tcp-wrappers ) |
64 |
+ ssl? ( dev-libs/openssl:0= )" |
65 |
+DEPEND="${RDEPEND} |
66 |
+ ${PYTHON_DEPS} |
67 |
+ srv? ( net-dns/c-ares ) |
68 |
+ websockets? ( net-libs/libwebsockets )" |
69 |
+ |
70 |
+PATCHES=( "${FILESDIR}/${P}-conditional-tests.patch" ) |
71 |
+ |
72 |
+_emake() { |
73 |
+ LIBDIR=$(get_libdir) |
74 |
+ emake \ |
75 |
+ CC="$(tc-getCC)" \ |
76 |
+ LIB_SUFFIX="${LIBDIR:3}" \ |
77 |
+ WITH_BRIDGE="$(usex bridge)" \ |
78 |
+ WITH_PERSISTENCE="$(usex persistence)" \ |
79 |
+ WITH_SRV="$(usex srv)" \ |
80 |
+ WITH_TLS="$(usex ssl)" \ |
81 |
+ WITH_WEBSOCKETS="$(usex websockets)" \ |
82 |
+ WITH_WRAP="$(usex tcpd)" \ |
83 |
+ "$@" |
84 |
+} |
85 |
+ |
86 |
+pkg_setup() { |
87 |
+ enewgroup mosquitto |
88 |
+ enewuser mosquitto -1 -1 -1 mosquitto |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ if use persistence; then |
94 |
+ sed -i -e "/^#autosave_interval/s|^#||" \ |
95 |
+ -e "s|^#persistence false$|persistence true|" \ |
96 |
+ -e "/^#persistence_file/s|^#||" \ |
97 |
+ -e "s|#persistence_location|persistence_location /var/lib/mosquitto/|" \ |
98 |
+ mosquitto.conf || die |
99 |
+ fi |
100 |
+ |
101 |
+ # Remove prestripping |
102 |
+ sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\ |
103 |
+ client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die |
104 |
+ |
105 |
+ python_setup |
106 |
+ python_fix_shebang test |
107 |
+} |
108 |
+ |
109 |
+src_compile() { |
110 |
+ _emake |
111 |
+} |
112 |
+ |
113 |
+src_test() { |
114 |
+ _emake test |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ _emake DESTDIR="${D}" prefix=/usr install |
119 |
+ keepdir /var/lib/mosquitto |
120 |
+ fowners mosquitto:mosquitto /var/lib/mosquitto |
121 |
+ dodoc readme.md CONTRIBUTING.md ChangeLog.txt |
122 |
+ doinitd "${FILESDIR}"/mosquitto |
123 |
+ insinto /etc/mosquitto |
124 |
+ doins mosquitto.conf |
125 |
+ systemd_dounit "${FILESDIR}/mosquitto.service" |
126 |
+ |
127 |
+ if use examples; then |
128 |
+ docompress -x "/usr/share/doc/${PF}/examples" |
129 |
+ docinto "/usr/share/doc/${PF}" |
130 |
+ doins -r examples |
131 |
+ fi |
132 |
+} |
133 |
+ |
134 |
+pkg_postinst() { |
135 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
136 |
+ elog "The Python module has been moved out of mosquitto." |
137 |
+ elog "See https://mosquitto.org/documentation/python/" |
138 |
+ else |
139 |
+ elog "To start the mosquitto daemon at boot, add it to the default runlevel with:" |
140 |
+ elog "" |
141 |
+ elog " rc-update add mosquitto default" |
142 |
+ elog " or" |
143 |
+ elog " systemctl enable mosquitto" |
144 |
+ fi |
145 |
+} |