1 |
commit: f57017c7b8db7183a8acb80a6292e700c0efd0d6 |
2 |
Author: Florian Schmaus <flow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 27 10:26:14 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 27 10:27:11 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f57017c7 |
7 |
|
8 |
net-im/biboumi: enable src_test |
9 |
|
10 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
11 |
|
12 |
net-im/biboumi/biboumi-9.0-r3.ebuild | 16 +- |
13 |
.../files/biboumi-9.0-use-system-catch2.patch | 229 +++++++++++++++++++++ |
14 |
2 files changed, 242 insertions(+), 3 deletions(-) |
15 |
|
16 |
diff --git a/net-im/biboumi/biboumi-9.0-r3.ebuild b/net-im/biboumi/biboumi-9.0-r3.ebuild |
17 |
index 90caef48feda..9f6fa3b33906 100644 |
18 |
--- a/net-im/biboumi/biboumi-9.0-r3.ebuild |
19 |
+++ b/net-im/biboumi/biboumi-9.0-r3.ebuild |
20 |
@@ -14,9 +14,10 @@ SRC_URI="https://git.louiz.org/biboumi/snapshot/biboumi-${MY_PV}.tar.xz" |
21 |
LICENSE="ZLIB" |
22 |
SLOT="0" |
23 |
KEYWORDS="~amd64" |
24 |
-IUSE="+idn postgres +sqlite +ssl systemd udns" |
25 |
+IUSE="+idn postgres +sqlite +ssl systemd test udns" |
26 |
+RESTRICT="!test? ( test )" |
27 |
|
28 |
-DEPEND=" |
29 |
+COMMON_DEPEND=" |
30 |
dev-libs/expat |
31 |
virtual/libiconv |
32 |
sys-apps/util-linux |
33 |
@@ -28,9 +29,13 @@ DEPEND=" |
34 |
!ssl? ( dev-libs/libgcrypt ) |
35 |
systemd? ( sys-apps/systemd:= ) |
36 |
" |
37 |
+DEPEND=" |
38 |
+ ${COMMON_DEPEND} |
39 |
+ test? ( dev-cpp/catch:0 ) |
40 |
+" |
41 |
BDEPEND="dev-python/sphinx" |
42 |
RDEPEND=" |
43 |
- ${DEPEND} |
44 |
+ ${COMMON_DEPEND} |
45 |
acct-user/biboumi |
46 |
" |
47 |
|
48 |
@@ -40,6 +45,7 @@ DOCS=( README.rst CHANGELOG.rst doc/user.rst ) |
49 |
|
50 |
PATCHES=( |
51 |
"${FILESDIR}/${PN}-9.0-fix-namespace-separator.patch" |
52 |
+ "${FILESDIR}/${PN}-9.0-use-system-catch2.patch" |
53 |
) |
54 |
|
55 |
src_configure() { |
56 |
@@ -94,6 +100,10 @@ src_compile() { |
57 |
cmake_build man |
58 |
} |
59 |
|
60 |
+src_test() { |
61 |
+ cmake_build check |
62 |
+} |
63 |
+ |
64 |
src_install() { |
65 |
cmake_src_install |
66 |
|
67 |
|
68 |
diff --git a/net-im/biboumi/files/biboumi-9.0-use-system-catch2.patch b/net-im/biboumi/files/biboumi-9.0-use-system-catch2.patch |
69 |
new file mode 100644 |
70 |
index 000000000000..edda7a37c50b |
71 |
--- /dev/null |
72 |
+++ b/net-im/biboumi/files/biboumi-9.0-use-system-catch2.patch |
73 |
@@ -0,0 +1,229 @@ |
74 |
+From 414ab9e13fc9e9fa79f7f0a8e1b4a46cd3bd92fd Mon Sep 17 00:00:00 2001 |
75 |
+From: Florian Schmaus <flo@×××××××××.eu> |
76 |
+Date: Sun, 27 Feb 2022 11:06:42 +0100 |
77 |
+Subject: [PATCH] Use the system installation of catch2 if possible |
78 |
+ |
79 |
+--- |
80 |
+ CMakeLists.txt | 41 ++++++++++++++++++++++++----------------- |
81 |
+ tests/colors.cpp | 2 +- |
82 |
+ tests/config.cpp | 2 +- |
83 |
+ tests/database.cpp | 2 +- |
84 |
+ tests/encoding.cpp | 2 +- |
85 |
+ tests/iid.cpp | 2 +- |
86 |
+ tests/io_tester.cpp | 2 +- |
87 |
+ tests/irc.cpp | 2 +- |
88 |
+ tests/jid.cpp | 2 +- |
89 |
+ tests/logger.cpp | 2 +- |
90 |
+ tests/network.cpp | 2 +- |
91 |
+ tests/test.cpp | 2 +- |
92 |
+ tests/timed_events.cpp | 2 +- |
93 |
+ tests/utils.cpp | 2 +- |
94 |
+ tests/uuid.cpp | 2 +- |
95 |
+ tests/xmpp.cpp | 2 +- |
96 |
+ 16 files changed, 39 insertions(+), 32 deletions(-) |
97 |
+ |
98 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
99 |
+index f07b97feb57b..8175012fe070 100644 |
100 |
+--- a/CMakeLists.txt |
101 |
++++ b/CMakeLists.txt |
102 |
+@@ -288,24 +288,31 @@ foreach(file ${source_all}) |
103 |
+ endforeach() |
104 |
+ |
105 |
+ # |
106 |
+-## Add a rule to download the catch unit test framework |
107 |
++## Catch unit test framework |
108 |
+ # |
109 |
+-include(ExternalProject) |
110 |
+-ExternalProject_Add(catch |
111 |
+- GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git" |
112 |
+- PREFIX "external" |
113 |
+- UPDATE_COMMAND "" |
114 |
+- CONFIGURE_COMMAND "" |
115 |
+- BUILD_COMMAND "" |
116 |
+- INSTALL_COMMAND "" |
117 |
+- ) |
118 |
+-set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE) |
119 |
+-ExternalProject_Get_Property(catch SOURCE_DIR) |
120 |
+-if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) |
121 |
+- target_include_directories(test_suite |
122 |
+- PUBLIC "${SOURCE_DIR}/single_include/" |
123 |
+- ) |
124 |
+- add_dependencies(test_suite catch) |
125 |
++find_package(Catch2 2.2.1) |
126 |
++if(Catch2_FOUND) |
127 |
++ target_link_libraries(test_suite Catch2::Catch2) |
128 |
++else() |
129 |
++ # No system-wide installation of the catch unit test framework was |
130 |
++ # found, download it. |
131 |
++ include(ExternalProject) |
132 |
++ ExternalProject_Add(catch |
133 |
++ GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git" |
134 |
++ PREFIX "external" |
135 |
++ UPDATE_COMMAND "" |
136 |
++ CONFIGURE_COMMAND "" |
137 |
++ BUILD_COMMAND "" |
138 |
++ INSTALL_COMMAND "" |
139 |
++ ) |
140 |
++ set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE) |
141 |
++ ExternalProject_Get_Property(catch SOURCE_DIR) |
142 |
++ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp) |
143 |
++ target_include_directories(test_suite |
144 |
++ PUBLIC "${SOURCE_DIR}/single_include/" |
145 |
++ ) |
146 |
++ add_dependencies(test_suite catch) |
147 |
++ endif() |
148 |
+ endif() |
149 |
+ |
150 |
+ # |
151 |
+diff --git a/tests/colors.cpp b/tests/colors.cpp |
152 |
+index bf529896dce7..a9761dfff648 100644 |
153 |
+--- a/tests/colors.cpp |
154 |
++++ b/tests/colors.cpp |
155 |
+@@ -1,4 +1,4 @@ |
156 |
+-#include "catch.hpp" |
157 |
++#include "catch2/catch.hpp" |
158 |
+ |
159 |
+ #include <bridge/colors.hpp> |
160 |
+ #include <xmpp/xmpp_stanza.hpp> |
161 |
+diff --git a/tests/config.cpp b/tests/config.cpp |
162 |
+index ec9844fbd5f6..76cfe92e3e51 100644 |
163 |
+--- a/tests/config.cpp |
164 |
++++ b/tests/config.cpp |
165 |
+@@ -1,4 +1,4 @@ |
166 |
+-#include "catch.hpp" |
167 |
++#include "catch2/catch.hpp" |
168 |
+ #include "io_tester.hpp" |
169 |
+ |
170 |
+ #include <iostream> |
171 |
+diff --git a/tests/database.cpp b/tests/database.cpp |
172 |
+index 070a46013997..bf6bc20324cb 100644 |
173 |
+--- a/tests/database.cpp |
174 |
++++ b/tests/database.cpp |
175 |
+@@ -1,4 +1,4 @@ |
176 |
+-#include "catch.hpp" |
177 |
++#include "catch2/catch.hpp" |
178 |
+ |
179 |
+ #include <biboumi.h> |
180 |
+ |
181 |
+diff --git a/tests/encoding.cpp b/tests/encoding.cpp |
182 |
+index b5192ffbdb8d..8129abc9230e 100644 |
183 |
+--- a/tests/encoding.cpp |
184 |
++++ b/tests/encoding.cpp |
185 |
+@@ -1,4 +1,4 @@ |
186 |
+-#include "catch.hpp" |
187 |
++#include "catch2/catch.hpp" |
188 |
+ |
189 |
+ #include <utils/encoding.hpp> |
190 |
+ |
191 |
+diff --git a/tests/iid.cpp b/tests/iid.cpp |
192 |
+index 63b2ba38ca55..7e61f35e348b 100644 |
193 |
+--- a/tests/iid.cpp |
194 |
++++ b/tests/iid.cpp |
195 |
+@@ -1,4 +1,4 @@ |
196 |
+-#include "catch.hpp" |
197 |
++#include "catch2/catch.hpp" |
198 |
+ |
199 |
+ #include <irc/iid.hpp> |
200 |
+ #include <irc/irc_user.hpp> |
201 |
+diff --git a/tests/io_tester.cpp b/tests/io_tester.cpp |
202 |
+index 19c97c91aff8..34f89fdac603 100644 |
203 |
+--- a/tests/io_tester.cpp |
204 |
++++ b/tests/io_tester.cpp |
205 |
+@@ -1,5 +1,5 @@ |
206 |
+ #include "io_tester.hpp" |
207 |
+-#include "catch.hpp" |
208 |
++#include "catch2/catch.hpp" |
209 |
+ #include <iostream> |
210 |
+ |
211 |
+ /** |
212 |
+diff --git a/tests/irc.cpp b/tests/irc.cpp |
213 |
+index 0f30f15e2fdf..cb53e3f226ff 100644 |
214 |
+--- a/tests/irc.cpp |
215 |
++++ b/tests/irc.cpp |
216 |
+@@ -1,4 +1,4 @@ |
217 |
+-#include "catch.hpp" |
218 |
++#include "catch2/catch.hpp" |
219 |
+ |
220 |
+ #include <irc/irc_message.hpp> |
221 |
+ |
222 |
+diff --git a/tests/jid.cpp b/tests/jid.cpp |
223 |
+index 592d6f3d0b78..516f961fabbb 100644 |
224 |
+--- a/tests/jid.cpp |
225 |
++++ b/tests/jid.cpp |
226 |
+@@ -1,4 +1,4 @@ |
227 |
+-#include "catch.hpp" |
228 |
++#include "catch2/catch.hpp" |
229 |
+ |
230 |
+ #include <xmpp/jid.hpp> |
231 |
+ #include <biboumi.h> |
232 |
+diff --git a/tests/logger.cpp b/tests/logger.cpp |
233 |
+index 1e3392a4bd43..b4736da3648d 100644 |
234 |
+--- a/tests/logger.cpp |
235 |
++++ b/tests/logger.cpp |
236 |
+@@ -1,4 +1,4 @@ |
237 |
+-#include "catch.hpp" |
238 |
++#include "catch2/catch.hpp" |
239 |
+ |
240 |
+ #include <logger/logger.hpp> |
241 |
+ #include <config/config.hpp> |
242 |
+diff --git a/tests/network.cpp b/tests/network.cpp |
243 |
+index a52eb6acfef8..790190f8d0bf 100644 |
244 |
+--- a/tests/network.cpp |
245 |
++++ b/tests/network.cpp |
246 |
+@@ -1,4 +1,4 @@ |
247 |
+-#include "catch.hpp" |
248 |
++#include "catch2/catch.hpp" |
249 |
+ #include <network/tls_policy.hpp> |
250 |
+ #include <sstream> |
251 |
+ |
252 |
+diff --git a/tests/test.cpp b/tests/test.cpp |
253 |
+index 0c7c351f437f..62bf7476a189 100644 |
254 |
+--- a/tests/test.cpp |
255 |
++++ b/tests/test.cpp |
256 |
+@@ -1,2 +1,2 @@ |
257 |
+ #define CATCH_CONFIG_MAIN |
258 |
+-#include "catch.hpp" |
259 |
++#include "catch2/catch.hpp" |
260 |
+diff --git a/tests/timed_events.cpp b/tests/timed_events.cpp |
261 |
+index fece422e99d5..6eaf99b3e1b9 100644 |
262 |
+--- a/tests/timed_events.cpp |
263 |
++++ b/tests/timed_events.cpp |
264 |
+@@ -1,4 +1,4 @@ |
265 |
+-#include "catch.hpp" |
266 |
++#include "catch2/catch.hpp" |
267 |
+ |
268 |
+ #include <utils/timed_events.hpp> |
269 |
+ |
270 |
+diff --git a/tests/utils.cpp b/tests/utils.cpp |
271 |
+index 6151733e7cf4..22b45cf3113b 100644 |
272 |
+--- a/tests/utils.cpp |
273 |
++++ b/tests/utils.cpp |
274 |
+@@ -1,4 +1,4 @@ |
275 |
+-#include "catch.hpp" |
276 |
++#include "catch2/catch.hpp" |
277 |
+ |
278 |
+ #include <utils/tolower.hpp> |
279 |
+ #include <utils/revstr.hpp> |
280 |
+diff --git a/tests/uuid.cpp b/tests/uuid.cpp |
281 |
+index 12c6c32adbeb..7720e3aaee30 100644 |
282 |
+--- a/tests/uuid.cpp |
283 |
++++ b/tests/uuid.cpp |
284 |
+@@ -1,4 +1,4 @@ |
285 |
+-#include "catch.hpp" |
286 |
++#include "catch2/catch.hpp" |
287 |
+ |
288 |
+ #include <xmpp/xmpp_component.hpp> |
289 |
+ |
290 |
+diff --git a/tests/xmpp.cpp b/tests/xmpp.cpp |
291 |
+index 14c51daa460f..01508a63481d 100644 |
292 |
+--- a/tests/xmpp.cpp |
293 |
++++ b/tests/xmpp.cpp |
294 |
+@@ -1,4 +1,4 @@ |
295 |
+-#include "catch.hpp" |
296 |
++#include "catch2/catch.hpp" |
297 |
+ |
298 |
+ #include <xmpp/xmpp_parser.hpp> |
299 |
+ #include <xmpp/auth.hpp> |
300 |
+-- |
301 |
+2.34.1 |
302 |
+ |