Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/barrier/files/, x11-misc/barrier/
Date: Tue, 02 Nov 2021 22:36:23
Message-Id: 1635892566.637b9e78ba884167eaba3211a49d7266555de924.chewi@gentoo
1 commit: 637b9e78ba884167eaba3211a49d7266555de924
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 2 22:35:22 2021 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 2 22:36:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=637b9e78
7
8 x11-misc/barrier: Drop and old vulnerable 2.3.3
9
10 Bug: https://bugs.gentoo.org/821337
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 x11-misc/barrier/Manifest | 1 -
14 x11-misc/barrier/barrier-2.3.3.ebuild | 82 -------------
15 x11-misc/barrier/files/barrier-2.3.3-gtest.patch | 116 ------------------
16 x11-misc/barrier/files/barrier-2.3.3-tests.patch | 150 -----------------------
17 4 files changed, 349 deletions(-)
18
19 diff --git a/x11-misc/barrier/Manifest b/x11-misc/barrier/Manifest
20 index 3fc454b5951..c3e1ba04644 100644
21 --- a/x11-misc/barrier/Manifest
22 +++ b/x11-misc/barrier/Manifest
23 @@ -1,2 +1 @@
24 -DIST barrier-2.3.3.tar.gz 5465909 BLAKE2B 3f881526f53113e48f1ea2e1592ebf2e932a8296fcba331243678963945001e7700dddc3bf8957f85285aec02c3d3700d31786cef291862a9b21780ee9e96cd6 SHA512 1ac945ce090d5bbdae7bab7d4ca802cc2d54c1644a12088203b240e38078d32d3b30ae2f764ba27d66c9d709e430b0eb1b4576314d99dd6177d8b88d19b89777
25 DIST barrier-2.4.0.tar.gz 5572043 BLAKE2B e3eee306324a661a655b31e3179b7daf3fb199553a581059c67113f9597fb41d6af00fa3090d20c7d0b1d7420764454a512e91d8180ea663c3f99b89c663417f SHA512 dff8d95c358688952baee0bbbf56b818e40a6c0483d58f6cadd55558ab5d0cefc92a37b0751bfd70868686e1716c729871ae00a30ee9b0ba944f531dfb742449
26
27 diff --git a/x11-misc/barrier/barrier-2.3.3.ebuild b/x11-misc/barrier/barrier-2.3.3.ebuild
28 deleted file mode 100644
29 index 33d180e0a5d..00000000000
30 --- a/x11-misc/barrier/barrier-2.3.3.ebuild
31 +++ /dev/null
32 @@ -1,82 +0,0 @@
33 -# Copyright 1999-2021 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=7
37 -
38 -inherit desktop virtualx xdg cmake
39 -
40 -DESCRIPTION="Share a mouse and keyboard between computers (fork of Synergy)"
41 -HOMEPAGE="https://github.com/debauchee/barrier"
42 -SRC_URI="https://github.com/debauchee/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
43 -
44 -LICENSE="GPL-2"
45 -SLOT="0"
46 -KEYWORDS="~amd64 ~x86"
47 -IUSE="gui test"
48 -RESTRICT="!test? ( test )"
49 -
50 -RDEPEND="
51 - net-misc/curl
52 - x11-libs/libICE
53 - x11-libs/libSM
54 - x11-libs/libX11
55 - x11-libs/libXext
56 - x11-libs/libXi
57 - x11-libs/libXinerama
58 - x11-libs/libXrandr
59 - x11-libs/libXtst
60 - gui? (
61 - dev-qt/qtcore:5
62 - dev-qt/qtgui:5
63 - dev-qt/qtnetwork:5
64 - dev-qt/qtwidgets:5
65 - net-dns/avahi[mdnsresponder-compat]
66 - )
67 - dev-libs/openssl:0=
68 -"
69 -DEPEND="
70 - ${RDEPEND}
71 - dev-cpp/gtest
72 - x11-base/xorg-proto
73 -"
74 -
75 -PATCHES=(
76 - "${FILESDIR}"/${P}-tests.patch
77 - "${FILESDIR}"/${P}-gtest.patch
78 -)
79 -
80 -DOCS=(
81 - ChangeLog
82 - README.md
83 - doc/${PN}.conf.example{,-advanced,-basic}
84 -)
85 -
86 -src_configure() {
87 - local mycmakeargs=(
88 - -DBARRIER_BUILD_GUI=$(usex gui)
89 - -DBARRIER_BUILD_INSTALLER=OFF
90 - -DBARRIER_BUILD_TESTS=$(usex test)
91 - -DBARRIER_REVISION=00000000
92 - -DBARRIER_USE_EXTERNAL_GTEST=ON
93 - -DBARRIER_VERSION_STAGE=gentoo
94 - )
95 -
96 - cmake_src_configure
97 -}
98 -
99 -src_test() {
100 - "${BUILD_DIR}"/bin/unittests || die
101 - virtx "${BUILD_DIR}"/bin/integtests || die
102 -}
103 -
104 -src_install() {
105 - cmake_src_install
106 - einstalldocs
107 - doman doc/${PN}{c,s}.1
108 -
109 - if use gui; then
110 - doicon -s scalable res/${PN}.svg
111 - doicon -s 256 res/${PN}.png
112 - make_desktop_entry ${PN} Barrier ${PN} Utility
113 - fi
114 -}
115
116 diff --git a/x11-misc/barrier/files/barrier-2.3.3-gtest.patch b/x11-misc/barrier/files/barrier-2.3.3-gtest.patch
117 deleted file mode 100644
118 index 363f8c2c02c..00000000000
119 --- a/x11-misc/barrier/files/barrier-2.3.3-gtest.patch
120 +++ /dev/null
121 @@ -1,116 +0,0 @@
122 -From bd1db368b333783697d686c82c42e48c4bec8b9e Mon Sep 17 00:00:00 2001
123 -From: James Le Cuirot <chewi@g.o>
124 -Date: Fri, 21 Aug 2020 23:13:58 +0100
125 -Subject: [PATCH] Add BARRIER_USE_EXTERNAL_GTEST CMake option to use external
126 - GTest
127 -
128 ----
129 - CMakeLists.txt | 1 +
130 - src/test/CMakeLists.txt | 38 ++++++++++++++++++++----------
131 - src/test/integtests/CMakeLists.txt | 4 +---
132 - src/test/unittests/CMakeLists.txt | 4 +---
133 - 4 files changed, 29 insertions(+), 18 deletions(-)
134 -
135 -diff --git a/CMakeLists.txt b/CMakeLists.txt
136 -index 4947d20f..18b242db 100644
137 ---- a/CMakeLists.txt
138 -+++ b/CMakeLists.txt
139 -@@ -21,6 +21,7 @@ project (barrier C CXX)
140 - option (BARRIER_BUILD_GUI "Build the GUI" ON)
141 - option (BARRIER_BUILD_INSTALLER "Build the installer" ON)
142 - option (BARRIER_BUILD_TESTS "Build the tests" ON)
143 -+option (BARRIER_USE_EXTERNAL_GTEST "Use external installation of Google Test framework" OFF)
144 -
145 - set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
146 - set (CMAKE_CXX_STANDARD 14)
147 -diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
148 -index daecb317..4a50e701 100644
149 ---- a/src/test/CMakeLists.txt
150 -+++ b/src/test/CMakeLists.txt
151 -@@ -14,19 +14,33 @@
152 - # You should have received a copy of the GNU General Public License
153 - # along with this program. If not, see <http://www.gnu.org/licenses/>.
154 -
155 --include_directories(
156 -- ../../ext/gtest
157 -- ../../ext/gtest/include
158 -- ../../ext/gmock
159 -- ../../ext/gmock/include)
160 --
161 --add_library(gtest STATIC ../../ext/gtest/src/gtest-all.cc)
162 --add_library(gmock STATIC ../../ext/gmock/src/gmock-all.cc)
163 -+if (BARRIER_USE_EXTERNAL_GTEST)
164 -+ include (FindPkgConfig)
165 -+ find_package(GTest REQUIRED)
166 -+ pkg_check_modules(GMOCK REQUIRED gmock)
167 -+ include_directories(
168 -+ ${GTEST_INCLUDE_DIRS}
169 -+ ${GMOCK_INCLUDE_DIRS}
170 -+ )
171 -+else()
172 -+ include_directories(
173 -+ ../../ext/gtest
174 -+ ../../ext/gtest/include
175 -+ ../../ext/gmock
176 -+ ../../ext/gmock/include
177 -+ )
178 -
179 --if (UNIX)
180 -- # ignore warnings in gtest and gmock
181 -- set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
182 -- set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
183 -+ add_library(gtest STATIC ../../ext/gtest/src/gtest-all.cc)
184 -+ add_library(gmock STATIC ../../ext/gmock/src/gmock-all.cc)
185 -+
186 -+ set(GTEST_LIBRARIES gtest)
187 -+ set(GMOCK_LIBRARIES gmock)
188 -+
189 -+ if (UNIX)
190 -+ # ignore warnings in gtest and gmock
191 -+ set_target_properties(gtest PROPERTIES COMPILE_FLAGS "-w")
192 -+ set_target_properties(gmock PROPERTIES COMPILE_FLAGS "-w")
193 -+ endif()
194 - endif()
195 -
196 - add_subdirectory(integtests)
197 -diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt
198 -index 0460d8df..9ef875bd 100644
199 ---- a/src/test/integtests/CMakeLists.txt
200 -+++ b/src/test/integtests/CMakeLists.txt
201 -@@ -68,8 +68,6 @@ endif()
202 -
203 - include_directories(
204 - ../../
205 -- ../../../ext/gtest/include
206 -- ../../../ext/gmock/include
207 - )
208 -
209 - if (UNIX)
210 -@@ -80,4 +78,4 @@ endif()
211 -
212 - add_executable(integtests ${sources})
213 - target_link_libraries(integtests
214 -- arch base client common io ipc mt net platform server synlib gtest gmock ${libs} ${OPENSSL_LIBS})
215 -+ arch base client common io ipc mt net platform server synlib ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${libs} ${OPENSSL_LIBS})
216 -diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt
217 -index c46375ce..61a0d35f 100644
218 ---- a/src/test/unittests/CMakeLists.txt
219 -+++ b/src/test/unittests/CMakeLists.txt
220 -@@ -50,8 +50,6 @@ list(APPEND headers ${platform_sources})
221 -
222 - include_directories(
223 - ../../
224 -- ../../../ext/gtest/include
225 -- ../../../ext/gmock/include
226 - ../../../ext
227 - )
228 -
229 -@@ -67,4 +65,4 @@ endif()
230 -
231 - add_executable(unittests ${sources})
232 - target_link_libraries(unittests
233 -- arch base client server common io net platform server synlib mt ipc gtest gmock ${libs} ${OPENSSL_LIBS})
234 -+ arch base client server common io net platform server synlib mt ipc ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${libs} ${OPENSSL_LIBS})
235 ---
236 -2.26.2
237 -
238
239 diff --git a/x11-misc/barrier/files/barrier-2.3.3-tests.patch b/x11-misc/barrier/files/barrier-2.3.3-tests.patch
240 deleted file mode 100644
241 index a4cc0d665a0..00000000000
242 --- a/x11-misc/barrier/files/barrier-2.3.3-tests.patch
243 +++ /dev/null
244 @@ -1,150 +0,0 @@
245 -From 4a031b8ce538af0c15857c37c1964bf144d5bc38 Mon Sep 17 00:00:00 2001
246 -From: James Le Cuirot <chewi@g.o>
247 -Date: Fri, 21 Aug 2020 22:22:48 +0100
248 -Subject: [PATCH] Add BARRIER_BUILD_TESTS CMake option to make tests optional
249 -
250 ----
251 - CMakeLists.txt | 2 +-
252 - src/CMakeLists.txt | 5 ++++-
253 - src/lib/barrier/KeyMap.h | 4 ++++
254 - src/test/unittests/barrier/KeyMapTests.cpp | 2 ++
255 - 4 files changed, 11 insertions(+), 2 deletions(-)
256 -
257 -diff --git a/CMakeLists.txt b/CMakeLists.txt
258 -index 6a377c04..4947d20f 100644
259 ---- a/CMakeLists.txt
260 -+++ b/CMakeLists.txt
261 -@@ -20,6 +20,7 @@ project (barrier C CXX)
262 -
263 - option (BARRIER_BUILD_GUI "Build the GUI" ON)
264 - option (BARRIER_BUILD_INSTALLER "Build the installer" ON)
265 -+option (BARRIER_BUILD_TESTS "Build the tests" ON)
266 -
267 - set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
268 - set (CMAKE_CXX_STANDARD 14)
269 -@@ -49,7 +50,6 @@ else()
270 - endif()
271 -
272 - set (libs)
273 --include_directories (BEFORE SYSTEM ./ext/gtest/include)
274 -
275 - if (UNIX)
276 - if (NOT APPLE)
277 -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
278 -index 55aad09d..c3dea51f 100644
279 ---- a/src/CMakeLists.txt
280 -+++ b/src/CMakeLists.txt
281 -@@ -19,7 +19,10 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}/lib)
282 -
283 - add_subdirectory(lib)
284 - add_subdirectory(cmd)
285 --add_subdirectory(test)
286 -+
287 -+if (BARRIER_BUILD_TESTS)
288 -+ add_subdirectory(test)
289 -+endif()
290 -
291 - if (BARRIER_BUILD_GUI)
292 - add_subdirectory(gui)
293 -diff --git a/src/lib/barrier/KeyMap.h b/src/lib/barrier/KeyMap.h
294 -index b6eb8658..812b4d26 100644
295 ---- a/src/lib/barrier/KeyMap.h
296 -+++ b/src/lib/barrier/KeyMap.h
297 -@@ -24,7 +24,9 @@
298 - #include "common/stdset.h"
299 - #include "common/stdvector.h"
300 -
301 -+#ifdef TEST_ENV
302 - #include <gtest/gtest_prod.h>
303 -+#endif
304 -
305 - namespace barrier {
306 -
307 -@@ -327,6 +329,7 @@ public:
308 - //@}
309 -
310 - private:
311 -+#ifdef TEST_ENV
312 - FRIEND_TEST(KeyMapTests,
313 - findBestKey_requiredDown_matchExactFirstItem);
314 - FRIEND_TEST(KeyMapTests,
315 -@@ -340,6 +343,7 @@ private:
316 - FRIEND_TEST(KeyMapTests,
317 - findBestKey_onlyOneRequiredDown_matchTwoRequiredChangesItem);
318 - FRIEND_TEST(KeyMapTests, findBestKey_noRequiredDown_cannotMatch);
319 -+#endif
320 -
321 - private:
322 - //! Ways to synthesize a key
323 -diff --git a/src/test/unittests/barrier/KeyMapTests.cpp b/src/test/unittests/barrier/KeyMapTests.cpp
324 -index 59806339..c0832199 100644
325 ---- a/src/test/unittests/barrier/KeyMapTests.cpp
326 -+++ b/src/test/unittests/barrier/KeyMapTests.cpp
327 -@@ -15,6 +15,8 @@
328 - * along with this program. If not, see <http://www.gnu.org/licenses/>.
329 - */
330 -
331 -+#define TEST_ENV
332 -+
333 - #include "barrier/KeyMap.h"
334 -
335 - #include "test/global/gtest.h"
336 ---
337 -2.26.2
338 -
339 -From 19e020080cb3f54befb504abc48cf304ab42f23e Mon Sep 17 00:00:00 2001
340 -From: James Le Cuirot <chewi@g.o>
341 -Date: Sat, 22 Aug 2020 11:46:25 +0100
342 -Subject: [PATCH] Respect DISPLAY environment variable in XWindows tests
343 -
344 -XWindowsScreenTests was failing under Gentoo's package manager. I have
345 -also addressed this in XWindowsScreenSaverTests, which is currently
346 -unused.
347 ----
348 - src/test/integtests/platform/XWindowsScreenSaverTests.cpp | 7 ++++++-
349 - src/test/integtests/platform/XWindowsScreenTests.cpp | 7 ++++++-
350 - 2 files changed, 12 insertions(+), 2 deletions(-)
351 -
352 -diff --git a/src/test/integtests/platform/XWindowsScreenSaverTests.cpp b/src/test/integtests/platform/XWindowsScreenSaverTests.cpp
353 -index c6a2710c..1ee273ed 100644
354 ---- a/src/test/integtests/platform/XWindowsScreenSaverTests.cpp
355 -+++ b/src/test/integtests/platform/XWindowsScreenSaverTests.cpp
356 -@@ -30,7 +30,12 @@ using ::testing::_;
357 - // TODO: not working on build machine for some reason
358 - TEST(CXWindowsScreenSaverTests, activate_defaultScreen_todo)
359 - {
360 -- Display* display = XOpenDisplay(":0.0");
361 -+ const char* displayName = getenv("DISPLAY");
362 -+ if (displayName == NULL) {
363 -+ displayName = ":0.0";
364 -+ }
365 -+
366 -+ Display* display = XOpenDisplay(displayName);
367 - Window window = DefaultRootWindow(display);
368 - MockEventQueue eventQueue;
369 - EXPECT_CALL(eventQueue, removeHandler(_, _)).Times(1);
370 -diff --git a/src/test/integtests/platform/XWindowsScreenTests.cpp b/src/test/integtests/platform/XWindowsScreenTests.cpp
371 -index d8f75e15..97358197 100644
372 ---- a/src/test/integtests/platform/XWindowsScreenTests.cpp
373 -+++ b/src/test/integtests/platform/XWindowsScreenTests.cpp
374 -@@ -25,11 +25,16 @@ using ::testing::_;
375 -
376 - TEST(CXWindowsScreenTests, fakeMouseMove_nonPrimary_getCursorPosValuesCorrect)
377 - {
378 -+ const char* displayName = getenv("DISPLAY");
379 -+ if (displayName == NULL) {
380 -+ displayName = ":0.0";
381 -+ }
382 -+
383 - MockEventQueue eventQueue;
384 - EXPECT_CALL(eventQueue, adoptHandler(_, _, _)).Times(2);
385 - EXPECT_CALL(eventQueue, adoptBuffer(_)).Times(2);
386 - EXPECT_CALL(eventQueue, removeHandler(_, _)).Times(2);
387 -- XWindowsScreen screen(new XWindowsImpl(), ":0.0", false, false, 0, &eventQueue);
388 -+ XWindowsScreen screen(new XWindowsImpl(), displayName, false, false, 0, &eventQueue);
389 -
390 - screen.fakeMouseMove(10, 20);
391 -
392 ---
393 -2.26.2
394 -