1 |
commit: 655f1afa8d4a5c33c43b9cf6c16f6a7b9f0a3e2c |
2 |
Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de> |
3 |
AuthorDate: Sun May 24 23:32:37 2020 +0000 |
4 |
Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de> |
5 |
CommitDate: Mon May 25 01:01:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=655f1afa |
7 |
|
8 |
dev-libs/mtxclient: New package. |
9 |
|
10 |
Dependency for net-im/nheko. |
11 |
|
12 |
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de> |
13 |
|
14 |
dev-libs/mtxclient/Manifest | 1 + |
15 |
.../files/0.3.0_remove_failing_tests.patch | 38 ++++++++++++ |
16 |
.../files/0.3.0_remove_network_tests.patch | 72 ++++++++++++++++++++++ |
17 |
dev-libs/mtxclient/metadata.xml | 11 ++++ |
18 |
dev-libs/mtxclient/mtxclient-0.3.0.ebuild | 51 +++++++++++++++ |
19 |
5 files changed, 173 insertions(+) |
20 |
|
21 |
diff --git a/dev-libs/mtxclient/Manifest b/dev-libs/mtxclient/Manifest |
22 |
new file mode 100644 |
23 |
index 0000000..5afa0f8 |
24 |
--- /dev/null |
25 |
+++ b/dev-libs/mtxclient/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST mtxclient-0.3.0.tar.gz 507299 BLAKE2B 4c36762a3a0a3aafebd414d2c967cc5183710c7be34df9b50078538e7971e86182114ed310ed96a452a02f3d8c1c18fa5aa0de414d0c391d97efb1ce7f1b49f9 SHA512 113eb2c1042e0aeea6607fae0b7fd0ff1655d6b902fa11a3492561c53240901e641f53d413810e932ac210e519026016c5fac38bda1592336c95b2d79781557e |
28 |
|
29 |
diff --git a/dev-libs/mtxclient/files/0.3.0_remove_failing_tests.patch b/dev-libs/mtxclient/files/0.3.0_remove_failing_tests.patch |
30 |
new file mode 100644 |
31 |
index 0000000..55de213 |
32 |
--- /dev/null |
33 |
+++ b/dev-libs/mtxclient/files/0.3.0_remove_failing_tests.patch |
34 |
@@ -0,0 +1,38 @@ |
35 |
+From b95f9d85f87f78ce5cfbaeed513ea284678eaa83 Mon Sep 17 00:00:00 2001 |
36 |
+From: tastytea <tastytea@××××××××.de> |
37 |
+Date: Mon, 25 May 2020 00:57:57 +0200 |
38 |
+Subject: [PATCH] Remove failing tests. |
39 |
+ |
40 |
+--- |
41 |
+ CMakeLists.txt | 8 -------- |
42 |
+ 1 file changed, 8 deletions(-) |
43 |
+ |
44 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
45 |
+index 689a091..58868b6 100644 |
46 |
+--- a/CMakeLists.txt |
47 |
++++ b/CMakeLists.txt |
48 |
+@@ -345,13 +345,6 @@ if(BUILD_LIB_TESTS) |
49 |
+ GTest::Main) |
50 |
+ target_include_directories(utils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
51 |
+ |
52 |
+- add_executable(pushrules tests/pushrules.cpp) |
53 |
+- target_link_libraries(pushrules |
54 |
+- MatrixClient::MatrixClient |
55 |
+- GTest::GTest |
56 |
+- GTest::Main) |
57 |
+- target_include_directories(pushrules PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
58 |
+- |
59 |
+ add_executable(identifiers tests/identifiers.cpp) |
60 |
+ target_link_libraries(identifiers |
61 |
+ MatrixClient::MatrixClient |
62 |
+@@ -395,7 +388,6 @@ if(BUILD_LIB_TESTS) |
63 |
+ GTest::Main) |
64 |
+ |
65 |
+ add_test(Utilities utils) |
66 |
+- add_test(Pushrules pushrules) |
67 |
+ add_test(Identifiers identifiers) |
68 |
+ add_test(Errors errors) |
69 |
+ add_test(CryptoStructs crypto) |
70 |
+-- |
71 |
+2.26.2 |
72 |
+ |
73 |
|
74 |
diff --git a/dev-libs/mtxclient/files/0.3.0_remove_network_tests.patch b/dev-libs/mtxclient/files/0.3.0_remove_network_tests.patch |
75 |
new file mode 100644 |
76 |
index 0000000..32fc72b |
77 |
--- /dev/null |
78 |
+++ b/dev-libs/mtxclient/files/0.3.0_remove_network_tests.patch |
79 |
@@ -0,0 +1,72 @@ |
80 |
+From e4e068ba5dd3964c890f25bbe668c8a964562ded Mon Sep 17 00:00:00 2001 |
81 |
+From: tastytea <tastytea@××××××××.de> |
82 |
+Date: Mon, 25 May 2020 00:50:30 +0200 |
83 |
+Subject: [PATCH] Remove tests that require a network connection. |
84 |
+ |
85 |
+--- |
86 |
+ CMakeLists.txt | 35 ----------------------------------- |
87 |
+ 1 file changed, 35 deletions(-) |
88 |
+ |
89 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
90 |
+index 0073604..689a091 100644 |
91 |
+--- a/CMakeLists.txt |
92 |
++++ b/CMakeLists.txt |
93 |
+@@ -338,29 +338,6 @@ if(BUILD_LIB_TESTS) |
94 |
+ |
95 |
+ file(COPY tests/fixtures DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |
96 |
+ |
97 |
+- add_executable(client_api tests/client_api.cpp) |
98 |
+- target_link_libraries(client_api |
99 |
+- MatrixClient::MatrixClient |
100 |
+- GTest::GTest |
101 |
+- GTest::Main) |
102 |
+- target_include_directories(client_api PRIVATE |
103 |
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
104 |
+- |
105 |
+- add_executable(media_api tests/media_api.cpp) |
106 |
+- target_link_libraries(media_api |
107 |
+- MatrixClient::MatrixClient |
108 |
+- GTest::GTest |
109 |
+- GTest::Main) |
110 |
+- target_include_directories(media_api PRIVATE |
111 |
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
112 |
+- |
113 |
+- add_executable(e2ee tests/e2ee.cpp) |
114 |
+- target_link_libraries(e2ee |
115 |
+- MatrixClient::MatrixClient |
116 |
+- GTest::GTest |
117 |
+- GTest::Main) |
118 |
+- target_include_directories(e2ee PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
119 |
+- |
120 |
+ add_executable(utils tests/utils.cpp) |
121 |
+ target_link_libraries(utils |
122 |
+ MatrixClient::MatrixClient |
123 |
+@@ -375,14 +352,6 @@ if(BUILD_LIB_TESTS) |
124 |
+ GTest::Main) |
125 |
+ target_include_directories(pushrules PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
126 |
+ |
127 |
+- add_executable(connection tests/connection.cpp) |
128 |
+- target_link_libraries(connection |
129 |
+- MatrixClient::MatrixClient |
130 |
+- GTest::GTest |
131 |
+- GTest::Main) |
132 |
+- target_include_directories(connection PRIVATE |
133 |
+- ${CMAKE_CURRENT_SOURCE_DIR}/tests) |
134 |
+- |
135 |
+ add_executable(identifiers tests/identifiers.cpp) |
136 |
+ target_link_libraries(identifiers |
137 |
+ MatrixClient::MatrixClient |
138 |
+@@ -425,10 +394,6 @@ if(BUILD_LIB_TESTS) |
139 |
+ GTest::GTest |
140 |
+ GTest::Main) |
141 |
+ |
142 |
+- add_test(BasicConnectivity connection) |
143 |
+- add_test(ClientAPI client_api) |
144 |
+- add_test(MediaAPI media_api) |
145 |
+- add_test(Encryption e2ee) |
146 |
+ add_test(Utilities utils) |
147 |
+ add_test(Pushrules pushrules) |
148 |
+ add_test(Identifiers identifiers) |
149 |
+-- |
150 |
+2.26.2 |
151 |
+ |
152 |
|
153 |
diff --git a/dev-libs/mtxclient/metadata.xml b/dev-libs/mtxclient/metadata.xml |
154 |
new file mode 100644 |
155 |
index 0000000..d028932 |
156 |
--- /dev/null |
157 |
+++ b/dev-libs/mtxclient/metadata.xml |
158 |
@@ -0,0 +1,11 @@ |
159 |
+<?xml version="1.0" encoding="UTF-8"?> |
160 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
161 |
+<pkgmetadata> |
162 |
+ <maintainer type="person"> |
163 |
+ <email>gentoo@××××××××.de</email> |
164 |
+ <name>Ronny (tastytea) Gutbrod</name> |
165 |
+ </maintainer> |
166 |
+ <upstream> |
167 |
+ <remote-id type="github">Nheko-Reborn/mtxclient</remote-id> |
168 |
+ </upstream> |
169 |
+</pkgmetadata> |
170 |
|
171 |
diff --git a/dev-libs/mtxclient/mtxclient-0.3.0.ebuild b/dev-libs/mtxclient/mtxclient-0.3.0.ebuild |
172 |
new file mode 100644 |
173 |
index 0000000..8690faf |
174 |
--- /dev/null |
175 |
+++ b/dev-libs/mtxclient/mtxclient-0.3.0.ebuild |
176 |
@@ -0,0 +1,51 @@ |
177 |
+# Copyright 2020 Gentoo Authors |
178 |
+# Distributed under the terms of the GNU General Public License v2 |
179 |
+ |
180 |
+EAPI=7 |
181 |
+ |
182 |
+inherit cmake |
183 |
+ |
184 |
+DESCRIPTION="Client API library for Matrix, built on top of Boost.Asio" |
185 |
+HOMEPAGE="https://github.com/Nheko-Reborn/mtxclient" |
186 |
+SRC_URI="https://github.com/Nheko-Reborn/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
187 |
+ |
188 |
+LICENSE="MIT" |
189 |
+SLOT="0" |
190 |
+IUSE="test" |
191 |
+KEYWORDS="~amd64" |
192 |
+ |
193 |
+RDEPEND=" |
194 |
+ dev-libs/libsodium |
195 |
+ >=dev-libs/boost-1.70.0 |
196 |
+ dev-libs/olm |
197 |
+ dev-libs/openssl |
198 |
+ dev-cpp/nlohmann_json |
199 |
+" |
200 |
+DEPEND=" |
201 |
+ ${RDEPEND} |
202 |
+ dev-libs/spdlog |
203 |
+ test? ( dev-cpp/gtest ) |
204 |
+" |
205 |
+ |
206 |
+# remove_failing_tests depends on remove_network_tests. |
207 |
+PATCHES=( |
208 |
+ "${FILESDIR}/0.3.0_remove_network_tests.patch" |
209 |
+ "${FILESDIR}/0.3.0_remove_failing_tests.patch" |
210 |
+) |
211 |
+ |
212 |
+src_configure() { |
213 |
+ local -a mycmakeargs=( |
214 |
+ -DBUILD_LIB_TESTS="$(usex test)" |
215 |
+ -DBUILD_LIB_EXAMPLES=OFF |
216 |
+ ) |
217 |
+ |
218 |
+ if use test; then |
219 |
+ # Upstream uses a toolchain file to set these. |
220 |
+ mycmakeargs+=( |
221 |
+ -DCMAKE_CXX_STANDARD=17 |
222 |
+ -DCMAKE_CXX_STANDARD_REQUIRED=ON |
223 |
+ ) |
224 |
+ fi |
225 |
+ |
226 |
+ cmake_src_configure |
227 |
+} |